1 of 19 New Lecture And Lab Information Lectures: – Thursday 13:00 – 14:00 (A322) • Does anyone miss lunch? – Friday 15:00 – 16:00 (A28) Labs: – Wednesday 10:00 – 11:00 (A305) – Wednesday 17:00 – 18:00 (Aungier St. 1-005) Sorry for all of the messing around!
19
Embed
1 of 19 New Lecture And Lab Information Lectures: –Thursday 13:00 – 14:00 (A322) Does anyone miss lunch? –Friday 15:00 – 16:00 (A28) Labs: –Wednesday 10:00.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
In today’s lecture we are going to have a look at how perspective projections work in computer graphics
4of19
Perspective Projections
Remember the whole point of perspective projections
Imag
es t
aken
fro
m H
earn
& B
aker
, “C
ompu
ter
Gra
phic
s w
ith O
penG
L” (
2004
)
5of19
Projection Calculations
x axis
y axis
z axis
P=(x, y, z)
(xprp, yprp, zprp)(xp, yp, zp)
View Plane
6of19
Projection Calculations (cont…)
Any point along the projector (x’, y’, z’) can be given as:
When u = 0 we are at P, while when u = 1 we are at the Projection Reference Point
uzzzz
uyyyy
uxxxx
prp
prp
prp
)('
)('
)('
10 u
7of19
Projection Calculations (cont…)
At the view plane z’ = zvp so we can solve the
z’ equation for u:
zz
zzu
prp
vp
8of19
Projection Calculations (cont…)
Armed with this we can restate the equations for x’ and y’ for general perspective:
zz
zzy
zz
zzyy
zz
zzx
zz
zzxx
prp
vpprp
prp
vpprpvp
prp
vpprp
prp
vpprpvp
9of19
Perspective Projection Transformation Matrix
Because the x and y coordinates of a projected point are expressed in terms of z we need to do a little work to generate a perspective transformation matrix
First we use a homogeneous representation to give xvp and yvp as:
However, we also need to preserve the z values – depth information
Otherwise the z coordinates are distorted by the homogeneous parameter hWe don’t need to worry about the details here, but it means extra parameters (sz and tz)