function B = BallCoordDK( q,L )

%-- Vector comprimentos: L = [l0 l1 l2 l3 l4 lt_L lt_W lt_H];
 l0 = L(1); l1 = L(2); l2 = L(3); l3 = L(4); lt_h = L(8);

% %-- Parametros de Denavit-Hartenberg -------------------------------------------------
  xB = cos(q(1))*(l3+(l0+lt_h+l1)*cos(q(2)))/sin(q(2)); 
  yB = sin(q(1))*(l3+(l0+lt_h+l1)*cos(q(2)))/sin(q(2)); 
  
  B = [xB ; yB];
 %-----------------------------------------------------------------------------------end
