Homework 5: A Moving Scene

Short Description:

Write a program that displays multiple animated wire mesh objects.

This assignment is worth 20 points.

Goals

When you finish this homework, you should

Formal Description

Part 1, SceneObject

In the last assignment you created a javascript class that holds a model with points and barycentric coordinates. You have been given a ModelDisplay class that can display one of these models. Your first task is to create a SceneObject class which can use these classes to display instances of a model at multiple locations.

The SceneObject class should support the following methods

We may add methods to this list in the future.

The SceneObject maintains a stack of transformation matrices. The matrix on the bottom of the stack is applied to the point, then the next matrix and so on. The result of

obj.Push(A);
obj.Push(B);
obj.Push(C);
would be the transformation matrix T = C×B×A.

Do not recalculate this matrix every time display is called. I had a member variable, transform, which contained the current composition of transformation matrices. When a matrix was pushed or popped, this local variable was recalculated.

Please name your implementation file sceneObject.js, your class SceneObject and make sure your function names are correct. I will test your class separately.

Your class may rely on the canvas holding two uniform locations

My code included something like:
     gl.uniform4fv(canvas.edgeColorPos, ...
     gl.uniformMatrix4fv(canvas.mat1Pos,  ...

Part 2, Make a scene

Using this newly created object, build a scene. This scene should consist of four parts
  1. in the upper left hand corner of the screen should be an object that changes colors.
  2. In the upper right hand corner of the screen is an object that is following a path in this area of the screen.
  3. In the lower right corner should be a non-symmetric object that can be rotated.
  4. The lower left corner is up to you. There should be at least one model present and it should have some form of animation. The animation must be documented on the web page.
Please do not disable the x-X, y-Y, z-Z rotations in the default file.

Documentation

Your interface should built in a html file. This file should contain documentation discussing the project, including information such as Please use relative references to your code in the html file. This will allow me to extract the file in my local environment.

Discussion

Submission

When you have finished your assignment, please submit a tar file containing all files needed for this project. Please do not post your project on line until after grades have been assigned.