splash

Programming Project Five: Choose an Option

Due Wednesday, June 01st, 5pm

-- Steve Rotenberg

Option 1: Inverse Kinematics

Implement an inverse kinematics demo that has a single chain of 5 or more links. The links can be 1 or more DOF rotational joints, but they must be arranged so that the chain can be manipulated in 3D, not just 2D. There should be keyboard (or UI) controls that allow the user to position the goal in x, y, and z, and displays the goal in 3D. The IK chain should touch the goal position with the end of the chain or reach in the correct direction if it is out of range.

I suggest using the Jacobian transpose approach as it is the simplest and does not require any explicit construction of a Jacobian matrix. It operates one joint at a time and is the most intuitive.

Grading

This project is worth 13 points:

2: Chain of links with rotational joints
3: User control over 3D goal position and display of 3D goal
2: IK doing something
6: IK working correctly
13: Total

Option 2: SPH (Particle Based Fluid Simulation)

Implement a basic SPH simulation with a limited number of particles (at least a few hundred). Choose a physics algorithm from one of the ones in the paper. Display the particles as points, or as small spheres, or something. You don’t need to implement any spatial data structures or fancy rendering- just get the basic physics working with as many particles as you can get running at a reasonable speed. The demo should have a reset key or possibly several keys that set up different initial conditions.

The particles should be constrained to a box to keep it under control, but SPH requires that the walls of the box act as a spring-like repulsion force, not just a hard boundary.

I suggest doing a demo where a blob of particles initializes above some ground plane and drops to the ground. You should see something resembling a splash.

Grading

This project is worth 13 points:

2: Particle system data structures & basic rendering
2: Initial conditions set up (a blob above the ground or similar)
3: Basic gravity & ground plane and wall plane repulsion fields
6: SPH physics working correctly
13: Total

Option 3: Rigid Body Dynamics

Write a program that simulates a single rigid body (like a box) falling and colliding with a ground plane. It should have some initial linear and angular momentum (maybe randomized). The rigid body should collide properly but does not need to come to rest perfectly or collide with other rigid bodies. The program should have a reset key and several keys that select the initial shape of the box. We should be able to select boxes with different dimensions such as cubes (1x1x1), long box (1x1x5), flat box (1x5x5), etc. to show the appropriate behaviors. You can optionally do other shapes such as cylinders, spheres, etc.

Grading

This project is worth 13 points:

2: Basic rigid body data structures, box initialization, & box rendering
2: User controls to reset or select different starting conditions
4: Rigid body motion working (with correct tumbling behavior)
2: Something happening when the rigid body hits the ground plane
3: Ground plane collisions working correctly
13: Total

Option 4: Locomotion

Write a program that allows the user to interactively drive a 4 or 6 legged creature (can be made of boxes) around on flat ground, and uses a procedural walking algorithm to control the legs. The legs can use the simple analytical IK technique from the lecture. The creature should be able to choose from at least two different gaits. The legs should come to rest reasonably when the creature is stopped.

The control can be very simple- such as using the up, down, left, & right arrow keys. The creature should have a max forward/reverse speed and a max turning speed and should also have some acceleration/deceleration on the motion to keep the legs under control.

Grading

This project is worth 13 points:

3: Basic creature skeleton set up with appropriate joints
3: Interactive controls for creature with smooth acceleration/deceleration.
3: Analytical IK working for legs
4: Walking algorithm working
13: Total

Option 5: Quaternion Interpolation

Make a program that displays 5 ‘key’ boxes in a row and allows the user to rotate each box arbitrarily around x, y, and z using keyboard controls or a GUI. Then, a key should turn on the interpolation which will show a box smoothly passing through the set of 5 key boxes, by using quaternion interpolation. It should allow the user to select between linear and Catmull-Rom interpolation modes, where the linear mode just ‘slerps’ directly between each key and the Catmull-Rom mode uses the sequence of slerp operations described on page 379 of Graphics Gems II to generate a smoother rotation sequence. In either case, the rotations should always go the ‘short way’. Note that the Catmull-Rom function takes 4 quaternions and generates a smooth interpolation between the second and third, so must be used in the correct sequence to go from keys 1 to 5. To handle the border cases, just double the first or last quaternion, i.e., the first segment would look like this: CatmullRom(q0,q0,q1,q2), the second like this CatmullRom(q0,q1,q2,q3), then CatmullRom(q1,q2,q3,q4), etc.

I suggest making a quaternion class with functions for:

If you do all of the key box rotations with quaternions, then you only need to convert to a matrix to render, and you should never need to convert from a matrix.

Grading

This project is worth 13 points:

2: Display some boxes
2: User controls to select and rotate each of the key boxes
4: Animating box that does a direct slerp between key boxes
5: Catmull-Rom interpolation
13: Total

Option 6: Own Project

You can choose something else, but please come talk to me first.