function [ z ] = rot(z0,theta,zt)

%Function rotates xy points in z0 by the angle theta and translates the
%result by the x-y distance specified in zt which has two elements).

zt = zt(:);

theta = theta*pi/180;
R(1,1) = cos(theta);
R(1,2) = -sin(theta);
R(2,1) = -R(1,2);
R(2,2) = R(1,1);
z = R*z0+repmat(zt,1,size(z0,2));

end

