Perspective Depth Transformation

A perspective depth transformation does two things:
1) transforms every point in object space to a point in image space.
2) maintains depth information in 2-space

Why do we want depth information in 2-space?

Final perspective depth transformation is:

Xps = (d*x)/(d+z)
Yps = (d*y)/(d+z)
Zps = z/(d+z)

If you would like a detailed explanation of Zps, read pages 185-187.

View Plane Transformations

Once an object has been specified in 3-space, we must be able to produce a view of this object from any position in space.

Let's say we want to produce the following visual effect: A three dimensional cube rotating about the origin. Give two totally different ways we could achieve this effect.

How do we specifiy the viewpoint we need in 3-space?

1) Use a direction vector N which points from the viewpoint to the object
2) Specify a distance d from the viewpoint to the object

Note: We will choose to pick a point R on the object as a reference point.

Discuss Figure 6.9 on p.189

Discuss pp. 189-190 in book

view plane transformation - transforms our original coordinates into view plane coordinates.

The user must specify each of the following:

1) (Rx,Ry,Rz) - view reference point which is the point on the object which we focus on.
2) (Nx,Ny,Nz) - view plane normal which is the vector which gives the direction from the view plane to the reference point.
3) (Ux,Uy,Uz) - view up direction which gives the direction of the y-axis of the view plane.
4) d - the view distance.

Before proceeding with the steps to view the object, we need some initial calculations as follows:

1) View plane normal (Nx,Ny,Nz) does not necessarily have length d. Why??

L = sqrt(Nx^2 + Ny^2 + Nz^2) length of vec(N)

nx = (Nx*d)/L
ny = (Ny*d)/L
nz = (Nz*d)/L

Questions:

a) Why did we divide the above by L? That is, what did dividing by L do for us?

b) Did we change the direction of vec(N)? Why or why not?

c) Prove or disprove the the vector (nx,ny,nz) has length d.

The transformation matrices are discussed in detail on pp.191-194. This logic follows from the rotation about an arbitrary axis. Once the alignment takes place, the perspective projections can take place and this theory has also been discussed. The implementation details are all yours.


©1995 Douglas J. Ryan
Douglas J. Ryan/ryand@tardis.pacificu.edu