| Constraint Relaxation IK in 2D - Implementing for Higher Dimensions |
|
|
| Monday, 13 April 2009 00:00 | |||||||||
Page 4 of 6
Implementing for Higher DimensionsOne of the benefits to using constraint relaxation is that the algorithm barely changes when using it in higher dimensions. The constraint relaxation loop described didn't even specify a dimension for the vectors it was using. It just said when to scale, add, or use the dot product. All of these operations are easily performed on vectors of any dimension. Feel free to go crazy and solve some n-dimensional IK problem.
The only part of the algorithm that really changes when raising the dimension is the method of mapping the world space positions back onto your original bone chain. For example, if you are working in three dimensional space, your bone chain orientations are probably described with matrices or quaternions instead of the single angle used in my two dimensional example. When mapping the resulting line segments from the relaxation process back onto three dimensional joints, there are an infinite number of options. The line segment only constrains where one of the joint's axes should be pointed. The remaining two axes can be spun around the constrained axis in any way you want. One option for choosing an optimal solution is to construct a parent space orientation as close as possible to the joint's original parent space orientation before the IK was applied.
|
|||||||||
| Last Updated ( Sunday, 02 May 2010 06:30 ) | |||||||||


