CS559 Spring 2021 Sample Solution - Workbook 8
Written by CS559 course staff
This week, we’ll continue to do more THREE programming, with a focus on using THREE’s mechanisms for transformation and hierarchy to make more interesting things.
This workbook is due on Monday, March 22, 2021.
- To gain some experience doing hierarchical modeling, particularly for animation
- To get some practice working with 3D rotations
- To get some experience working with the CS559 framework code
- To get more practice working with a modern scene graph API
- To see some details of how different rotation representation are used
- To get some experience working with another person’s code
Required and Recommended Reading
The readings are here to help you understand the things we discussed in class.
Over the course of this assignment, you will probably need to read a lot of the THREE.js Documentation. Unfortunately, this documentation isn’t good to read - it’s fine for when you need to look things up. So expect to read a lot of pages as you do more programming.
The textbooks cover the math of the transformations - giving you the matrices. You’ve already had to read those chapters for prior workbooks. Understanding what happens inside the matrices is useful, so if you haven’t already read FCG4_Ch06.pdf (0.5mb) and the relevant portions of Hart06-jan19.pdf (2.3mb), you may want to now.
Hierarchical modeling is discussed briefly in section 2 of FCG4_Ch12.pdf (0.9mb) and Hart07-jan19.pdf (14.5mb). In both cases, the focus is more on how you implement the scene graph traversal using transformation stacks than how to think in terms of hierarchical models. In class, we’ll let THREE do this work for us.
The lookfrom/lookat/vup transformation is called the “The Camera Transformation” in section 1.3 of FCG4_Ch07.pdf (0.5mb). Other things in the chapter discuss the Perspective Transformation in depth (no pun intended), and can help you understand these concepts better. Hart discusses lookfrom/lookat in Hart08-jan19.pdf (1.7mb), but it adds little beyond what you’ve seen already. Look at it if you want to see it explained a different way. These topics will also be discussed in the lectures.
Required: (in general, we discuss the key topics in lecture - these reinforce them)
- FCG6 6.2, 6.3, 6.4, and 6.5
- FCG 12.2
- Hart6 (we aren’t going to talk about Gramm-Schmidt or Cayley’s formula, and don’t worry about being able to construct rotations about arbitrary axes - but these things can help you understand the basic concepts). For example, the first part of 6.5 sums up what we said in class about rotations.
- Hart7 is written in terms of explicit matrix stacks (which we did with Canvas2D), but gives examples on how to think about hierarchical modeling
- Hart8 is redundant, but can help you if you want to see viewing another way.
(optional) The Real Time Rendering book has a very thorough discussion of transformations in sections 1-3 of RTR4_Ch04.pdf (68.2mb), with significant attention paid to rotations and Quaternions (Section 4.3). This material is beyond what you need for class, but may be a good thing to read if you want a better understanding of 3D transformations.
The main exercises for this workbook are:
- Rotation Toys - We are giving you demos to play with. You should use them to help build your intuitions as to how 3D rotations work (or do not work) as the case may be.
- The Quadcopter / Aircraft - you get to make a quadcopter again, this time in 3D. It’s a hierarchical model. And you’ll need to show that you can use a “lookat” transformation.
- Graphics Park - before we get to Graphics Town, we’ll start smaller. This is a chance to animate some hierarchical objects in 3D and figure out the framework code.
- Construction Equipment - another chance to use the framework code and make a different kind of hierarchical object.
Over the next few weeks, we’ll be using the framework code to make increasingly interesting objects. The idea is that by the end of the semester, all of the objects you make can fit together into Graphics Town.
Rubric for Grading
While there are lots of potential for bonus points on this assignment, but we limit the total number you can earn for this workbook. However, we do keep track of your “excess points” and may consider them if you are at a borderline at the end.
Also, the objects that you make using the framework will be usable in the future: we will use the framework for all of the future assignments, including the final “Graphics Town” assignment. If you make nice objects now, you can use them again.
Hopefully, you are making really cool stuff because you like making cool stuff and are learning from doing it, not just because we are giving you a few points.