Programming Assignment 2

Due Monday, February 28 at noon

This assignment will introduce you to 3D modeling and transformations in OpenGL.  You will develop a program that allows the user to control a simulated human hand.

This assignment is challenging.  Start programming early.

Get Some Files

Some basic functions and the hand simulator's main program are provided for you. So, before you begin programming, you will need to download source files:

Java programming

C/C++ programming

This source code allows the shaded display of a simple ellipsoidal hand model.  You are expected to complete the program by modifying and extending the source code to model a hand with all five fingers. There are comments in the source files that can help guide you in writing your own subroutines.  You can also develop your own functions, and use additional source files for your code if you like.

Run the Example Hand Animation Tool

An example of a fully functioning hand animation tool is available here. When asked how to handle this file, choose the java web start program
that came with the java jdk downloaded.

Program Interface

The user interface to the program is provided through mouse buttons and keyboard:

The Code You Write

You are expected to write a program that will simulate a 3D hand
  1. Use OpenGL to construct a 3D hand model from cylinders and/or ellipsoids.   The model need not be anatomically accurate.  You can model the palm as a single ellipsoid, assume the thumb has two joints, and the other four fingers have three joints each.  You can also assume that each joint has two angular degrees of freedom.
  2. Write code that enables the user to change the angles at each finger joint via the keyboard interface provided.
  3. Limit the angles at each joint within reasonable ranges so that fingers don't bend in unnatural ways!
  4. Add a keyboard command 'C' that "clears" the hand angle state, resetting the hand to standard position: hand posed in the "stop" pose. 
  5. Add a keyboard command 'T' that cycles through test cases shown in photographs below: "peace sign,"  "fist," "hang ten," "spread," and "claw."

Required for CS680 Students

In addition to the hand, model the upper-arm, lower-arm, and the wrist.   Be sure to model proper rotations at the shoulder and elbow.

Extra Credit

For extra credit, use texture mapping to apply a skin texture to the model. 

Test Cases

As mentioned above, you are to add a keyboard input 'T' which cycles through test cases:




"stop"
"peace sign"
"fist"



"hang ten"
"spread"
"claw"

Demo

Part of your grade for this programming assignment will be based on your giving a short demo (5 minutes) in the CS instruction laboratory. You will be expected to talk about how your program works, and we will see how well your program performs on the aforementioned test cases, as well as some additional, surprise test examples. Demos will be scheduled during the lab section meetings, after the due date.   You will be asked to sign up for a demo slot on a signup sheet that will be circulated in class before the assignment due date.

Source Code Submission

Your program's source files are to be submitted electronically. Use the gsubmit program on the CS cluster.

The code you submit should conform with the program assignment guidelines.

Grading (Out of 100 points)

CS480

3D hand model constructed of ellipsoids 25 points
Proper rotation at the joints 25 points
Limit rotation so that fingers do not bend in unnatural ways 10 points
Test cases work properly 30 points
Programming style  10 points
Texture mapping 10 extra credit 

CS680

3D hand model constructed of ellipsoids 20 points
Proper rotation at the joints 20 points
Limit rotation so that fingers do not bend in unnatural ways 10 points
Test cases work properly, even when arm moves 30 points
Arm angles work properly, attached to hand 20 points 
Texture mapping 10 extra credit

Late Assignment Policy

Late programming projects and problem sets will be levied a late penalty of 10% per day (up to three days). After three days, no credit will be given.

Collaboration/Academic Honesty

All undergraduate course participants must adhere to the CAS Academic Conduct Code.

All graduate student course participants must adhere to the GRS Academic Conduct Code.

All instances of academic dishonesty will be reported to the academic conduct committee.