The objective of this project was twofold: First we had to implement refraction so that light rays could pass through objects and bounce all around, etc. Second, we had to develop our own primitive in addition to the given (and mighty simple!) sphere.
On this second objective, I was a little too ambitious perhaps. I tried to implement a cylinder/cone object, define by two endpoints and two radii. This way, depending on the radii chosen, one could have a cone (one radius = 0), a cylinder (both radii equal) or a truncated cone. As it stands now, my cylinder/cone object is still not quite up to par, though every once in a while we get something nice, if not simply weird...
In addition to the RayTrace.java file we were given to use and adapt, I brought in (and altered for my purposes) some of the objects I'd written for previous projects. These included: Matrix3D, PlaneEqn, Point3D and Vertex3D. Also, just so you know, I pulled Vector3D out of RayTrace so I could use it my other objects.
The usual caveats for Netscape, etc. exist -- using appletviewer on an Ultra 10 machine works really well... I couldn't get even Netscape 4.5b2 to work!
The folder containing my source code and classes is here. My documentation for this project is here. ...