필터 지우기
필터 지우기

Construction of Hexagonal Shape Patterns

조회 수: 3 (최근 30일)
Pranjal Pathak
Pranjal Pathak 2013년 10월 4일
편집: Ashish Uthama 2013년 10월 4일
Hi, Here I have added a particular code which generates some circular holograms:
fx = 5:5:20;
fy = 5:5:20;
a=128;
b=128;
c=512;
[x,y] = meshgrid(-1:2/127:+1,-1:2/127:+1);
circ=sqrt(x.^2+y.^2)<1;
for j1 = numel(fx):-1:1
for j2 = numel(fy):-1:1
h{(j1-1)*numel(fy) + j2 } = circ.*cos(pi*(x*fx(j1) + y*fy(j2)))>0;
end
end
M = cell(c/a);
M(:) = h;
M = cell2mat(M');
figure(1)
imagesc(M),colormap gray; axis image; axis off
Likewise, now I want to construct some hexagonal holograms in Matlab which may not be a regular pattern like the circular one. I have no idea how to do this. Can anyone please help me in this regard? N.B.: The hexagonal pattern will be arranged somewhat like the one attached here.

답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by