CMP 161 -- Programming Assignment 3
Due date:
Midnight, WED, 2/21/2007
Objectives:
Learn and implement simple physics based animation.
Possibly Useful Links:
To Do:
-
Simulate a ball rolling down a terrain.
You just need to do one ball,
but do this in 3D.
Use the terrain rendering program from prog1
and just add the ``physics'' for the ball.
-
You don't need to do real physics.
But do explain the rules or formula used in
getting the ball to roll down the terrain in
a realistic fashion.
-
The key components of this assignment are:
(i) collision detection with terrain (possibly with
other balls if you're doing optional/bonus work with multiple balls),
and (ii) calculation of forces.
You can assume that the ball(s) is rigid and does not deform.
-
Required Items:
-
Allow the viewer to change viewpoint.
Use smooth shading for the ball.
-
Allow the user to modify ball parameters:
(i) size, (ii) weight, and (iii) initial position.
You don't need to worry about dropping the ball --
it just needs to be positions somewhere on the terrain.
This can be easily done by specifying an x,y position
and setting the ball at the height of that location.
Ball color can be fixed up front.
-
Dropping the ball onto the terrain,
or simulating the ball bouncing off the terrain
are not required. These are optional/bonus items
that you can add, time permitting.
-
Ensure that the ball does not penetrate through
the terrain.
Look underneath the terrain to see if the ball
is poking through or not.
-
Be sure to include a list of features,
assumptions, and description of rules/formula used
in rolling the ball down the terrain.
-
Some Optional/Bonus Items:
-
Support multiple balls, with ball-to-ball collisions
in addition to ball-to-terrain collisions.
-
Support dropping and bouncing ball(s).
-
Support non-rigid objects --
replace rigid ball with rubber ball.
-
Support non-spherical ``ball''.
Maybe have a wheel roll down the terrain instead,
or have Barney roll down the hill, or ...
Items To Submit:
-
Html page with description, images and movies of your project.
Make sure your links are all local
and relative to your submit directory.
-
Makefile, code, README file, user guide.
-
You can submit your own test data files, or config files for your code.
However,
do not submit data files that we have provided.
Grading:
To expedite grading, all submitted programs will be graded on Friday,
February 23 from 11am to 2 pm.
Be sure to demonstrate your program to our grader during this period.
If for some reason, you cannot make it during this time, be sure
to contact Alisa to make alternate arrangements before XXX 2/23/2007.
This program nominally accounts for 5% of your final grade. We must
be able to compile/test your code. Make sure that code and accompanying
make/project files, etc. must be tested for successful compilation at least on
the PCs in the lab. For PC's, we will be using Visual C++. Also be sure to
include a README in your submission as to which platform to use.
Programs turned in at least a full day early will earn 1% bonus credit. Late
programs will be charged 1% late points. In addition, late programs will not
be accepted 24 hours past due date. Late programs and reports will not be
accepted for the final project. The bonus credits may be accumulated up to a
total of 50% toward program and final project credits. Programs are graded 80%
for functionality and correctness and 20% for style, readability,
documentation/writeup, and efficiency. Additional points may also be earned
for extra features.
Submission:
Create and submit a subdirectory called "prog3". It should contain
all the files you have to make your program compile/run. Include the other
items to be submitted in this directory as well. Submission must be done using
the submit utility from CATS.
-
To submit use: submit cmps161-ap.w07 prog3 files
-
To verify submission use: peek cmps161-ap.w07 prog3
These commands should work from any cats machine, but if there is a problem
try from unix.ic.
Last modified
Tuesday, 22-Jan-2019 09:42:16 PST.