Construction of Hexagonal Shape Patterns

1 vue (au cours des 30 derniers jours)
Pranjal Pathak
Pranjal Pathak le 4 Oct 2013
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.

Réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by