% draw a picture
clear all
disp(['Time at start: ' datestr(now)])

n=100;
theta= linspace(0, 2*pi, n);


for i=1:n
    
    
    
theta_now = theta(i);

R = [ cos(theta_now)  -sin(theta_now);
      sin(theta_now)  cos(theta_now)];

x= [2 3 3 2 2 nan 3.5 2.5 1.5];
x= x -2;



y= [0 0 1 1 0 nan .5 1.5 .5];


x = x + cos(theta_now);
y = y + .1* theta_now^2;


r_ref= [x;y];



r = R* r_ref;

x=r(1,:);
y=r(2,:);

pause(.01)
plot(x,y)
axis('equal'); 
axis([-4 8 -4 8]);

end

disp(['Time at finish: ' datestr(now)])