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.

plotGrid(obj, nGrid, drawI)
function h = plotGrid(obj, nGrid, drawI)
% plotSurface - make a surface plot of the rotated/translated grid
%
% h ....... figure handle
% obj ..... object to draw
% nGrid ... interpolate surface anew at [N M] points
% drawI ... draw intensity, logical true/false

% get grid and interpolate data
[X, Y, Z, E] = interpolateGrid(obj, 'grid', nGrid);

% show it
h = figure;

% draw intensity
if drawI
	if isfield(obj, 'saturation') && ~isempty(obj.saturation)
		surf(X, Y, Z, obj.saturation(E.*conj(E)));
	else
		surf(X, Y, Z, E.*conj(E));
	end
else
	surf(X, Y, Z);
end
xlabel('x');
ylabel('y');
zlabel('z');
colorbar;
shading flat;

Contact us