CMP 161 -- Programming Assignment 4
Due date:
Midnight, THU, 3/12/2009
Objectives:
Create simple physically based animations.
Useful Links:
To Do:
-
For this assignment, you will simulation 3 physical behaviors:
-
Dropping a ball and watch it bounce.
The
second equation should be useful.
-
Firing a canon ball.
The same equation used above is useful, but add an initial velocity
with horizontal component.
See
projectile motion for more info.
-
``Roll'' a ball down an inclined plane
(For this, you can assume there's no friction and
the ball is sliding down and not actually rolling and
you don't need to worry about moment of inertia).
Newton's second law of motion should come in handy here.
This
high school project report should be useful too.
-
You will need to do the physical simulation on your own.
You cannot use external packages for this package,
although you are free to examine those packages.
-
Your GUI should allow the user to select any of these 3 simulations.
For each one, provide appropriate GUI (up to you, but must have at
least one user adjustable parameter).
For example, height of ball or how ``bouncy'' the ball is;
the initial velocity of the cannon ball, the angle of the cannon;
the slope of the inclined plane, etc.
-
Your program should also render the results (stills are needed)
and create a short animation clip (also needed for your html report).
The program can be in 2D.
-
Optional bonus options:
-
You can combine all 3 elements:
e.g. allow a user to fire a canon ball onto a hilly slope
where the ball bounces and ``rolls'' down the slope.
-
Combine 2 elements in 3D:
change the incline plane into a terrain --
watch the ball be dropped onto the terrain, bounced, and slide
down the terrain.
-
Add interactive elements in 2D --
similar to
crayola physics
Note that your final project is worth morth points
than this program. So, allocate your time wisely.
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.
Grading:
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 "prog4". 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.w09 prog4 files
-
To verify submission use: peek cmps161-ap.w09 prog4
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.