0% found this document useful (0 votes)
123 views10 pages

Computer Graphics Lec - 6.1

This document describes the standard perspective projection transformation. It provides the equations to project a 3D point P(x,y,z) onto a 2D view plane, given a viewpoint C(0,0,-d). Specifically: - The projection of P is P'(x',y',z') on the view plane - The scaling factor α is calculated as d/(z+d) - The transformation equations are: x' = αx, y' = αy, z' = 0 - Several problems demonstrate calculating perspective projections of objects, lines, and onto arbitrary planes.

Uploaded by

west_lmn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
123 views10 pages

Computer Graphics Lec - 6.1

This document describes the standard perspective projection transformation. It provides the equations to project a 3D point P(x,y,z) onto a 2D view plane, given a viewpoint C(0,0,-d). Specifically: - The projection of P is P'(x',y',z') on the view plane - The scaling factor α is calculated as d/(z+d) - The transformation equations are: x' = αx, y' = αy, z' = 0 - Several problems demonstrate calculating perspective projections of objects, lines, and onto arbitrary planes.

Uploaded by

west_lmn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Standard Perspective Projection

Object P(x,y,z)
Point

P(x,y,z)

C(0,0,-d)

View point
View plane
X

In standard perspective projection the viewer is placed negative Z- axis


and consider the view plane is XY plane, then
CP = (x-0)I + (y-0) + (z+ d) k
= xI + yj +(z + d) k
Again CP = (x-0)I + (y-0)j + (z + d) k
= xi +yj + (z + d) k
Since CP and CP are in same direction, then we may write
CP = .CP where is a scalar quantity.
So CP = . CP
xi + yj + (z + d) k = x i + y j + (z + d) k
x = x ------------(1)
y = y ------------(2)
(z+d) = (z + d) -----(3)

Since P is a point on the XY Plane, so z = 0, then we may


write d = (z + d) or = d / (z + d)
Hence
y = (d. y ) / (z + d)
and x = (d. x)/ (z + d)
z=0
In homogeneous co ordinate system we ma write
x
y
z
1

d
0
0
0

0
d
0
0

0
0
0
1

0
0
0
d

x
y
z
1

Prob-1) A unit cube is projected onto the XY plane. Find the


projected image using the standard perspective
transformation with (a) d = 1 and (b) d = 10 where d
is the distance from the view plane.
Y

C(0,0, -d)

D
E

C
H
B

A
F

Prob-2) You are given a 3D line going from P1(-5, 4, 2) to P2


(5,-6,18). Obtain the perspective projection of line on YZ plane
when the viewer is placed at (10, 0, 10).
Prob-3) Obtain the transformation matrix for an object projected
on the XY plane when viewed from (0, 0, 5).
Prob-4) A unit cube is located at origin such that 3 of its edges
are parallel to X, Y, Z axis. The vertices on front face have the
co-ordinates. The cube is viewed from (0, 0, 5) on XY plane.
Obtain the perspective projection point for the front & back
faces of the cube. Can you indicate what happens to edges
parallel to X, Y, & Z axis . Do they all meet at same vanishing
point ?

Prob-5) Obtain the transformation matrix on to the plane


n1x +n2y +n3z = d0 when the viewer is placed at
C( a ,b, c).
Y

P(x,y,z)

View
Point
P(x,y,z)

C(a,b,c)

Equation of plane
n1x +n2y +n3z = d0
X

CP = (x-a)i + (y- b)j + (z - c)k


Again CP = (x- a)i + (y- b)j + (z - c) k
Since CP and CP are in same direction, then we may write
CP = .CP where is a scalar quantity.
So CP = . CP
(x-a)i + (y-b)j +(z- c) k = (x-a)i + (y-b)j +(z c) k
x-a = (x a) or x = (x a) + a ------------(1)
y-b = (y b) or y = (y b) + b ------------(2)
z- c = (z + d) or z = (z - c) + c ------------(3)
Since P(x,y,z) is a point on the plane, so we may write
n1x +n2y +n3z = d0
Simplify after substituting the value of x , y and z from the
equation (1), (2) and (3).

n1[( (x-a) +a] + n2[ (y- b) +b] + n3[(z- c) +c] = d0


[(n1x + n2y +n3z) (n1a + n2b +n3c)] = d0 (n1a+n2b+n3c)
= [d0(n1a+n2b+n3c] [(n1x +n2y +n3z) - (n1a+n2b+n3c)]
= [d0 d1] (n1x +n2y +n3z d1)
= d / (n1x +n2y +n3z d1)
Substitute the value of in equation (1),(2) and (3) we will
get the value of x , y and z respectively.

x = d (x a) (n1x +n2y +n3z d1) + a


x = (dxda+an1x+an2y+an3zad1) /(n1x + n2y +n3z d1
X= (d+an1)x+an2y +an3z a (d + d1) (n1x +n2y +n3z d1)
X = (d+an1)x+an2y +an3z ad0) (n1x +n2y +n3z d1)
Similarly
y = bn1x+(d+bn2)y+bn3z bd0) (n1x +n2y +n3z d1)
z = cn1x+cn2y +(d+cn3)z cd0) (n1x +n2y +n3z d1)

The transformation Matrix is given by


d+an1

an2

an3

-ad0

bn1

d+bn2

bn3

-bd0

cn1

cn2

d+cn3

-cd0

n1

n2

n3

-d1

You might also like