Page 28: Last Page (rubric)

Spring 2026 Sample Solution

You have made it to the end of the fourth workbook!

Gemini's Summary of the Workbook

Here is a concise summary of the key concepts from the workbook:

1. Foundations of 3D Graphics and Perception

  • Perceiving 3D: We see in 2D, but our brains interpret 3D depth using visual cues such as occlusion, perspective, relative size, and lighting.
  • High-Level APIs vs. Hardware: WebGL and WebGPU are low-level, hardware-oriented APIs that require complex shader programming. The course uses three.js, a high-level API that abstracts these details into intuitive graphics concepts like scenes, cameras, and materials.
  • Coordinate Systems: 3D graphics typically use a right-handed coordinate system. In three.js, the X-axis goes right, the Y-axis goes up, and the Z-axis points out of the screen toward the viewer.
  • Triangles: Triangles are the fundamental primitive in computer graphics, utilizing normal vectors (facing outward) to determine how they interact with light.

2. Building the Scene

  • Meshes: Visible objects in three.js are typically Mesh objects, which pair a BufferGeometry (a collection of triangles) with a Material (the “stuff” determining appearance and color).
  • Loading Models: Complex shapes can be loaded asynchronously using file formats like OBJ or GLTF via callback functions or Promises.
  • Materials & Lighting: The workbook focuses on local lighting models, where color depends only on the light source, material properties, and object geometry, ignoring complex global effects like shadows and reflections for now. Three.js supports ambient, point, directional, and spot lights.
  • Viewing & Cameras: Converting a 3D world to a 2D screen involves a Camera transform (positioning/aiming using a “lookat” function) and a Projection transform. Projections are typically Perspective (objects get smaller as they get further away) or Orthographic (size is preserved).

3. Motion and Transformations

  • Transformations: Objects are moved using translation, rotation, and scaling. In three.js, transformation order matters, but the library automatically composes them in a fixed order (translation, then rotation, then scale) when setting object states.
  • Rotations: 3D rotations are mathematically complex.
    • Euler Angles apply rotations sequentially around fixed axes (e.g., X, then Y, then Z).
    • Axis-Angle rotates an object by a specific angle around an arbitrary directional vector.
    • Quaternions are 4D representations used internally by three.js to avoid Euler angle issues and allow smooth interpolation.
  • Hierarchical Modeling: Objects can act as parents to other objects (creating a Scene Graph). A child object’s transformations are relative to its parent’s coordinate system, which is essential for creating articulated objects like a quadcopter or construction equipment.
  • CS559 Framework: The workbook introduces a custom framework (GrWorld and GrObject) that wraps three.js to handle boilerplate code (like setting up renderers and lighting) and auto-generates UI sliders to control object parameters easily.

Here are the key things I hope you’ve learned:

  1. You have learned the key concepts of 3D graphics and how they are rooted in the principles of human 3D perception.
  2. You have seen different kinds of 3D APIs to get a sense of how these ideas can be expressed in programs.
  3. You have seen a specific 3D API (three.js) with enough detail that you can write 3D graphics programs using it.
  4. You have been exposed to some of the basic mathematical concepts that are essential for 3D programming.
  5. You have seen how three handles creating scenes and appearances in a practical way.
  6. You have gotten the basics of how lighting and viewing work.
  7. You have seen how we work with rotations and other transformations in 3D, and how a high-level API can abstract away some of those details.
  8. You have gotten practice with real 3D programming.

Hopefully, you got here by going through every page and completing the work on it. The boxes are the most significant components. Here is a list of all the boxes, and whether or not you checked the checkbox. This way you can keep track of what you’ve completed. We will not look at these checks: they are for student convenience.

List of Boxes
Box The box name links back to the box. Check These checkboxes indicate whether you have checked the checkbox for the box. If you didn't check the box, go back to it, make sure the work is completed, and check it. Tag (internal) This is our "internal code name" for the box. Kind Kinds of boxes:
view - look at the box and experiment with it
examine - look at the code for the box
edit - change the box's content
rubric - several steps are suggested in the rubric page - form elements on page in rubric
04-05-01 eg-three-cube view
04-06-01 eg-three-basic view
04-06-02 ex-three-flat rubric
04-06-03 eg-three-dark view
04-06-04 eg-three-light view
04-06-05 eg-three-view view
04-06-06 eg-three-spin view
04-06-07 eg-three-orbit view
04-07-01 eg-camera view
04-09-01 eg-load-obj view
04-10-01 ex-box-stack rubric
04-15-01 eg-lights view
04-15-02 eg-spot-light view
04-15-03 ex-lights rubric
04-16-01 ex-materials rubric
04-18-01 ex-snowman rubric
04-19-01 ex-museum rubric
04-23-01 eg-euler-rotate view
04-26-01 eg-two-cubes view
04-26-02 eg-two-groups view
04-27-01 ex-quadcopter rubric

Here is a list of all the box rubric items in this workbook. You should make sure that you have completed all the items you intend to do. They are checked off if you checked the checkbox. You should only check the boxes that you have completed.

Workbook Rubric
Box The box name links back to the box. These checkboxes indicate whether you have checked the box for the rubric item. If you didn't check the box, go back to it, make sure the work is completed, and then check the checkbox. Kind Kind of rubric items:
standard - expected from all students
advanced - used to get a better grade
creative - an opportunity to do something creative
levels - rubric item graded by selected achievement level
optional - not required, but encouraged
Description
04-06-02 X standard move the yellow cube
04-10-01 X standard stacking the boxes as described
04-15-03 X standard add lights to scene so that sides of the cubes appear in different colors
04-16-01 X standard give each sphere a different, non-white material (1/2 pt each, 1/2 pt for all different)
04-18-01 X standard Visible Objects (requires lights, camera, at least some shapes)
04-18-01 X standard Different materials used (everything isn't the same color)
04-18-01 X standard There is a ground, Snowman on ground
04-18-01 X standard Snowman Body as 3 stacked spheres
04-18-01 X advanced Nice Snowman (eyes, nose, mouth)
04-18-01 X optional Animated snowman
04-18-01 X creative Second, creative snowman
04-19-01 X standard Museum cameras work
04-19-01 X standard Museum objects
04-19-01 X standard Museum objects correctly placed
04-19-01 X standard Museum objects move correctly, not all the same
04-19-01 X standard Museum objects each have spotlights
04-19-01 X standard Each new object has its own material
04-19-01 X advanced At least one object has articulated motion
04-19-01 X advanced Complex museum objects
04-19-01 X creative Complex museum object motions
04-27-01 X standard Some aircraft that isn’t a donut
04-27-01 X standard Spinning propellers
04-27-01 X standard Flies in a circle pointing forward
04-27-01 X standard Radar dish (some object points at aircraft using lookat)
04-27-01 X advanced multiple aircraft, both moving with propellers
04-27-01 X creative creative motion or design

Handing things in…

Please check one more time that your NetID is correct:

Please tell us how you used AI tools in doing this workbook. Remember, disclosing AI usage is part of the class policy on AI usage.

In the following section, you should give attributions for any included work. For example, this is necessary if you took an image or model from the web. This is particularly important if you added a model file. Check that your model file has been added to the repository, and that it is correctly documented.

Check that the local store is correctly written (and the json file has been moved to the correct location) - it probably changed after you filled in the AI Note and Attributions.

If you’ve done that, you are ready to submit your workbook!

Make sure to commit and push your work. Then press the “Submit” button to tell us that your assignment is ready for grading.

Google Sheets Submission:waiting for check
You are viewing the solution version of this page. Submission is disabled.

After pressing the Submit button, the File Status may say “The json file does not match the local store” because the submission time is now in the local store. You don’t have to worry about that.

If you’ve made something you are particularly proud of, we encourage you to submit it for the gallery.

Congratulations! You’ve completed Workbook 4.

Link for grading information: rubric.csv