function parallelogrammesv1(A,u,v,x,n)
% exemple: parallelogrammesv1([-1;2],[-2;3],[1;3],0.1,25)
  clf;hold on;axis equal
  plot_para(A,u,v,'k')
  for i=1:n
    [A,u,v]=calcul(A,u,v,x);
    plot_para(A,u,v,'b')
  end
end

function plot_para(A,u,v,color)
  X=[A,A+u,A+u+v,A+v,A];
  plot(X(1,:),X(2,:),color)
end

function [Ap,up,vp]=calcul(A,u,v,x)
  Ap=A+x*u;
  up=u+x*(v-u);
  vp=v-x*(u+v);
end
