CS488 - Introduction to Computer Graphics - Lecture 7
Public Service Announcements
- Assignment 2 due 4 June, one week from today.
Perspective Projection
Projecting to the image plane by similar triangles
- Centre of projection is at the origin
- (xs,ys) = (xw, yw) (zs/zw), or (xs,ys) / zs = (xw,yw) / zw.
- xs, ys, zs: screen coordinates; xw, yw, zw: world coordinates
- A whole line of points in the world corresponds to a single point on
the image plane.
Why would you want something different?
- You might want to clip against coordinate-aligned planes.
- You might want to preserve occlusion.
Just for fun let's try something.
The Bottom Row
In an affine transformation the bottom row is always (0,0,...,0,1).
What happens when you change it?
You get
- A denominator that is not 1, that is not even a simple number.
- A Mobius transformation, as close as you can get to linear without
being linear.
- Mobius transformations and matrices are closely linked.
Recovering Similar Triangles
To get 1/zw try (0,0,1,0). The matrix is
- Singular
- Single means that the dimension is being reduced.
The View Frustrum
"Frustrum" because I get frustrated trying to draw it.
Make a Pencil of Lines Parallel
- Send the eye to infinity,
- without changing the image plane.
- What does infinity mean?
- Let the divisor gp to zero.
Where did the Near and Far Planes Go?
- Where did infinity go? (0,0,zs+1,1)
Scale on (x,y) to Get (w/2, h/2, z, 1) --> (1, 1, z, 1)
Translate on z to Get (x, y, (n+f)/2, 1) --> (x, y, 0, 1)
Scale on z to Get (x, y, (n-f)/2, 1) --> (x, y, -1, 1) and (x, y,
(f-n)/2, 1) --> (x, y, 1, 1)
Return to: