CG:SKEELOGY
CG:SKEELOGY
CATEGORIES
   REELS
       + demo reels (2)
   PROJECTS
       + games (4)
       + VFX & animations (4)
   PROGRAMMING
       + simulations (8)
       + computer vision (4)
       + rigging & deformation (4)
       + computer graphics (3)
       + artificial intelligence (2)
       + game technologies (2)
   CG
       + rigs (7)
       + models (7)
       + effects & simulations (3)
   TUTORIALS
       + physics simulation (1)
   ME
       + honours & awards (8)
       + events (7)
       + updates (3)
FEATURED PROJECTS
Soft Body Tutorial: Program soft bodies in XNA!
Cloud Guardian: Shape the Orb to fix clouds!
Muskeelar: Muscle system for games
LATEST UPDATES
  + Now On Twitter   + CG:Skeelogy v1.1: The Web 2.0 Version   + Best Physics Knowledge Base Entry In Intel Havok Physics Contest!   + Community Voting Prize In Intel Havok Physics Contest   + Working at Double Negative in London
TAGS
ARCHIVES
 
 
 
CURRENTLY VIEWING
IK USING JACOBIAN MATRIX
A simple IK solver written in OpenGL to control a joint chain
DATE
TYPE
EFFORT
Apr 2007
CG Programming
Solo
IK Using Jacobian Matrix
@ programming > rigging & deformation
SECTION MENU
     + Run-Time Mesh Subdivision
     + Fats Simulation
     + IK Using Jacobian Matrix
     + Muskeelar

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 non-linearity.

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 non-linear 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.


Video showing the IK algorithm at work. End effector moves towards a green random point generated.

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 degree-of-freedom each) which can rotate around the y-axis for azimuth angle and rotate up/down for the elevation angle. This basically covers all orientations about the base. The three non-zero-length bone setup ensures that all points within the sphere can be reached, as opposed to a two-bone setup where some points cannot be reached.

Note: Scene setup by Neo Jiet Shern.

  • Share/Save/Bookmark
Tags: , ,

Related posts


Leave a comment:


Allows tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
CG:SKEELOGY
ABOUT ME
I have experience with physics simulation programming, character rigging and R&D on anatomical and deformable models. In my free time, I work on small personal projects such as casual games and tools development.
I am currently working at Double Negative Visual Effects in London.
MY OTHER SITES
SUBSCRIBE TO SITE
SHARE THIS SITE
Copyright © 2003-2009.
All works are original ones by Skeel, unless otherwise stated.