Ray-Tracing Applet
// The following Applet demonstrates a simple ray tracer with a
// mouse-based painting interface for the impatient and Mac owners
public class RayTrace extends Applet implements Runnable {
final static int CHUNKSIZE = 100;
Image screen;
Graphics gc; // for screen
Vector objectList;
Vector lightList;
Surface currentSurface;
Vector3D eye, lookat, up;
Vector3D Du, Dv, Vp;
float fov;
Color background;
int width, height;
|