README for ray tracing triangles. by R. P. Futrelle, Northeastern U. 18 March 2005 (Quick overview to get you started adapting the code for your project) The four primary classes defined are: RTSimplestRaytrace.java TinyRayTrace.java RTGUI.java RTDrawer.java Two more are used only to represent data: Tri.java P3d.java The The main drive class is RTSimplestRaytrace, which is executed, after compilation, simply by: java RTSimplestRaytrace It defines a red triangle with vertices at the origin and vertices at 19 pixels on the x-axis and 19 pixels on the y-axis. It hands that to a tracing routine, doTrace in TinyRayTRace which modifies the array of black Color given to it. IT puts red colors in each x,y pixel location in which the triangle was hit by the ray. The ray is parallel to the z axis. RTSimplestRaytrace then give that array to an RTDrawer which is ready to display it when its JPanel is made visible. Then the GUI, RTGUI, is set up which includes both the RTDrawer and a JFrame. RTGUI simply lays out the screen and makes it visible. As soon as this occurs, paintComponent() in the RTDrawer goes through the Color array painting a pixel at a time on the screen. That's it.