
Inverse kinematics is a form of kinematics where we define a position for the end effector and the joints in the joint chain gets rotated such that the end effector reaches the desired position. This is generally hard to solve due to its nonlinearity. The IK that I calculated in this program is done using Jacobian matrix J(θ) in the equation dX = J(θ) dθ. This is an approximation and iterative approach to converge on the solution, which is an expensive but general solution to IK problems. It uses the idea of derivatives to approximate a local linear solution to the generally nonlinear IK problem. In this OpenGL demo, the user can press the spacebar to generate a random point in space. This point is calculated using spherical coordinates to ensure that it lies within the top hemisphere of radius L, where L is the length of the joint chain, so that the end effector can reach it. The empirical results that I have obtained are pretty decent since the end effector is able to move to desired position fairly quickly within a certain positional threshold. Note that the video above is playing at approximately 3 times the normal speed. The joint chain that is set up is one which is able to reach any point in a sphere of radius L, where L is the length of the joint chain. It has a base (of two joints with 1 degreeoffreedom each) which can rotate around the yaxis for azimuth angle and rotate up/down for the elevation angle. This basically covers all orientations about the base. The three nonzerolength bone setup ensures that all points within the sphere can be reached, as opposed to a twobone setup where some points cannot be reached. Note: Scene setup by Neo Jiet Shern. 
Copyright © 20032018 Skeel Lee. All works are original ones by Skeel, unless otherwise stated.

Hello Skeel,
Would it possible for you to share the code for the Inverse Kinematics demo?
Thanks,
nitin
Hi Nitin, unfortunately most of my old stuff are gone now