6.837: PROJECT 4
The program has been developed using the JDK1.1 and definitely displays output on the Athena appletviewer and Netscape Communicator4.02.
The world axes color code is : X is Red, Y is Green and Z is Blue. The width and height of the raster are BOTH equal to 500. If they are unequal, then angles are not preserved in the canonical-to-display transformation.
I have used my triangle renderer, which created streaks while rendering some triangles, because I am more familiar with it. This is seen in this project also.The rendering of the cube is slow when the object is very close to eye because of z-buffer manipulation. I have included a file with 3 triangles that demonstrates z-buffer, backface culling and clipping. This renders fast.
Normals of the triangle can be found at any stage in the pipeline with the getNormal() method in Triangle3D.class.
The source code is here .
Project4 Applet
Here is the output of my program: