# Simple IK, analytic solver in 3D

This topic is 3423 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I am currently trying to implement a "simple" analytic IK solver to compute the position of a knee in a simple 2 bone system (Thigh / Calf). I have found many example of such solver in 2D on the Internet but nothing in 3D... For example the analytic case here: http://cose.math.bas.bg/Sci_Visualization/compAnim/animation/rick_parent/Modl.html I would like to stay away from more complex methods and numerical solvers (Jacobian, CCD...). My idea is actually a foot placement system, and I need IK to compute the new knee angle once I knew where the foot should be. Has anyone already seen this kind of thing with an example to understand how to move from a 2D to a 3D problem? Thanks.

##### Share on other sites

Oh, very sorry, didnt see the part about 3D.

Vector C will just be in 3d. The blue and red angles will be computed in the plane that makes up the 3 segements, which is a 2d problem then.

The purple angle will be result in polar angles, rather than a single angle from atan2. So you'll need a cartesian to polar conversion there.

That is if you want to use euler angles. You could just construct the pink angle as a matrix or quaternion, creating the transformation from the pelvic to the plane in which the blue and red angles lay.

Not very much different.

##### Share on other sites
Here's an example with source you might want to check out:

http://mrl.nyu.edu/~perlin/gdc/ik/
http://mrl.nyu.edu/~perlin/gdc/ik/ik.java.html

##### Share on other sites

Thank you both for your answers. The code from Ken Perlin will surely help. I think I'm going to use the same method, using the x axis as he does and then translate the results back to where my model is.

Thanks ;)

1. 1
2. 2
Rutin
23
3. 3
4. 4
5. 5
khawk
14

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633653
• Total Posts
3013160
×