Analytic IK:
It's fairly simple, just like how it was derived in class. Given the lengths of the two joints, it is possible to directly calculate the angles needed to achieve a target position. In my application, it only works on the first two joints and will ignore the rest.Cyclic-Coordinate Descent:
This works by figuring out the vector between the base of the joint and the end position and using that to figure out the amount of and direction of rotation to reach the target.
This is done for each joint, started from the end, and working back to the root.
In my application, CCD works quite well until getting to 5 joints, where it starts to break for unknown reasons. In the video I show several movements.
I used this website as a reference: http://www.darwin3d.com/gdm1998.htm
Download:
https://drive.google.com/open?id=0B6PLHdK7QrvjckdrUWhWdUhnbkU
Controls:
Arrow keys to move target position. Denoted by the small cube.
A to decrease the number of joints
D to increase the number of joints
S to switch between analytic and cyclic-coordinate descent modes.
No comments:
Post a Comment