Elements of Graphics: Assignment Five


Due Midnight, Tuesday Nov 4.

In this assignment you will extend the example java3d program TickTockCollision.java to add a tetrahedron revolving about the cube as it moves back and forth. The tetrahedron should have a base and height half the size of an edge of the cube. It should always point away from the cube (the base should face toward the cube) as it rotates, and it should maintain a distance equal to 1.5 times the length of the cube edge between the center of the cube and the center of the base of the tetrahedron. In addition, the tetrahedron should be rotating about its axis as it moves. The axis is a line containing the center point of the base of the tetrahedron and the apex of the tetrahedron. The rate of revolution should be once every two seconds. The rate of rotation about the axis of thet tetrahedron should be twice per second.

The files you should start with are:

TickTockCollision.java
CollisionDetector.java
Box.java
Tetrahedron.java

Turn in the assignment through the lab using turnin, with the usual README file, even though you won't run this in the lab. You should not turn in a copy of CollisionDetector.java since that will remain unmodified in this assignment. Note that this program is designed to run both as an applet in a browser and as a standalone java program. Try both. To use it as an applet, put TickTockCollision.html in the same directory with your .class file and point your browser at it.


Don Fussell