Ray Tracing, Version 2.2
| Goal: Ray trace a scene where
|
Ray Tracing Tools:
void scale(GLdouble scale_x, GLdouble scale_y, GLdouble scale_z); which changes the object's current transformation matrix to indicate the primitive has been scaled by (scale_x, scale_y, scale_z).
void rotate(GLdouble degrees, GLdouble x, GLdouble y, GLdouble z); which changes the object's current transformation matrix to indicate the primitive has been rotated CCW through an angle of "degrees" about the axis given by <x, y, z>.
void translate(GLdouble translate_x, GLdouble translate_y, GLdouble translate_z); which changes the object's current transformation matrix to indicate the primitive has been translated by (translate_x, translate_y, translate_z).
Vector cross(Vector other); which returns the cross product of this vector with other vector.
void normalize(); which normalizes this vector (makes it have unit length.)
/classes/cs3114/RayTracing/Projects/Scenes/2spheres.scnis a good one to test. It only has two generic spheres, one of which has been translated. The rendered scene is in Blackboard->Gallery
/classes/cs3114/RayTracing/Projects/Scenes/jack.scnis a another good one to test. It uses generic spheres which have been translated, scaled, and rotated. The rendered scene is in Blackboard->Gallery