Linear Algebra Review
Turn-in instructions
The instructions for how to use the turn-in program are here.
Resources
- Ray-Tracing Handout
- C++ Crash Course
- Nate Robbins' OpenGL tutors. My absolute favorite tutorials for understanding transformations, projections, lighting, and shape primitives in OpenGL.
- SIGGRAPH 2001 Course notes on OpenGL. A good, short course on OpenGL and GLUT.
- Red Book
(This can be found lots of other places too.)
- GLUT Tutorial (A good
tutorial on how to use GLUT. It has most of the basic stuff 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.)
- Note on Raytracer Design.
Hopefully, it will help you get started on assignment 3.
- Object Intersection Methods.
Many strategies for intersecting on object (e.g. a ray) with another object (e.g. a sphere, etc).
- Reflection and Transmission notes.
- Conversion from a rotation matrix to Euler angles, Mathematica notebook and PDF.
- Ray tracer Implementation Journal
- Fall 2006 Midterm
- Fall 2008 Midterm
- Bezier surface handout
- BSP Trees Worksheet
- Splines Worksheet and solutions
- Subdivision Worksheet and solutions
- Inverse Kinematics Handout and solutions
- Viewing and Camera Control in OpenGL
Old Exam papers
Software
- MSDNAA for Berkeley EECS Students. Download microsoft products for free.
- DreamSpark, download free microsoft development tools.
Sample OpenGL Code
- Here is the OpenGL example code #1 for
Windows / Unix / Linux / Mac OS X. This first sample will open a window and use OpenGL to draw a pair of polygons.
- Here is the OpenGL example code #2 for
Windows / Unix / Linux / Mac OS X. This second sample will display a simple scene with a filled 2D circle moving around in a 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 Unix, we tried to make sure that the code compiled (using "make") 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:
export LD_LIBRARY_PATH="/usr/sww/pkg/Mesa/lib:/usr/lib:/usr/sww/lib"
-
For Mac OSX, you should use make with the
makefile.osx
, e.g., "make -f makefile.osx
". If you're using a G4, you need to change the line that starts with MACOPTS
to include mcpu=G4
at the end.
- An alternate starting point (that includes lighting) from the redbook can be found here.
-
We make no guarantees on the correctness of this code; use it at your own risk!
Useful Libraries
FreeImage is especially useful for image output. Find a guide to using it here, courtesy of your friendly TAs.
A vector library can save you hours of programming. Find several implementations online, or use our fairly simple (and not very powerful) one available here.
Writing Text Parsers in C++ will help you parse OBJ files.
RIB and Shader Examples
These examples can be run in a renderman compliant renderer such as Pixie.
-
Ambient Example
-
Phong Example
-
Ambient Occlusion Example
-
Marble Example
-
Ambient Occlusion Shader
-
Marble Shader
RIB and ambient occlusion shader courtesy George Harker and PixieWiki. Marble shader from renderman.org.
OBJ Meshes
Here are a few classic models that you can render with your raytracer or use in other assignments:
-
Angel
-
Chair
-
Cow
-
Dragon
-
Knot Sculpture 1
-
Knot Sculpture 2
-
Scorpion
Need more meshes? You can find many more OBJ files at these locations:
-
The Official Blender Model Repository
-
The Stanford 3D Scanning Repository
-
The AIM@SHAPE Shape Repository
-
The Princeton Suggestive Contour Gallery
-
Greg Turk's Polygonal Models Page