Note on Raytracer Design
Hopefully, it will help you get started on the assignment 3.
can be found lots of other places too.)
GLUT Tutorial (A good
tutorial on how to use GLUT. It has most of the basic stuffs like scene setup,
keyboard/mouse interaction, menu, etc. )
NeHe's OpenGL Tutorial (Contain tons of
OpenGL examples. These examples demonstrate how to use certain OpenGL commands,
which can be very useful.)
Here is the sample code for
discussion in the second week.
The sample code for Mac OSx's XCODE is available
here (it's the modified version from
the GLUT example provided by Apple).
The sample will display a simple scene with a filled 2D circle moving around in the
circular path. This hopefully will give you some basic scene setup.
For Windows, the VC project file and the GLUT binary are provided, so it
should be straight forward to compile the example code.
For Mac OSX, the XCODE project file is provided, so it should be easy to run as well.
For Unix, we tried to make sure that the code compiled on the instructional X86 Solaris machines.
Before you run the executable, you will probably need to add additional run time library path.
In command line, before you run the executable, type:
We make no guarantees on the correctness of this code, so use at your own risk.
The modified sample code to draw a cube and a sphere and demonstrate
keyboard handling can be found here
Windows and Unix) or here (for
Mac OSX). Just replace the old cpp file with