next up previous
Next: About this document ... Up: s_ray_trace Previous: s_ray_trace

3. Problems

Problem S-1. Suppose everything is exactly as in Example [*], except that the sphere is centered at $ \left[\begin{array}{r}0\  0\  -5\end{array}\right]$ (while still being of radius 3). For the same $ P$, what is the brightness of the pixel there?



Problem S-2. Using Phong shading, find the brightness of the pixel at $ \left[\begin{array}{r}1\  0\end{array}\right]$ on the viewplane $ z = 0$ as seen from the viewpoint $ \left[\begin{array}{r}0\  0\  2\end{array}\right]$, if the surface is the sphere of radius 5 centered at $ \left[\begin{array}{r}-1\  0\  -6\end{array}\right]$ and the light source is in the direction $ \left[\begin{array}{r}1\  0\  0\end{array}\right]$.



Problem S-3. Suppose everything is exactly as in Example [*], except that the object is a plane piece of paper with equation $ x+y+z = -3$. For $ P = \left[\begin{array}{r}1\  1\  0\end{array}\right]$ as before, what is the brightness of the pixel there? Does it depend on the choice of $ P$? (For the normal, there isn't any ``outward'' direction; instead, choose the direction that is on the same side of the paper as the light source.)



Problem S-4. Let the viewpoint be at the origin, let the viewplane be the $ z=10$ plane, and let s$ = \frac 13
\left[\begin{array}{r}2\  2\  1\end{array}\right]$. Suppose the object is the sphere of radius 10 centered at $ \left[\begin{array}{r}0\  0\  20\end{array}\right]$. What is the brightness of the pixel at $ \left[\begin{array}{r}3\  4\  10\end{array}\right]$? (Or is it in shadow?)



Problem S-5. In Example [*], consider the same ray but suppose the sphere is shiny (specular reflection). Find parametric equations for the reflected ray.

Method: For the reflected ray, think separately about its direction and about a point through which it goes; then use the point-direction parametric form of a line. For the direction, first find a direction vector for the incoming ray. A fact, perhaps to be derived later in the course, is that the matrix of a reflection in a mirror through the origin with unit normal n (as a column vector) is $ I - 2$n   n$ ^ t$; note that the column times a row is $ 3 \times 3$; and so a column vector v has reflected image $ (I - 2$   n   n$ ^ t)$   v $ = $    v$ - 2$   n   n$ ^ t$   v$ = $   v$ - 2$   n$ ($n$ \cdot$   v$ )
=$   v$ - 2 ($n$ \cdot$   v$ )$   n. Use this information to reflect the path direction vector in the mirror through the origin with appropriate normal, obtaining the direction of the reflected ray. (Since this part of the calculation is with vectors rather than points, you don't have to worry about where the mirror is, but only the direction of its normal.)


next up previous
Next: About this document ... Up: s_ray_trace Previous: s_ray_trace
Kirby A. Baker 2003-05-05