function y=ecomplex(rectangle)
% present quadrilateral (i am calling it rectangle...)
% as a wrapped around collection of points
% [ p1 p2 p3 p4 p1] 
% [ 0+0i 1+0i 1+2i 0+3i 0]
 z=rectangle;

 axis([-5 5 -5 5]);
 line(real(z),imag(z),'color','r');

 % translation

 z1 = z - (5-i);
 line(real(z1),imag(z1),'color','b');

 % and scaling

 z2 = z - (5-i)/2;
 line(real(z2),imag(z2),'color','m');

 % more translation
 z3 = z + (4-2*i);
 line(real(z3),imag(z3),'color','g');

 % find the center of mass of the quadrilateral
 em = mean(z(1:end-1));  % drops last element , finds center of mass
 theta= pi/6;            % angle in degrees is 180/6 = 30 counterclockwise
 omega=exp(i*theta);     % rotation value
 z4=omega*(z-em)+em;     % rotate (around origin : -em)  + translate back to position +em
 line(real(z4),imag(z4));

 % z-em    is equivalent to move the object so that center of mass is the (0,0)
 % omega * is equivalent to rotating the object
 %  +em    slide it back into its original position (the center of mass that is)
 %         by 'reversing' the -em of z-em
