function AnimateMotion( Q_l,Q_r,L )
%__________________________________________________________________________
% in_args: t, time vector
%          F, function to estimate the derivative
% out_args: dF, first derivative
%          ddF, second derivative
%
global P_trace_l P_trace_r
% Compute body coordinates: LEFT LEG
 P_link_l = DirKin_4dof(Q_l,L,+1);
 P_trace_l = [P_trace_l P_link_l(:,end)];
 [P_joint_l,P_tool_l] = BodyCoordinates( Q_l,L,+1 );
% Compute body coordinates: RIGHT LEG
 P_link_r = DirKin_4dof(Q_r,L,-1);                   
 P_trace_r = [P_trace_r P_link_r(:,end)];                   
 [P_joint_r,P_tool_r] = BodyCoordinates( Q_r,L,-1 ); 
% Update robot configuration 
 CreateWorldBodies( P_link_l,P_link_r,P_joint_l,P_joint_r,...
                                 P_tool_l,P_tool_r,P_trace_l,P_trace_r,L );
%__________________________________________________________________________
end

