Simple Inverse Kinematics


I have been looking for a while with interest at how inverse kinematics works, on Wikipedia I found this page regarding the Law of cosines which sounds interesting, although looks overly complicated.

Other methods to take in consideration are the Cyclic-Coordinate Descent (CCD) solution and a Jacobian matrix iterative solution.

I have been able to determine the exact position of multiple joints using a mix of those, but the resulting algorithm looks ugly at least.

So while I am looking to find a cute one enjoy this piece of code to calculate IK on 2 joints. :)

Leave a comment

Your email address will not be published. Required fields are marked *