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

figure(1)
DIM = size(P,2);    %Numero de colunas do vector P = 1 (Vector das coordenadas dos pontos das juntas)
for k=1:DIM,    %DIM=1 k=1
  clf   %Clear current figure
  hold on 
  A=plot([P(1,k) P(3,k) P(5,k) P(7,k) P(9,k)],[P(2,k) P(4,k) P(6,k) P(8,k) P(10,k)],'b',...    %Marcacao dos Elos
         [P(1,k) P(3,k) P(5,k) P(7,k) P(9,k)],[P(2,k) P(4,k) P(6,k) P(8,k) P(10,k)],'k.',...   %Marcacao das Juntas
         [P(1,k)-0.1*(L(1)+L(2)) P(1,k)+0.1*(L(1)+L(2))], [0 0], 'b', ...       %Marcacao Base Pe
         [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',...    %Marcacao ponto de apoio pe
         [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',...    %Marcacao ponto de apoio pe
         [-(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',...   %Marcacao chao
         COG(1,k),COG(2,k),'y.', COG(1,k),0,'y.', COP(k),0,'r.', Pf(1),Pf(2),'k.');
  %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(4)+L(1)+L(2)+L(3))*0.05 (L(4)+L(1)+L(2)+L(3))*1.1]),
  %axis([-1 1 -2 2])
  axis('off')
  pause(0.1)
  
end 