Lab 1
Due: Oct. 16
Reminder: the newsgroup is a good place to discuss issues with PBRT and the plug-in structure.
Objectives
To familiarlize you with the structure of PBRT
To get you to modify PBRT and get used to its plug-in structure
Tasks
Basically Problem 3.7 from the book
Define your own class of parametric surface
Notes
Here
is a skeleton program for lab1.
The input file will have a new input command like
Shape "parametricShape"
followed by name-value pairs such as
"float umin" -1.0 "float umax" 1.0 "float xcoefficients" [0.1 1.0 0.5 0.0]
The parameters should include the range and step size in u and v.
The plug-in is defined by a DLL file (for a PC) with the same name as your new shape
A plug-in routine (CreateShape) will get control. You can 'refine' the shape at this point and generate a triangle mesh as well as the object bounds.
the triangle mesh can be passed to the constructor routine for your shape
The new shape you define should include a constructor, an objectBound() routine, Refine() routine, and an IntersectP() routine (that returns 'false').
The Refine routine passes back the triangle mesh
Cut-and-paste any 'triangle' and 'triangle mesh' PBRT routines you need to include with your code
What to submit ?
A text file named README with the following information:
Your name(s).
Any issues you encountered.
At least two .pbrt scene files
The source files you wrote