E26/CS40 Computer Graphics: Lab #6
3-D Viewing Pipeline
nick guerette . adem kader . heather jones
11.16.2004

labs home    |    lab1    |    lab3    |    lab4    |    lab5    |    lab6    |    lab7    |    lab8    |    lab9    |    final project


description.

For this lab we built a 3-D transformation library and the 3-D viewing transformation function and integrated them with our system.

implementing 3-D perspective projection.

1.Define a 3D viewing structure. It should contain the following fields:

1. View Reference Point [VRP]: 3-D vector indicating the origin of the view reference coordinates.
2. View Plane Normal [VPN]: 3-D vector indicating the direction in which the viewer is looking.
3. View Up Vector [VUP]: 3-D vector indicating the UP direction on the view plane. The only restriction is that it cannot be parallel to the view plane normal.
4. Projection Distance [d]: distance in the negative VPN direction at which the center of projection is located.
5. View Window Extent [du, dv]: extent of view plane around the VRP, expressed in world coordinate distances.
6. Front and Back Clip Planes [F, B]: front and back clip planes expressed as distances along the positive VPN. F > 0 and F < B.
7. Screen Size [screenX, screenY]: Size of the desired image in pixels.

2. Translate the VRP to the origin:
     VTM = T(- vrp.x, - vrp.y, - vrp.z).
3. Align the coordinate axes:
     Normalize the VPN and VUP.
     Create UVEC = VUP x VPN.
     Redo VUP' = VPN x UVEC.
     VTM = RotateXYZ(UVEC, VUP', VPN) * VTM.
4
. Translate the COP (represented by the projection distance) to the origin:
     VTM = T(0, 0, d) * VTM.
5. Scale to the canonical view volume [CVV]:
     Let B = B + d.
     VTM = Scale( 2 * d / (du * B), 2 * d / (dv * B), 1 / B) * VTM.
6. Project onto the image plane:
     Let d = d / B.
     VTM = PROJpersp(d) * VTM.
7. Scale to the image size:
     VTM = Scale( - screenX / (2 * d), - screenY / (2 * d), 1.0) * VTM.
8. Translate the lower left corner to the origin:
     VTM = T(screenX/2, screenY/2) * VTM.

required images.

required image 1
required image 2

questions.

1 - What are the (x,y,z) values for the eight corners of the cube in the first required image?

( 0, 0, 0 ), ( 0, 1, 0 ), ( 1, 0, 0), ( 1, 1, 0 ), ( 0, 0, 1 ), ( 0, 1, 1 ), ( 1, 0, 1 ), ( 1, 1, 1 ),

2 - How does modifying the distance between the COP and the VRP affect the appearance of the cube in the first required image?

Depending on how we change the COP and the VRP we get different results.

If we keep the COP constant and vary the VRP this is what we get:
Δ=4 (-2, 2)
cop= -2, vrp= 4

If we keep the VRP constant and vary the COP:

cop= -2, vrp= 4
cop= 2, vrp= 4

changing both at the same time:

Δ=6 (-3, 3)
Δ=4 (-2, 2)

and here are three images with the same difference (Δ = 6):

Δ=6 (-3, 3)
cop= -2, vrp= 4
cop= -4, vrp= 2

3 - How does modifying the direction of VUP modify the appearance of the cube in the first required image?

vup (1,0,0)
vup (1,0.5,0)
vup (1,1,0)
vup (0.5,1,0)
vup (0,1,0)
varying VUP

4 - How does modifying the size of the view window modify the appearance of the cube in the first required image?

du=dv=1
du=dv=2
du=dv=4

no copyright; all of the above work was done for the sake of science and engineering