function DesenharRobo( P, COG )

%-- Distiller ----------------------------------------------------------------------
 xp_e = P(1,:);    yp_e = P(2,:);
 xp_d = P(3,:);    yp_d = P(4,:);
 xf_e = P(5,:);    yf_e = P(6,:);
 xf_d = P(7,:);    yf_d = P(8,:);
 x0   = P(9,:);    y0   = P(10,:);
 x1   = P(11,:);   y1   = P(12,:);
 x2   = P(13,:);   y2   = P(14,:);

%-- Representaçao/animaçao do sistema plano+perna ----------------------------------
figure(1)
DIM = size(P,2);
for k=1:DIM,
   
  clf
  A=plot( [xp_e(k) xp_d(k)],[yp_e(k) yp_d(k)],'b', [xf_e(k) xf_d(k)],[yf_e(k) yf_d(k)],'r',...
          [x0(k) x1(k) x2(k)],[y0(k) y1(k) y2(k)],'r', [x0(k) x1(k)],[y0(k) y1(k)],'ro',...
          [COG(1,k) COG(1,k)],[COG(2,k) 0],'g-.', COG(1,k),COG(2,k),'k.', COG(1,1),COG(2,1),'ko');
% 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([-0.5 0.5 -0.3 1.2]), axis('off')
  pause(0.01)
  
end 