Program 3
-
A Movie
Abstract
For this problem you will produce "movies".
This will show some techniques to address motion and some of the
problems it creates.
Part of the movie will show some objects moving relative each other.
You will need to pre-program the movements.
You many need to hand build transformation matrixes.
Outline
First story board a movie. Translate the movements into a sequence of
transformation function calls or matrices.
Write code to display the objects and change them over time.
Show the movie and then show the movie staying on the time line.
Goals
A goal of this project is to get you to understand the
transformation coordinate system.
Another goal is allow you to build dynamic images rather than just a
static image.
Another goal is understand some of the distinction between building an
image and building a changing image.
Objectives
You will be able to able to read and build transformation matrices.
You will be able to translate a sequence of events into a movie.
You will be able to address the concept of a time line translated
into multiple separate events.
Prerequisite Background
You need to be exposed to transformation operations and transformational
matrices.
You need to be able to write basic drawing programs in OpenGL.
You need to be able to write one or more callback routines.
Content
Write a program to produce three movies. These can be separate walls or
all together.
The three movies are:
- sequence of images
- programmed movement (of at least 3 objects)
- an object changing over time
The sequence of images,
is just that, a movie created by showing a number of frames over
time.
This is simular to a gif movie. You could get your data from a
gif movie, hand drawn images, video capture etc.
Some of the games have nice effect they do. To give the effect of moving
into an area, they pick a point on the image. Then each step, they move the
sides of the image some percent.
That is they use a smaller and smaller part of the image each step and display
this portion as the full scale image.
This would be acceptable for the assignment.
If you do this with just the one image, please make it look good.
The programmed movement is to have at least three objects moving around.
You can have the camera as one of the objects.
You are to create the movements
by creating and applying a sequence of transformation matrixes.
Each matrix is to take the object from the old location to the new location.
If you can get OpenGL to do the work, that is fine. If not, you will
need to handle the matrices and the calculations.
This would require you get the old matrix and update it with the new parts to
show the next image in the movie.
You are to include at least translation and rotation.
The object changing is to change dimensions, properties (such as color)
and possibly actual shape.
You do not have to change the underlying shape.
However, a more interesting effect is to "morph" one item into another.
A simple way to do this is to have the points for both objects. Then
have the locations for each point in the two objects.
Now use the parametric form for the line and interpolate from one
object to the other some percent at a time.
You also should have a time line for the movie.
There is to be two modes for running the movie, one where it shows at its own
speed and one where you try to stay on the correct time line.
Posttest
After doing this programming assignment, you should be able to address
problems such as:
Write a program to show a "dog fight" between two planes.
Why does it make sense for a graphic system to have a transformation matrix attached
to each object/agent?