傅里叶光学(四)衍射与干涉

optics5

Contents

cylinder

try for w = 0.5, 1, 2

% diameter w
w = 1;
func = @(x,y) cyl(x,y,w);
str = sprintf('diameter %g',w);

[out in] = fourier2(func);
subplot(1,1,1);
rgb = cat(3,in,in,in);
imagesc([-4 4],[4 -4],rgb);
axis equal
axis square
axis([-4 4 -4 4]);
close all
g = logim(out,3);
rgb = cat(3,g,g,g);
image([-4 4],[4 -4],rgb);
title(str);
axis equal
axis square
axis([-4 4 -4 4]);
close all
sz = size(out);
N = sz(1);
k = -N/2:N/2-1;
width = 8;
x = width*k/N;
idy = find(x==0);
y = out(:,idy);
idx  = find(abs(x)<2);
yt = somb(w*x).^2;
subplot(2,1,1);
plot(x,y,x,yt);
title(str);
subplot(2,1,2);
semilogy(x,y,x,yt);
xlabel('cross-section x');

shifted cylinder

w = 0.5;
xs = 2;

fprintf('shift %g',-xs);
func = @(x,y) cyl(x+xs,y,w);
fourier2(func);
shift -2

phase-shifted cylinder

w = 2;
xi = 2;
func = @(x,y) cyl(x,y,w).*exp(j*2*pi*xi*x);
fourier2(func);

interference of two apertures

w = 0.5;
xs = 1;

func = @(x,y) cyl(x+xs,y,w)+cyl(x-xs,y,w);
out = fourier2(func);
imshow(out);

moving apertures closer together

w = 0.5;
xs = 0.5;

func = @(x,y) cyl(x+xs,y,w)+cyl(x-xs,y,w);
out = fourier2(func);
imshow(out);

effect of aperture shape

w = 0.5;
xs = 1.0;

func1 = @(x,y) cyl(x+xs,y,w)+cyl(x-xs,y,w);
func2 = @(x,y) rect(x+xs,w).*rect(y,w)+rect(x-xs,w).*rect(y,w);
[out1 in1] = fourier2(func1);
[out2 in2] = fourier2(func2);
subplot(2,3,1); imshow(in1);
subplot(2,3,2); imshow(out1);
subplot(2,3,3); imshow(logim(out1,3));
subplot(2,3,4); imshow(in2);
subplot(2,3,5); imshow(out2);
subplot(2,3,6); imshow(logim(out2,3));

interference of three apertures

global n;
n = 1;
fourier(@func3);

interference of five apertures

n = 2;
fourier(@func3);

原文地址:http://www.johnloomis.org/eop513/notes/optics5/script5.html


下面这两张是我计算的加了个colormap(hot)  顿时赶脚高大上了

  • 1
    点赞
  • 35
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值