\(\(Clear[t1, \ t2, \ t3]; 
l1\  = \ 1.0; 
l2\  = \ 1.0; 

    l3\  = \ 1.0; 
tfinal\  = \ 5.99; 

    J[t_]\ \  := 
      \ {{\(-l1\)\ Sin[t1[t]]\  - \ l2\ Sin[t1[t]\  + \ t2[t]]\  - \ 

            \ \ \ \ \ \ \ \ l3\ Sin[t1[t]\  + \ t2[t]\  + \ t3[t]], \ 
          \(-l2\)\ Sin[t1[t]\  + \ t2[t]]\  - \ 
            l3\ Sin[t1[t]\  + \ t2[t]\  + \ t3[t]], \ 
          \(-l3\)\ 
\ \ \ \ \ \ \ \ Sin[t1[t]\  + \ t2[t]\  + \ t3[t]]}, 
        \ {
\ \ \ \ \ \ 
          l1\ Cos[t1[t]]\  + \ l2\ Cos[t1[t]\  + \ t2[t]]\  + \ 
            l3\ Cos[t1[t]\  + \ t2[t]\  + \ t3[t]], \ 
\ \ \ \ \ \ 
          l2\ Cos[t1[t]\  + \ t2[t]]\  + \ 
            l3\ Cos[t1[t]\  + \ t2[t]\  + \ t3[t]], \ 
          l3\ Cos[t1[t]\  + \ t2[t]\  + \ t3[t]]}}; 

xd\  = \ \(-1.0\); 

    yd\  = \ 0.0; 


    eqn[t_]\  := \ 
      Transpose[J[t]]\  . \ Inverse[J[t]\  . \ Transpose[J[t]]]\  . 
        \ {xd, \ yd}; 


    soln\  = \ 
      NDSolve[{\(t1'\)[t]\  == \ \(eqn[t]\)[\([1]\)], \ 
          \(t2'\)[t]\  == \ \(eqn[t]\)[\([2]\)], \ 
          \(t3'\)[t]\  == \ \(eqn[t]\)[\([3]\)], \ t1[0]\  == \ 0.0, \ 

          \ \ \ \ \ \ t2[0]\  == \ 0.0, \ t3[0]\  == \ 0.01}, 
        \ {t1, \ t2, \ t3}, \ {t, \ 0, \ tfinal}]; 


    t1[t_]\  := \ \(Evaluate[t1 /. soln[\([1]\)]]\)[t]; 
    t2[t_]\  := \ \(Evaluate[t2 /. soln[\([1]\)]]\)[t]; 
    t3[t_]\  := \ \(Evaluate[t3 /. soln[\([1]\)]]\)[t]; 


    mag\  = \ Plot[Sqrt[\(t1'\)[t]^2\  + \ \(t2'\)[t]^2\  + \ \(t3'\)[t]^2], 
        \ {t, \ 0, \ tfinal}]; 

\)\)

\(g\  = \ {}; 
count\  = \ 1; 

    Do[
		t1\  = \ \(Evaluate[t1 /. soln[\([1]\)]]\)[t]; 
		
      t2\  = \ \(Evaluate[t2\  /. soln[\([1]\)]]\)[t]; 
		
      t3\  = \ \(Evaluate[t3\  /. soln[\([1]\)]]\)[t]; 
	orig\  = \ {0, 0}; 
      
	p1\  = \ {l1\ Cos[t1], \ l1\ Sin[t1]}; 
	
      p2\  = \ {l1\ Cos[t1]\  + \ l2\ Cos[t1\  + \ t2], \ 
          l1\ Sin[t1]\ \  + \ l2\ Sin[t1\  + \ t2]}; 
	
      p3\  = \ {
          l1\ Cos[t1]\  + \ l2\ Cos[t1\  + \ t2]\  + \ 
            l3\ Cos[t1\  + \ t2\  + \ t3], \ 
          l1\ Sin[t1]\  + \ l2\ Sin[t1\  + \ t2]\  + \ 
            l3\ Sin[t1\  + \ t2\  + \ t3]}; 
	
      If[count\  >= \ 10, 
	
        g\  = \ Append[g, \ 
            Graphics[{RGBColor[1, 0, 0], \ Line[{orig, p1, p2, p3}]}]]; 
		
        count\  = \ 0]; 
	\(count++\), 
	{t, \ 0, \ tfinal, \ 0.01}]; 
    \)

ShowAnimation[g,  PlotRange -> {{-3, 3}, {-3, 3}},  
      Axes -> True]