inverse kinematics


Project Overview

My final project is an interactive inverse kinematics solver, which can generate simple animations by interpolating poses created manually by the user, or automatically through inverse kinematics. I used a variation of the cyclic coordinate descent algorithm to iteratively improve the parameters of the joints, gradually converging on the best solution given a certain set of constraints. My project can solve joint structures with arbitrary branching at each socket (only outward branching, joints cannot reconnect further down in the tree), and both revolute (rotational), and prismatic (translational) joints. An example of a structure incorporating all of these features is shown below.

I implemented my project in Haskell, a functional programming language, because I noticed that many of the projects we have done in the past were suited nicely toward it, because they are mainly computation based without side effects, and also as a personal challenge. I used Haskell bindings for Gtk+, a common widget toolkit, and cairo to render to the canvas area. There are two major components to my project; the main canvas area where the user can manipulate a branching structure of joints, and the timeline tab where the user can create an animation and render it, or play it back.

Pose Manipulation

In the main canvas area, the user can configure the joint parameters of the structure with the mouse, and add or remove target points by double left or right clicking. The inverse kinematics problem can then be solved by either finding a fixed point of the CCD function, or just performing one step.

Pose Animation

In order to create animations, I created a timeline tab, which allows the user to set different key frames from a list of saved poses. Poses are then interpolated between set key frames, generating a smooth animation. Also, a user can create a key frame pose from an interpolated, to perform fine adjustments during the course of animating.

After the key frames are generated, the user can play back the animation directly, or, once satisfied, they can render the animation frames to PNG images, which can be encoded to video later.


Comprehensive video demonstrating nearly all of my features:

CS184 Final Project - Inverse Kinematics Solver from Michael Forney on Vimeo.

Animation generated during the demonstration video:

CS184 Final Project - Sample Animation from Michael Forney on Vimeo.

Demonstration of simple inverse kinematics solving:

CS184 Final Project - Simple Solving from Michael Forney on Vimeo.

Animation of a humanoid running, created from still frames of a man running:

CS184 Final Project - Running Animation from Michael Forney on Vimeo.


Main Interface


This is the main user interface for my project. It shows the main canvas area for manipulating the joint structure, and using inverse kinematics to set desired end points for end effectors.



This is the timeline editor for my project. It allows the user to add keyframes in the timeline through a list of saved poses. The bottom slider moves the current frame, showing the animation in progress. The play button will play back the animation within the application, or you can render it to a series of PNG images which can be converted to a video later.

Valid XHTML 1.0 StrictValid CSS!
Generated on Thu, 12 Dec 2013 20:28:12 UTC