/** Example program to test ray tracer * Simplest * @author: Phil Gage */ public class Example3 { /** Main program for example */ public static void main (String[] argv) { // Define and populate scene World world = new World(); // Define a light source world.add(new Light ( new Vector3 (-100.0, -100.0, -50.0), // XYZ direction new Color (1.0,1.0,1.0))); // RGB color // Define a red sphere object on Z axis world.add(new Sphere ( new Point (0.0, 0.0, 500.0), // XYZ center 100.0, // radius new Color (1.0, 0.0, 0.0))); // RGB color // Define a 320x200 camera, default view (0,0,1) along Z axis world.add (new CylindricalCamera (world, 320, 200)); // Perform ray tracing and write frame0.tga world.animate (); } }