
222 6. Computer animation
Start with the linkage configuration defined by the set of angles:
θ
1
, θ
2
, θ
3
...θ
n
(which we will write as Θ),
and end point located at P i.e. at coordinate (x, y)
Apply the steps below to move the end point towards its goal at P
g
(i.e. at :(x
g
, y
g
))
Step 1 :
Calculate the in c r emental step ∆X = P
g
− P
Step 2
Calculate J(θ
1
, θ
2
, θ
3
, ...θ
n
) (use the current valu es of θ
1
etc.)
Step 3 :
Find the inverse of J which we will call J
−
then:J
−
= J
T
(JJ
T
)
−1
(if J is a 2 × n ma tr ix J
−
is a n × 2 matrix)
Step 4 :
Test for a valid convergence of the iteration:
i f ( k(I − JJ
−
)∆Xk > ǫ ) the s tep towards the goal
the ∆X) is too large, so set ∆X =
∆X ...