Looking at a Three Dimensional World
with Two Dimensional Eyes

This is a long module in which we build up some powerful geometric ideas and techniques that let us solve many different problems. In this module we use these techniques to go back-and-forth between a three dimensional world and two dimensional pictures. The bookmarks below enable you to go directly to different parts of this module.

The notions of dot product and magnitude are exactly the tools that we need to solve the problem we had at the end of the preceding module.

We had two lines in R3 described by


t L + (1 - t) S
s V + (1 - s) G

We expected these two lines to intersect but because of measurement error they didn't. We need to find the nonexistent point of intersection. Our strategy will be to find the two points

P(t) = t L + (1 - t) S

on the first line and

Q(s) = s V + (1 - s) G

on the second line that are closest to each other. That is, we need to find values of t and s that minimize the function

Missing equation

or, better yet, the function

Missing equation

As we saw in the section Optimizing a Function of Several Variables this can be done by solving the two equations

Missing equation

This is easily done using a little knowledge about differentiating vector-valued functions and your CAS window. If you are using a computer-based CAS window, Mathematica or Maple, then you can let your CAS do virtually all the work from this point. If you are using the TI-92 then you will need to help its CAS out a bit.


Use your CAS window to find the three dimensional location of the points on your own Tinkertoy house using your own measurements obtained in the last module.

When you complete the work above you should have a list of three dimensional vectors describing key points on the Tinkertoy house. Looking at the house, determine which points are connected by rods. When you get done you should have a list similar to the one below. The one below describes a pyramid with a square base. We will use it as an example as this module continues but you should eventually use your own lists for your Tinkertoy house.


The picture at the right shows a pyramid with a square base.

The following list shows five key points on this pyramid.


A = (-1,  0,  0)
B = ( 1,  0,  0)
C = ( 0,  1,  0)
D = ( 0, -1,  0)
T = ( 0,  0,  1)

The following list shows which pairs of key points are connected by rods.


AC, CB, BD, DA   (The base)
AT, BT, CT, DT

Missing pyramid

We will use this pyramid as an example in the remainder of this module but you should use your own lists for your Tinkertoy house.

OK, now we "know" what the real three dimensional Tinkertoy house looks like -- that is, we have a long gray list of numbers telling us the three dimensional location of various points on the house and another list telling us which points are connected by rods. But Renoir didn't frame long gray lists of numbers and hang them on gallery walls -- he painted pictures. We can learn a lot more and learn it faster faster from pictures than we can from lists of numbers. We already have one picture of the Tinkertoy house but that is not enough to "see" its three dimensionality. Now we want to walk around the house mathematically viewing it from different points-of view. Begin by physically walking around your Tinkertoy house. Stay far away but look at it from various different angles. Notice that as you walk around you gain a real appreciation of its three dimensional shape.

Our original picture of the Tinkertoy house was taken by a camera looking directly downward. We set up our axes so that the point on the ground directly below the camera was the origin, (0, 0, 0). Because the camera was in an airplane high above the ground its coordinates were V = (0, 0, H). We found the apparent location G = (u, v, 0) on the ground of a point P = (x, y, z) on the house by looking at the line through the camera V and the point P

L = (1 - t) V + t P

or

L = (1 - t) (0, 0, H) + t (x, y, z) = (u, v, 0)

and determining where it hit the ground. That is, we work with the equation

(1 - t) (0, 0, H) + t (x, y, z) = (u, v, 0)

or the three equations

t x = u

t y = v

(1 - t) H + t z = 0

Solving the last equation for t we see that


                     H
               t = -----
                   H - z

If H is a very, very large number compared to z -- that is, if the viewer is very, very high compared to the height of the house then t is very, very close to 1 and u is very, very close to x and v is very, very close to y. Thus, we see that the point P = (x, y, z) looks as if it is on the ground directly below itself -- that is, the point G is very, very close to (x, y, 0) You can verify this experimentally.

Our description of the viewer was actually incomplete. The picture taken by a camera depends not only on its location but its orientation. Most of us have taken pictures with the camera slightly tilted -- these pictures show the scene tilted in the opposite direction. To get a picture like the ones we have been working with the camera must be held so that not only is it pointing straight down at the origin but the base of the camera is aligned with the x-axis.

A viewer or a camera has its own set of axes as shown in the photograph below. This photograph shows both sides of a camera -- the front and the back.

Missing photograph

Now we walk around the house mathematically taking pictures of the house from various points on the circle

(R cos theta, R sin theta, H)

as shown in the figure below.

Missing figure

Looking back toward the origin from this circle we extend our right arm horizontally to point in the positive direction of our own x-axis as shown in the photograph of the photographer, or viewer, below. Notice that this photograph of the photographer was taken from the origin

Missing photograph

Thus, the camera's or the viewer's x-axis is pointing in the direction

u = (-sin theta, cos theta, 0)

The z coordinate of the vector u is zero because our (the photographer's) right arm is pointing horizontally, Notice that u is a unit vector and is perpendicular to the vector

P = (R cos theta, R sin theta, H)

which points toward our viewpoint from the origin.


Check that the vector u corresponds to a horizontally extended right arm rather than a horizontally extended left arm.


Next we consider the viewer's or the camera's y-axis as shown in the figure below.

Missing figure

Let v be the vector defined below.

Missing equation


Check that v is a unit vector and that it points in the same direction as the camera's y-axis by checking that v is perpendicular to the line from the origin to the camera and that it is perpendicular to the vector u, which points in the direction of the camera's x-axis. Notice that v is pointing generally upward (instead of downward) because its z-coordinate, R, is positive.


Notice that if W is any vector in R3, then we can write

Missing equation

where

Missing equation

The vector

Missing equation

is called the residual vector. The button below leads to a Mathematical Infrastructure module The Finite Dimensional Projection Theorem that proves the residual vector is perpendicular to the vectors u and v.

The Finite Dimensional Projection Theorem

Thus, we have written the vector W as a sum of three vectors each of which is perpendicular to the other two. The first term in this sum tells us the x-coordinate of W using the camera's x-axis. The second term in this sum tells us the y-coordinate of W using the camera's y-axis. Thus the point W appears at the point

Missing equation

in the photograph taken by the camera. Now we have all the tools we need to look at the scene from various different distant points-of-view. For each vantage point,

P = (R cos theta, R sin theta, H),

we compute the vectors

u = (-sin theta, cos theta, 0)

and

Missing equation

and then to draw the photograph produced by the camera from this vantage point we look at each point W in the original scene and compute its position

Missing equation

in the photograph. For each rod in the original scene we draw the corresponding line in the photograph by connecting the appropriate points.


Your CAS window carries this program out for the pyramid described above. Use your CAS window to draw the pyramid as seen from various different points-of-view.

Then use your CAS window to draw your Tinkertoy house from various points-of-view using your list of points and rods.


Copyright c 1995 by Frank Wattenberg, Department of Mathematics, Montana State University, Bozeman, MT 59717