Chapter 5 Solutions

5.1 Eclipses (both solar and lunar) are good examples of the projection of an object (the moon or the earth) onto a nonplanar surface. All the maps in an atlas are examples of the use of curved projectors. If the projectors were not curved we could not project the entire surface of a spherical object to a rectangle.

5.3 Suppose we want the view of a earth rotating about the sun. Before we draw the earth, we must rotate the earth which is a rotation about the y axis. Next we translate the earth away from the origin. Finally we do another rotation about the y axis to position the earth in its desired location along its orbit. There are a number of variants of this problem such as the view from the earth of the rest of the solar system.

5.5 There are a number of parts to the problem. FIrst, we want a translation of the camera to the eyepoint: T (−eye_{x}, −eye_{y}, −eye_{z}). Remember this matrix will be on the right of the matrix we are forming. Next we want to form a rotation matrix. We can do this my finding the new unit length x, y and z vectors for the camera. The desired rotation matrix will be composed of these three vectors. The desired z vector is the direction the camera is pointing, a vector in the direction (eye_{x} − at_{x}, eye_{y} − at_{y}, eye_{z} − at_{z}). We can normalize it by computing its magnitude and dividing each component by this number. The x direction of the camera is permindicular to both this z and the up vector (which define a plane). We can obtain this vector by taking the cross product of the z we just computed and the up vector, and normalize the result. Finally we compute new y (which is the orthogonal projection of the up vector) by taking the cross product of the x and z vectors.

5.7 The result follows from the transformation being affine. We can also take a direct approach. Consider the line determined by the points (x_{1}, y_{1}, z_{1}) and (x_{2}, y_{2}, z_{2}). Any point along can be written parametrically as (αx_{1} + (1 − α)x_{2}, αy_{1} + (1 − α)y_{2}, αz_{1} + (1 − α)z_{2}). Consider the simple projection of this point \frac{1}{d(αz_{1}+(1−α)z_{2})}(αx_{1} + (1 − α)x_{2}, αy_{1} + (1 − α)y_{2}) which is of the form f(α)(αx_{1} + (1 − α)x_{2}, αy_{1} + (1 − α)y_{2}). This form describes a line as the slope is a constant. Note that the function f(α) implies that we trace out the line at a nonlinear rate as α increases from 0 to 1.

5.9 The specification used in many graphics text is of the angles the projector makes with x,z and y, z planes, i.e the angles defined by the projection of a projector by a top view and a side view. Another approach is to specify the foreshorting of one or two sides of cube aligned with the axes.

5.11 The CORE system used this approach. Retained objects were kept in distorted form. Any transformation to any object that was defined with other than an orthographic view transformed the distorted object and the orthographic projection of the transformed distorted object was incorrect.

5.15 If we use θ = ϕ = 45, we obtain the projection matrix

P = [ \begin{matrix}1 & 0 & −1 & 0 \\ 0 & 1 & −1 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{matrix} ]

5.17 All the points on the projection of the point (x.y, z) in the direction d_{x}, d_{y}, d_{z}) are of the form (x + αd_{x}, y + αd_{y}, z + αd_{z}). Thus the shadow of the point (x, y, z) is found by determing the α for which the line intersects the plane, that is

ax_{s} + by_{s} + cz_{s} = d

Sunstituting and solving, we find

α = \frac{d − ax − by − cz}{ad_{x} + bd_{y} + cd_{z}} .

Howver, what we want is a projection matrix, Using this value of α we find

x_{s} = z + αd_{x} = \frac{x(bd_{y} + cd_{x}) − d_{x}(d − by − cz)}{ad_{x} + bd_{y} + cd_{z}}

with similar equatiosn for y_{s} and z_{s}. These results can be computed by multiplying the homogeneous coordinate point (x, y, z, 1) by the projection matrix

M = [ \begin{matrix}bd_{y} + cd_{z} & −bd_{x} & −cd_{x} & −dd_{x} \\ −ad_{y} & ad_{x} + cd_{z} & −cd_{y} & −dd_{y} \\ −ad_{z} & −bd_{z} & ad_{x} + bd_{y} & −dd_{z} \\ 0 & 0 & 0 & ad_{x} + bd_{y} + cd_{z} \end{matrix} ] .