Construction of Hexagonal Shape Patterns

1 回表示 (過去 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 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by