Code covered by the BSD License  

Highlights from
Huygens-Fresnel integral approximation, free-form apertures and rough surfaces

image thumbnail

Huygens-Fresnel integral approximation, free-form apertures and rough surfaces

by

 

Simulate wave propagation through free-form apertures, or off rough surfaces.

generateMesh(obj)
function [X Y] = generateMesh(obj)
% generateMesh - return coordinate vectors and matrices

% map to more convenient variables
s = obj.size;			% size [Lx Ly]
r = obj.resolution;		% spatial resolution [dx dy]

% rectangular coordinate vectors
x = -s(1)/2 : r(1) : s(1)/2;
y = -s(2)/2 : r(2) : s(2)/2;

% resulting mesh
[X Y] = ndgrid(x, y);

Contact us