function [cx,rot]=trans(cx,ang,rx,ry);
%
% TRANS It takes as input original coordinates and rotation angle
%       return the rotated and reduced coordinates following specifications
%      
% Rotations are all performed anticlockwise with the observer located on the positive side of 
% the axis and looking toward the origin. I
% Author: D. Marcotte
% Version 2.1  97/aug/18
% Revised by Dezhang Chu,   10-22-98


% perform rotation counterclockwise
if ang ~= 0
      cang=cos(ang/180*pi); sang=sin(ang/180*pi);
      rot=[cang,-sang;sang,cang];
      cx=cx*rot;
 else
      rot=[1 0;0 1]; 
 end
 t=diag([rx ry]);
 
% perform contractions or dilatations (reduced h) to handle anisotopy

  cx=cx/t;

  
