function [Sh, Hh, Eh, Jh, Fh, hr] = DesenharRoboPZ( S,P,C,F,E)

  [AZ,EL] = view;
  hr = hggroup;
  fig = figure(1);
 %-- Superficie de contacto ----------------------------------------- 
  % 3 planos, mesa, plano longitudinal e plano transversal
  Sh(1) = patch(S(1,:,1), S(2,:,1), S(3,:,1), 'r');
  Sh(2) = patch(S(1,:,2), S(2,:,2), S(3,:,2), 'c', 'FaceAlpha', .3);
  Sh(3) = patch(S(1,:,3), S(2,:,3), S(3,:,3), 'g');  
  view(AZ,EL); hold on
 %-- Elos mecanicos: endoesqueleto ("stick diagram") ----------------
  Hh(1) = plot3( 0,0,0,'k.', 'Parent', hr);
  Hh(2) = plot3(P( 1:5,1), P( 1:5,2), P( 1:5,3),'b',...
                'XDataSource', 'P(:,1)',...
                'YDataSource', 'P(:,2)',...
                'ZDataSource', 'P(:,3)',...
                'Parent', hr, 'LineWidth', 2.0); %-- Pernas  
 %-- Elos mecanicos: exoesqueleto -----------------------------------
 for i=1:size(E,3), Eh(i) = patch(  E(1,:,i),E(2,:,i),E(3,:,i),'y',...
                                    'Parent', hr); 
 end  
 %-- Juntas rotacionais ---------------------------------------------  
 for i=1:size(C,3), 
     Jh(i) = surface(   [C(1,:,i); C(2,:,i)],...
                        [C(3,:,i); C(4,:,i)],...
                        [C(5,:,i); C(6,:,i)],...
                        'Parent', hr); 
 end     
 %-- Pe de suporte e pe livre --------------------------------------
 for i=1:size(F,3), 
     Fh(i) = patch(F(1,:,i),F(2,:,i),F(3,:,i),'y',...
            'Parent', hr); 
 end
 %------------------------------------------------------------------
 axis off