function DesenharRobo( P, Pf, COG, COP, L )

figure(1)
DIM = size(P,2);
for k=1:DIM,
   
  clf, hold on 
  A=plot([P(1,k) P(3,k) P(5,k) P(7,k)],[P(2,k) P(4,k) P(6,k) P(8,k)],'b',...
         [P(1,k) P(3,k) P(5,k) P(7,k)],[P(2,k) P(4,k) P(6,k) P(8,k)],'k.',...
         [P(1,k)-0.1*(L(1)+L(2)) P(1,k)+0.1*(L(1)+L(2))], [0 0], 'b', ...
         [P(1,k)-0.1*(L(1)+L(2)) P(1,k)-0.06*(L(1)+L(2)) P(1,k)-0.08*(L(1)+L(2)) P(1,k)-0.1*(L(1)+L(2))], [0 0 -0.05*(L(1)+L(2)) 0], 'b',...
         [P(1,k)+0.1*(L(1)+L(2)) P(1,k)+0.06*(L(1)+L(2)) P(1,k)+0.08*(L(1)+L(2)) P(1,k)+0.1*(L(1)+L(2))], [0 0 -0.05*(L(1)+L(2)) 0], 'b',...
         [-(L(1)+L(2)+L(3))*1.1 (L(1)+L(2)+L(3))*1.1], [-(L(1)+L(2))*0.05 -(L(1)+L(2))*0.05], 'k',...
         COG(1,k),COG(2,k),'r.', COP(k),0,'r.', Pf(1),Pf(2),'k.');
% set(A(1));
%  set(A(1), 'LineWidth', 2); set(A(2), 'LineWidth', 2);
  xlabel(' X (m) '), ylabel(' Y (m) '), title(' Movimento da Perna de Suporte ')
  axis('equal'), axis([-(L(1)+L(2)+L(3))*1.05 (L(1)+L(2)+L(3))*1.05 -(L(1)+L(2)+L(3))*0.05 (L(1)+L(2)+L(3))*1.1]),  axis('off')
  pause(0.1)
  
end 