Page 125 - Computer Graphics Handout
P. 125

R = RxRyRz .






















          A little experimentation should convince you that we can achieve any desired orientation by proper choice of α, β, and γ , although,
          as we will see in the example of Section 3.10.4, finding these angles can be tricky.

          3.10.3 The Instance Transformation
          Our example of a cube that can be rotated to any desired orientation suggests a generalization
          appropriate  for  modeling.  Consider  a  scene  composed  of many  simple  objects,  such  as  those
          shown in Figure 3.50. One option is to specify each of these objects, through its vertices, in the
          desired location with the desired orientation and size. An alternative is to specify each of the object
          types once at a convenient size, in a convenient place, and with a convenient orientation. Each
          occurrence of an object in the scene is an instance of that object’s prototype, and we can obtain
          the desired size, orientation, and location by applying an affine transformation—the instance
          transformation—to the prototype. We can build a simple database to describe a scene from a list
          of object identifiers (such as 1 for a cube and 2 for a sphere) and of the instance transformation to
          be applied to each object. The instance transformation is applied in the order shown in Figure
          3.51.Objectsare usually defined in their own frames, with the origin at the center of mass and
          the sides aligned with the model frame axes. First, we scale the object to the desired size. Then
          we orient it with a rotation matrix. Finally, we translate it to the desired orientation. Hence, the
          instance transformation is of the form M = TRS.
          Modeling with the instance transformation works well not only with our pipeline architectures but also with other methods for
          retaining objects such as scene graphs that we will introduce in Chapter 8. A complex object that is used many times can be loaded
          into the server once as a display list. Displaying each instance of it requires only sending the appropriate instance transformation to
          the server before executing the display list.




















                                                             125
   120   121   122   123   124   125   126   127   128   129   130