function DesenharRobo( P, C1, C2, C3, C4, C5, COG, Rasto, AZ, EL )

 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([C1(1,:);C1(2,:)],[C1(3,:);C1(4,:)],[C1(5,:);C1(6,:)]) 
  surf([C2(1,:);C2(2,:)],[C2(3,:);C2(4,:)],[C2(5,:);C2(6,:)])
  surf([C3(1,:);C3(2,:)],[C3(3,:);C3(4,:)],[C3(5,:);C3(6,:)])
  surf([C4(1,:);C4(2,:)],[C4(3,:);C4(4,:)],[C4(5,:);C4(6,:)])
  surf([C5(1,:);C5(2,:)],[C5(3,:);C5(4,:)],[C5(5,:);C5(6,:)])
 %-- 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 -------------------------------------------  
  plot3(COG(1),COG(2),COG(3),'b.', COG(1),COG(2),0,'b.')
  plot3(Rasto(1,:),Rasto(2,:),Rasto(3,:),'b-.')
