Homework 1

Assigned: April 4, 2000
Due: April 18, 2000

The purpose of this assignment is to add support for quadric surfaces to lrt. You will need to support all of the quadrics listed in the RenderMan interface specification except for the torus (which, as we know from lecture, is actually a quartic surface). For each of these surfaces, you will have to provide code to compute the axis-aligned bounding box, nearest intersection point, the surface normal, and texture coordinates (u, v). Since lrt is implementing RenderMan, you must adhere to the specification as listed on the RenderMan page.


To be explicit, your renderer should be able to produce correct renderings of the following quadrics: A useful test file, and the resulting image, with all the surfaces you are required to implement, can be found here. You should also try rendering this scene with different surface shaders and textures to verify your normals and texture coordinates are correct for each primitive.

The RenderMan interface specification gives mathematical definitions for all of the quadrics. Remember that your program needs to conform to the standard set forth there.

Another useful tool for testing is BMRT. BMRT is a RenderMan compliant shareware ray tracer that we've installed for the SGI cluster in Sweet Hall. The output from your renderer should match BMRT's output for the same input file.


Now that you know what you are going to be doing, we'll get you setup with all the tools you'll need for this assignment.


We've provided a Makefile that will build the default installation on the SGI machines. The code should be portable to other platforms, but we're only supporting SGI for this class. We will be doing all our grading on the SGI's as well, so make sure your code works on the SGI's before turning it in.


Once you've set up lrt and BMRT, you should be ready to do this assignment.


Turn in your finished homework using the cs348b submit script:
Make sure you hand in all your source code, a Makefile, and a README file. The README should contain instructions for compiling and running your code, and a description of anything non-intuitive you've done. Please do not submit any executables or object (.o) files. We'll be building your submissions ourselves, and those just take up space.

This homework, and all subsequent programming assignments, will be graded according to the following system:

Full credit on this assignment means your program properly renders our test files. Extra credit is truly extra credit. Extra credit is not curved. Extra credit is for people that really want to impress us. To earn extra credit on this assignment, you should implement one of the following:
  1. Implement an efficient scheme for ray tracing height fields. The system should be capable of rendering 1K x 1K height images. efficiently. Hint: Read Musgrave et al. on ray tracing height fields.
  2. Implement a general ray-implicit surface intersector. Hint: Read Don Mitchell's paper on ray-surface intersection using interval arithmetic.
  3. Implement RenderMan subdivision surfaces. Design and implement a ray-subdivision surface algorithm.
If you do extra credit, be sure to write about it in the README. Also, turn in any extra data files that you used.


Get started early. Some of the corner cases are tricky. Also, the lrt software is new this year. There may still be undiscovered bugs. If a bug is found, it should be reported to mipmap.stanford.edu. Bugs will be fixed as soon as possible, but don't expect us to be able to fix any bugs that are found immediately. We have implemented the main part of this assignment, so any bugs that may exist are only likely to be found when you do the extra credit.

Copyright © 2000 Pat Hanrahan