Final Project - Math 155B - Student: Warren Mar

Comments

Inverse Kinematic Pool Game

Inverse Kinematics

The inverse kinematic algorithm uses the jacobian transpose. There are two degrees of free done in the shoulder and 1 for the elbow. Initially I wanted to create my own vector and matrix classes, because I did not like the way VrMath from RayTrace 2.0 was setup, but I had trouble with using accesors in operators, so I gave up and resorted to VrMath from RayTrace 2.0

How To Play

Move the cue stick around to line it up with the balls. Then grab onto the cue stick with the hand. When you're holding the cue stick, hit the bal.

Controls

q - quit
Esc - quit
arrow keys - rotate view
home/end - zoom in/out
g - grab the cue stick step by step
h - to hit the ball (only if hand is close enough)
1 - select joint 1
2 - select joint 2
3 - select joint 3
+/- - change angle of joint
r - reset geometry
v - reset view
Mouse - Moves around the cue Stick


The cue ball is in the middle and an arm is represented by 3 red spheres and triangles connecting them. These triangles are related to way the joint rotates. The mouse will move the stick around and pressing g multiple times will move the hand toward the stick.

List of figures

Default Scene

Scene
Positioned Scene
Scene

Problems

I had trouble with local and global coordinates. Using the OpenGL matrix stack did not help.
It is hard to choose how big the change in the angles of the joints should be. If they are chosen too large, the arm swings all over the place. If it is too small, then it takes a long time to reach the goal. As it is now, the IK is very slow near the goal.
Collisions are nonreal, since I did not implement intersection testing. The cue rotations are difficult when you change the view, since I not not change the plane of the vector of rotation.

Download

Download