Lab 2: Snowman

CSC385 - Computer Graphics

Goal: In this lab you'll learn about scene graphs, the ray file format, and some of the functionality you'll implement in in project 2.

Action

Your goal is to build a scene graph for a snowman. The snowman should have a head, middle, and bottom, two eyes, and a nose. (After you've finished the basic snowman you can consider adding other parts.) It should be centered on the y-axis, sit on the x-z plane, and face in the +z direction as shown below. It should be 10 units tall.

  1. Start by sketching your snowman on paper.
  2. Next identify the size of the various parts; i.e. the radii of the various spheres.
  3. The scene graph for the basic snowman is shown below. (There are some other forms that would work but please use the one below.)

    Assuming the primitive you have to work with is a sphere of radius 1, centered at the origin, define the tranformations for each of the edges. You are allowed to use scale(sx,sy,sz), rotate(theta,v) where v is a coordinate axis, and translate(dx,dy,dz).

  4. Now create a ray file for your snowman using this file a starting point snowman.ray. The specification for the ray file format is available on blackboard. Remember the only primitives you can use are spheres of size 1 centered at the origin. Render the file using the the sample raytracer.

Deliverables

Email your snowman.ray file to tartaroa@union.edu.