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.

rotatePoints(A0, r)
function A = rotatePoints(A0, r)
% rotatePoints - rotate vectors/points by Euler angles x -> y -> z

% angles
alpha = r(1);
beta  = r(2);
gamma = r(3);

% rotation matrices
Rx = [1          0           0;...
      0 cos(alpha) -sin(alpha);...
      0 sin(alpha)  cos(alpha)];
Ry = [ cos(beta) 0 sin(beta);...
               0 1         0;...
      -sin(beta) 0 cos(beta)];  
Rz = [cos(gamma) -sin(gamma) 0;...
      sin(gamma)  cos(gamma) 0;...
               0           0 1];
		   
% rotation
A = Rz*Ry*Rx * A0;

Contact us