CMPS160, Fall 2013, Section 01: Lab 2 Animated Animal

Lab 2- Robotic Animals:

Description

In this lab, you will create a robotic animal and animate it. The specifics of what you need to implement are listed in the criteria section below. This lab is out of 75 grade points, with a maximum possible score of 80/75.

Lab 2 Starter Files

Useful OGL Functions

  • glColor()
  • glRotatef()
  • glScalef()
  • glTranslatef()
  • (Comes in solid or wire)
  • glutSolidCube()
  • glutSolidSphere()
  • glutSolidCone()
  • glBegin()
  • glEnd()
  • glPushMatrix()
  • glPopMatrix()

 

Tips & Guidelines

  • Start by making separate functions for the different body parts, such as the body, head, arms, legs, tail. This will make the animation hierarchy easier to manage, and to add additional body parts later. For example, a left arm is a right arm translated/rotated in different directions.
  • I would suggest keeping all primitives unit length then scaling it to the desired length, so you if needed re-scaling can be easily done with a change one variable only rather than having to search through to change all parts relative to the hierarchy. This also makes positioning much simpler.
  • After you know each body part works, create the whole animal: add and position the limbs, set the correct rotation direction, scale, etc.
  • Limbs: see the robot arm example in the resources
  • Tail: use loops to gradually increment offset for curling, decrement scaling for tapering, etc.
  • Animation: key framing is recommended, where you interpolate the object in-between positions based on a set of key positions or times.
  • Order of transformation matters: translating the rotating is different from rotating then translating.
  • Planning the animal on graph paper helps keep track of the structure
  • # of glPushMatrix() = # of glPopMatrix()

 

Resources

Other Notes

Be creative! The more geometric detail and/or color you add, your animal will enter a heightened state of awesomeness.

Criteria: (For Grade)

ValueDescription
5 Program does not crash
5 Animal is made of geometric primitives (no imported models)
5 A head, with distinguishable features (i.e. eyes)
5 Animal moves in a logical, hierarchical way
5 Has limbs with two (or more) segments
10 First level of heirarchy can be rotated individually under user control via mouse or keyboard (e.g. Shoulder)
5 Second level of heirarchy can be rotated individually under user control via mouse or keyboard (e.g. Elbow)
5 Minimum of 4 limbs, with multiple joints
5 Controls to turn animation on/off
5 A multi-jointed segmented body part that can move (ears, tail, etc)
5 More than one color
10 Animation is complex, with parts that move at different speeds (walking, jumping, moving in circles, etc.)
5 Display a help message about what the mouse and/or keyboard do
5 Give the user an option to control number of copies of your animal, so that instead of one rabbit, you have several identical rabbits (they can all animate in sync, but they should all be visible and non-overlapping)

Attachments

  • lab2.zip, application/zip, 2,329 bytes