function CreateWorld2Bodies( P_r,C_r,F_r,COG_r,H_rl,COG_rl,P_l,C_l,F_l,COG_l,COG,...
                             VIEW_flag,VIEW_point ) 

 figure(1), hold on
 if nargin == 12,
    AZ = 45; EL = 30; %clf
 else
     switch VIEW_point,
         case 'T', AZ = 90; EL = 90; clf                 
         case 'F', AZ = 90; EL =  0; clf            
         case 'S', AZ =  0; EL =  0; clf         
     end
 end
  %-- Ground surface -------------------------------------------------------
  if VIEW_flag(1) == 1,
     %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],'w')
     fill3([-0.1 1.5 1.5 -0.1],[-0.4 -0.4 0.4 0.4],[0.0 0.0 0.0 0.0],'w','EdgeColor','c','Visible','on')
  end
  axis([-0.1 1.5 -0.4 0.4 0 0.75]), axis('off'), axis('equal'), 
  view(AZ,EL), hold on  
  %axis('equal'), axis([-0.2 0.2 -0.2 0.2 0 0.35]), axis('off')
  %if AZ == 0 & EL == 90, view(40,25)
  %else view(AZ,EL), end
  hold on
 %-- Mechanical links -----------------------------------------------------
  if VIEW_flag(2) == 1,
      
  H1= plot3( [P_r(1) P_r(4) P_r(7) P_r(10) P_r(13)],...
                       [P_r(2) P_r(5) P_r(8) P_r(11) P_r(14)],...
                       [P_r(3) P_r(6) P_r(9) P_r(12) P_r(15)],'r.',...
                       [P_l(1) P_l(4) P_l(7) P_l(10) P_l(13)],...
                       [P_l(2) P_l(5) P_l(8) P_l(11) P_l(14)],...
                       [P_l(3) P_l(6) P_l(9) P_l(12) P_l(15)],'b.',...
                       [P_r(13) P_l(13)],[P_r(14) P_l(14)],[P_r(15) P_l(15)],'k');
  set(H1,'LineWidth', 5.0)
  
  end
  %plot3(track(1,:),track(2,:),track(3,:),'b-.')
 %-- Rotational joints ----------------------------------------------------  
  if VIEW_flag(3) == 1,
      
  surf([C_r(1,:,1);C_r(2,:,1)],[C_r(3,:,1);C_r(4,:,1)],[C_r(5,:,1);C_r(6,:,1)]) 
  surf([C_r(1,:,2);C_r(2,:,2)],[C_r(3,:,2);C_r(4,:,2)],[C_r(5,:,2);C_r(6,:,2)])
  surf([C_r(1,:,3);C_r(2,:,3)],[C_r(3,:,3);C_r(4,:,3)],[C_r(5,:,3);C_r(6,:,3)])
  surf([C_r(1,:,4);C_r(2,:,4)],[C_r(3,:,4);C_r(4,:,4)],[C_r(5,:,4);C_r(6,:,4)])
  surf([C_r(1,:,5);C_r(2,:,5)],[C_r(3,:,5);C_r(4,:,5)],[C_r(5,:,5);C_r(6,:,5)])
  surf([C_r(1,:,6);C_r(2,:,6)],[C_r(3,:,6);C_r(4,:,6)],[C_r(5,:,6);C_r(6,:,6)])
  surf([C_l(1,:,1);C_l(2,:,1)],[C_l(3,:,1);C_l(4,:,1)],[C_l(5,:,1);C_l(6,:,1)]) 
  surf([C_l(1,:,2);C_l(2,:,2)],[C_l(3,:,2);C_l(4,:,2)],[C_l(5,:,2);C_l(6,:,2)])
  surf([C_l(1,:,3);C_l(2,:,3)],[C_l(3,:,3);C_l(4,:,3)],[C_l(5,:,3);C_l(6,:,3)])
  surf([C_l(1,:,4);C_l(2,:,4)],[C_l(3,:,4);C_l(4,:,4)],[C_l(5,:,4);C_l(6,:,4)])
  surf([C_l(1,:,5);C_l(2,:,5)],[C_l(3,:,5);C_l(4,:,5)],[C_l(5,:,5);C_l(6,:,5)])
  surf([C_l(1,:,6);C_l(2,:,6)],[C_l(3,:,6);C_l(4,:,6)],[C_l(5,:,6);C_l(6,:,6)])
  
  end
 %-- Hip section ----------------------------------------------------------
  if VIEW_flag(4) == 1,
      
  fill3(H_rl(1,:,1),H_rl(2,:,1),H_rl(3,:,1),'y', ...
        H_rl(1,:,2),H_rl(2,:,2),H_rl(3,:,2),'y', ...
        H_rl(1,:,3),H_rl(2,:,3),H_rl(3,:,3),'y' );
  H2 = plot3(H_rl(1,:,1),H_rl(2,:,1),H_rl(3,:,1),'k', ...
             H_rl(1,:,2),H_rl(2,:,2),H_rl(3,:,2),'k', ...
             H_rl(1,:,3),H_rl(2,:,3),H_rl(3,:,3),'k');
  set(H2,'LineWidth', 2.0)
  
  end
 %-- Foot (double face) ---------------------------------------------------
  if VIEW_flag(5) == 1,
 
  fill3(F_r(1,:,1),F_r(2,:,1),F_r(3,:,1),'y', F_r(1,:,2),F_r(2,:,2),F_r(3,:,2),'y');
  H3 = plot3(F_r(1,:,1),F_r(2,:,1),F_r(3,:,1),'k', F_r(1,:,2),F_r(2,:,2),F_r(3,:,2),'k');  
  set(H3,'LineWidth', 2.0)
  fill3(F_l(1,:,1),F_l(2,:,1),F_l(3,:,1),'y', F_l(1,:,2),F_l(2,:,2),F_l(3,:,2),'y');
  H3 = plot3(F_l(1,:,1),F_l(2,:,1),F_l(3,:,1),'k', F_l(1,:,2),F_l(2,:,2),F_l(3,:,2),'k');  
  set(H3,'LineWidth', 2.0)
  
  end
 %-- Centre of gravity ----------------------------------------------------
  if VIEW_flag(6) == 1,
      
  [X,Y,Z] = sphere;
  surf(X*0.005+COG_r(1,1),Y*0.005+COG_r(2,1),Z*0.005+COG_r(3,1),'EdgeColor','none','FaceColor','b')
  surf(X*0.005+COG_r(1,2),Y*0.005+COG_r(2,2),Z*0.005+COG_r(3,2),'EdgeColor','none','FaceColor','b')
  surf(X*0.005+COG_r(1,3),Y*0.005+COG_r(2,3),Z*0.005+COG_r(3,3),'EdgeColor','none','FaceColor','b')
  surf(X*0.005+COG_rl(1),Y*0.005+COG_rl(2),Z*0.005+COG_rl(3),'EdgeColor','none','FaceColor','m')
  surf(X*0.005+COG_l(1,1),Y*0.005+COG_l(2,1),Z*0.005+COG_l(3,1),'EdgeColor','none','FaceColor','r')
  surf(X*0.005+COG_l(1,2),Y*0.005+COG_l(2,2),Z*0.005+COG_l(3,2),'EdgeColor','none','FaceColor','r')
  surf(X*0.005+COG_l(1,3),Y*0.005+COG_l(2,3),Z*0.005+COG_l(3,3),'EdgeColor','none','FaceColor','r')
  surf(X*0.01+COG(1),Y*0.01+COG(2),Z*0.01+COG(3),'EdgeColor','none','FaceColor','m')
  
  end
 %----------------------------------------------------------------------end