function  J = Jacobian( 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);

%-- Tipo de planeamento ------------------------------------------------------------
 J(1,1) = -sin(q(1))*(l3+(l0+lt_h+l1)*cos(q(2)))/sin(q(2));
 J(1,2) = -cos(q(1))*(l3*cos(q(2))+l0+lt_h+l1)/sin(q(2))^2;
 
 J(2,1) =  cos(q(1))*(l3+(l0+lt_h+l1)*cos(q(2)))/sin(q(2));
 J(2,2) = -sin(q(1))*(l3*cos(q(2))+l0+lt_h+l1)/sin(q(2))^2;