function P = PxyzHip( q,L )

 l0 = L(1); l1 = L(2); l2 = L(3); l3 = L(4); l4 = L(5); 
 l5 = L(6); l5h = L(7); l5t = L(8); l6 = L(9);
 ang1 = q(1); ang2 = q(2); ang3 = q(3);

 %-- Anca/Anca ----------------------------------------------------------------
  xh =                 l2*sin(ang2)          +l3*sin(ang2+ang3);
  yh =   -l1*sin(ang1)-l2*sin(ang1)*cos(ang2)-l3*sin(ang1)*cos(ang2+ang3)-l4*sin(ang1)+l6/2;
  zh = l0+l1*cos(ang1)+l2*cos(ang1)*cos(ang2)+l3*cos(ang1)*cos(ang2+ang3)+l4*cos(ang1)+l5+l5h/2;
 %-----------------------------------------------------------------------------
  P = [ xh yh zh ];
 %--------------------------------------------------------------------------end
