function DesenharRobo( P, C, Rasto, COG, COP )

 figure(1), [AZ,EL] = view; clf
 %-- Elos mecanicos -------------------------------------------------
  H1= plot3( [P(1) P(4) P(7) P(10) P(13) P(16) P(19)],...
             [P(2) P(5) P(8) P(11) P(14) P(17) P(20)],...
             [P(3) P(6) P(9) P(12) P(15) P(18) P(21)],'r');
  set(H1,'LineWidth', 2.0)
  xlabel(' X (m) '), ylabel(' Y (m) '), zlabel(' Z (m) ')
  title(' Movimento da Perna de Suporte ')
  axis('equal'), axis([-0.4 0.4 -0.4 0.4 0 0.6]), axis('off')
  view(AZ,EL),  hold on
 %-- Superficie de contacto -----------------------------------------
  fill3([-0.4 0.4 0.4 -0.4],[-0.4 -0.4 0.4 0.4],[-0.02 -0.02 -0.02 -0.02],'c')
 %-- Pe do robo -----------------------------------------------------
  fill3([-0.1 0.1 0.1 -0.1],[-0.05 -0.05 0.05 0.05],[0 0 0 0],'r')
  fill3([0.1 0.1 0.1 0.1],[-0.05 0.05 0.05 -0.05],[0 0 -0.02 -0.02],'r')
  fill3([-0.1 -0.1 -0.1 -0.1],[0.05 -0.05 -0.05 0.05],[0 0 -0.02 -0.02],'r')
  fill3([0.1 -0.1 -0.1 0.1],[0.05 0.05 0.05 0.05],[0 0 -0.02 -0.02],'r')
  fill3([-0.1 0.1 0.1 -0.1],[0.05 0.05 0.05 0.05],[0 0 -0.02 -0.02],'r')
 %-- Juntas rotacionais ---------------------------------------------  
  surf([C(1,:,1);C(2,:,1)],[C(3,:,1);C(4,:,1)],[C(5,:,1);C(6,:,1)]) 
  surf([C(1,:,2);C(2,:,2)],[C(3,:,2);C(4,:,2)],[C(5,:,2);C(6,:,2)])
  surf([C(1,:,3);C(2,:,3)],[C(3,:,3);C(4,:,3)],[C(5,:,3);C(6,:,3)])
  surf([C(1,:,4);C(2,:,4)],[C(3,:,4);C(4,:,4)],[C(5,:,4);C(6,:,4)])
  surf([C(1,:,5);C(2,:,5)],[C(3,:,5);C(4,:,5)],[C(5,:,5);C(6,:,5)])
 %-- Esfera na extremidade -----------------------------------------
  [X,Y,Z] = sphere(100);
  X = 0.025*X+P(19); Y = 0.025*Y+P(20); Z = 0.025*Z+P(21);
  surf(X,Y,Z)
 %-- Centro de gravidade / Centro de pressao -----------------------  
  plot3( COG(1),COG(2),COG(3),'b.', COG(1),COG(2),0,'b.',...
         COP(1),COP(2),0,'g.' )
  plot3(Rasto(1,:),Rasto(2,:),Rasto(3,:),'b-.')
