1. PE-III : Computer Graphics
Unit – II: Projections in Computer Graphics
(AY 2020-21 Tri.IX)
• Prepared By:
Prof. S. S. Pachpore
Assistant Professor in
School of Mechanical Engineering, MITWPU
2. CONTENT OF THE UNIT
• Orthographic Projection
• Isometric Projection
• Perspective Projection
• Transformation for Orthographic Projection
• Transformation for Isometric Projection
• Programming basis for the projection methods
25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
2
3. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
3
Projections:-
• Importance of Projection?
• In Graphics, 3D object is represented on plane paper.
• Similarly, in CG 3D object is viewed on 2D display and PROJECTION is a
transformation which does that.
• Terminology used in Projections
1. Center of Projection:
View point from where all projection rays starts
2. Projector:
Projection rays used for obtaining the projection of an object
3. Projection plane:
Plane on which a 2D image of an object is obtained
4. 25 April 2022 4
Fig:- Projection Terminologies
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
(a) (b)
5. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
5
Types of Projections:
Fig:- Types of Projections
Based on entre of
Projection and projector
the projections are broadly
classified in to
1. Parallel Projection
2. Perspective
Projection
6. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
6
Concept of Parallel Projections:
Fig:- Parallel Projections
If the Centre of Projection is at infinite
distance from the projection plane, all
the projector are parallel to each other,
called as Parallel Projections.
It preserves actual dimensions of the
object.
This method is used to in drafting i.e. to
produce front, top and side view of an
object.
7. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
7
Concept of Perspective Projections:
Fig:- Perspective Projections
If the Centre of Projection is at infinite
distance from the projection plane, and
all the projector are non-parallel and
meet at the center of projection to each
other, called as Perspective Projections.
It may not preserves actual dimensions of
the object.
This method helps in adding an artistic
effect and enhancing realism to projected
view.
8. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
8
Concept of Vanishing Point:
• Under perspective projections, any set
of parallel lines that are not parallel to
the PP will converge to a vanishing
point.
• Vanishing points of lines parallel to a
principal axis x, y, or z are called
principal vanishing points.
• How many of these can there be?
• One-point perspective — simplest to draw
• Two-point perspective — gives better impression of depth
• Three-point perspective — most difficult to draw
Fig:- Vanishing Point
Fig:- Types of Vanishing Point
9. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
9
ONE/TWO point Perspective Projection.
(a) One Point Perspective Projection (a) Two Point Perspective Projection
10. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
10
Examples of Perspective Projection.
(a) One Point Perspective Projection
(b) Two Point Perspective Projection
(c) Three Point Perspective Projection
https://www.youtube.com/wa
tch?time_continue=404&v=Vo
3CEtzIORg&feature=emb_title
https://www.youtube.com/w
atch?v=rCanYY7eLeA
https://www.youtube.com/
watch?v=Bdgt9YHUTmg
1 Point
2 Point
3 Point
11. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
11
Parallel Projections:
Orthographic Projections: Axonometric Projections:
Concept of Orthographic Projections:
• All the projectors are parallel to each
other and perpendicular to Projector
Plane.
• One of the principal axes on MCS
(Model coordinate System) in
perpendicular and remaining two are
parallel to Projector Plane.
Fig:- Orthographic Projection
12. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
12
Concept of Axonometric Projections:
• All the projectors are parallel to each
other and inclined to Projector Plane.
• Principal axes on MCS (Model
coordinate System) in inclined to
Projector Plane.
• On can see several faces of the model
at one glance.
• Common Axonometric Projection is
Isometric Projection
Fig:- Axonometric Projection
Fig:- Orthographic Projection
13. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
13
Concept of Isometric Projections:
Projection plane intersects the each principal axis of the MCS of the object at
the same distance form the origin.
Fig:- Isometric Projection
14. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
14
Transformation for Projection
Orthographic Projections: Isometric Projections:
Theory / Derivation (6-8 Mks)
Numerical (8-10 Mks)
15. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
15
1 0 0 0
0 1 0
0 0 1 0
0 0 0 1
To get in XY plane only
For FV, Z=0 and view should be in 1st quadrant OF= O
For TV, Y=0 then the view will be XZ plane, rotate @ x axis in CCW ------- OT = Rx * O
For RHSV, X=0 then the view will be in YZ plane, rotate @ y axis in CW------ORS= Ry *O
For LHSV, X=0 then the view will be in YZ plane, rotate @ y axis in CCW
16. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
16
Transformation for Orthographic Projection:
• Orthographic Projection: Based on parallel
Projection system and is obtained by setting
to zero the coordinate along which the view
is being generated.
• Views to be generated ion 2D plane only
commonly known as viewing or display
plane.
• Assume that, coordinates of viewing plane in
Xv and Yv because generally, by default, XY
plane is considered as viewing plane.
• For FV (Xv Yv ) will get mapped automatically
with (X Y) of MCS; for other views mapping is
necessary.
Fig:- Orthographic Projection
17. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
17
Transformation for Orthographic Projection (FV):
Fig:- FV of Orthographic Projection
• FV can be obtained easily by setting
z=0 for all points on the model.
• We always use 3D homogeneous
coordinate system for plotting the
transformation.
• The coordinate of any point P on the solid model in MCS is 𝑃 =
𝑥
𝑦
𝑧
1
1 0 0 0
0 1 0 0
0 0 0 0
0 0 0 1
Instead of 1 here it
will be 0 as z=0 and
we are working in
XY plane.
Transformation
matrix for FV.
• Thus the coordinates of point P in FV is given by
𝑥𝑓
𝑦𝑓
0
1
=
𝑥
𝑦
𝑧
1
18. 18
Transformation for Orthographic Projection (TV):
Fig:- TV of Orthographic Projection
• TV can be obtained easily by setting y=0 for all
points on the model.
• Here we are considering XY plane for
transformation and Y=0, thus in viewing
coordinate system Yt= -Z.
• The coordinate of any point P on the solid
model in MCS is 𝑃 =
𝑥
𝑦
𝑧
1
•
𝑥𝑡
𝑦𝑡
0
1
= *
𝑥
𝑦
𝑧
1
This transformation matrix is obtained through
OTV = Rx90
0 * Object Matrix
= *
Transformation matrix for TV.
25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
1 0 0 0
0 0 -1 0
0 0 0 0
0 0 0 1
1 0 0 0
0 cos (90) -sin (90) 0
0 sin(90) cos(90) 0
0 0 0 1
1 0 0 0
0 0 0 0
0 0 1 0
0 0 0 1
19. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
19
19
Transformation for Orthographic Projection (RHSV):
• RHSV can be obtained in YZ plane, the X coordinate must be =0.
• Thus the matrix becomes
• In order to obtained coordinates in XY plane the view need to be rotated by 900
in Y direction in clockwise direction; thus = - 900.
• Therefore,
𝑥
𝑦
𝑧
1
= *
0 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
0 0 -1 0
0 1 0 0
0 0 0 0
0 0 0 1
𝑥
𝑦
𝑧
1
This transformation matrix is obtained through
ORHSV = RY -90
0 * Object Matrix
= *
cos (-90) 0 sin(-90) 0
0 1 0 0
-sin(-90) 0 cos(90) 0
0 0 0 1
0 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Transformation matrix for RHSV.
21. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
21
Problems Orthographic Projection:
Pb.1 A triangular prism is shown in fig. With the transformation matrix, generate
the data for the orthographic views of the object in viewing plane. The
coordinates of the vertices are A (2,3,4), B (5,3,4), C (2,5,4), D(2,3,10), E (5,3,10)
and F (2,5,10). Plot the results obtained.
Solution: Here note that viewing plane means XY plane.
Step 1: Writing the coordinates of given object in matrix form i.e.
Homogenous coordinate system.
V=
A B C D E F
X 2 5 2 2 5 2
Y 3 3 5 3 3 5
Z 4 4 4 10 10 10
h 1 1 1 1 1 1
22. 25 April 2022 MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
22
Step 2: Obtaining coordinates in FV
The transformation matrix in viewing plane i.e. in XY plane is given as,
1 0 0 0
0 1 0 0
0 0 0 0
0 0 0 1
Thus the new coordinates can be obtained by VF = [T]*V
VF= * =
1 0 0 0
0 1 0 0
0 0 0 0
0 0 0 1
New Coordinates in
FV.
Step 3: Obtaining coordinates in TV
The transformation matrix in viewing plane i.e. in XY plane is given as,
Thus the new coordinates can be obtained by VT = [T]*V
VT = * = New Coordinates in
TV.
A B C D E F
X 2 5 2 2 5 2
Y 3 3 5 3 3 5
Z 4 4 4 10 10 10
h 1 1 1 1 1 1
2 5 2 2 5 2
3 3 5 3 3 5
0 0 0 0 0 0
1 1 1 1 1 1
1 0 0 0
0 0 -1 0
0 0 0 0
0 0 0 1
1 0 0 0
0 0 -1 0
0 0 0 0
0 0 0 1
A B C D E F
X 2 5 2 2 5 2
Y 3 3 5 3 3 5
Z 4 4 4 10 10 10
h 1 1 1 1 1 1
2 5 2 2 5 2
-4 -4 -4 -10 -10 -10
0 0 0 0 0 0
1 1 1 1 1 1
23. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
23
Step 4: Obtaining coordinates in RHSV
The transformation matrix in viewing plane i.e. in XY plane is given as,
Thus the new coordinates can be obtained by VR = [T]*V
VR = * = New Coordinates in
RHSV.
Step 5: Plotting the Views
0 0 -1 0
0 1 0 0
0 0 0 0
0 0 0 1
0 0 -1 0
0 1 0 0
0 0 0 0
0 0 0 1
A B C D E F
X 2 5 2 2 5 2
Y 3 3 5 3 3 5
Z 4 4 4 10 10 10
h 1 1 1 1 1 1
-4 -4 -4 -10 -10 -10
3 3 5 3 3 5
0 0 0 0 0 0
1 1 1 1 1 1
24. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
24
Pb.2 A triangle has coordinates A(1,2,3), B(4,3,4), C(5,8,2). The three
orthographic views of this triangle are to be projected. Write the transformation
matrix and determine coordinates and plot the views.
Solution: Here note that viewing plane means XY plane.
Step 1: Writing the coordinates of given object in matrix form i.e. Homogenous
coordinate system.
Δ ABC =
Step 2: Obtaining coordinates in FV
The transformation matrix in viewing plane i.e. in XY plane is given as,
1 0 0 0
0 1 0 0
0 0 0 0
0 0 0 1
Thus the new coordinates can be obtained by Δ ABC F = [T]* Δ ABC
A B C
X 1 4 5
Y 2 3 8
Z 3 4 2
h 1 1 1
25. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
25
Δ ABC F = * =
1 0 0 0
0 1 0 0
0 0 0 0
0 0 0 1
Step 3: Obtaining coordinates in TV
Δ ABC T =
Step 4: Obtaining coordinates in RHSV
Δ ABC RSV=
Step 5: Plotting the Views
A B C
X 1 4 5
Y 2 3 8
Z 3 4 2
h 1 1 1
-3 -4 -2
2 3 8
0 0 0
1 1 1
1 4 5
-3 -4 -2
0 0 0
1 1 1
1 4 5
2 3 8
0 0 0
1 1 1
26. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
26
Pb.3 A tetrahedron is defined by the following points A(2,3,4), B(6,3,4), C(2,5,4),
D(4,4,10). Obtain a transformation matrix to generate data for the orthographic
view of the object in viewing plane.
Step 1: Coordinates in FV
A B C D
X 2 6 2 4
Y 3 3 5 4
Z 4 4 4 10
h 1 1 1 1
Co-ord. of Tetrahedron in Matrix Form
Step 2: Coordinates in TV
Step 3: Coordinates in RHSV
2 6 2 4
-4 -4 -4 -10
0 0 0 0
1 1 1 1
-4 -4 -4 -10
3 3 5 4
0 0 0 0
1 1 1 1
2 6 2 4
3 3 5 4
0 0 0 0
1 1 1 1
27. Transformation for Isometric Projection:
• All the projectors are not parallel Projector Plane.
• This preserves the parallelism of the lines but not the angles.
• In this, all three principal axes are equally reduced.
Fig:- Isometric Projection
• In this, the normal projection planes make
equal angle with each principal axis and axes
are equispaced at an angle of 1200.
25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
24
28. • This is done by first looking straight towards one face. Next, the cube is rotated
-45° about the vertical axis, followed by a rotation of approximately 35.264°
about the horizontal axis.
Fig:- Viewing plane angles of
Isometric Projection
Thus,{Pi} = Object matrix (Z=0) *[Rx] * [Ry] *{P}
Transformation
matrix for Isometric
Projection
Now,
[Rx] = and [Ry] =
1 0 0 0
0 cos ᴓ -sin ᴓ 0
0 sin ᴓ cos ᴓ 0
0 0 0 1
cos 0 sin 0
0 1 0 0
- sin 0 cos 0
0 0 0 1
Note: Here anticlkwise rotation assumed for Rx and Ry, thus the
angles are considered to be positive.
25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
28
• To obtain most common orientation in the viewing plane (i.e. XY plane and
Z=0), consider an example of cube;
29. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
29
Thus,[T]= Oz*[Rx]*[Ry]= * * =
1 0 0 0
0 cos ᴓ -sin ᴓ 0
0 sin ᴓ cos ᴓ 0
0 0 0 1
cos 0 sin 0
0 1 0 0
- sin 0 cos 0
0 0 0 1
Transformation
matrix for Isometric
Projection
Pb.4 Write down the transformation matrix for generating an isometric view. Generate the
data for the isometric view of the object in the viewing plane for a triangular prism with
vertices A(20,30,40), B (50,30,40), C (20,50,40), D(20,30,100), E(50,30,100) and F
(20,50,100). Plot the results obtained.
Solution: Here note that viewing plane means XY plane.
Step 1: Writing the coordinates of given object in matrix form i.e.
Homogenous coordinate system.
V=
1 0 0 0
0 1 0 0
0 0 0 0
0 0 0 1
0.7070 0 -0.7070 0
-0.408 0.817 -0.408 0
0 0 0 0
0 0 0 1
A B C D E F
X 20 50 20 20 50 20
Y 30 30 50 30 30 50
Z 40 40 40 100 100 100
h 1 1 1 1 1 1
30. 25 April 2022
MITWPU, PUNE: TY BTECH (MECH ENGG)
Computer Graphics (PE-III)
30
Step 2: Obtaining transformation matrix in ISO
The transformation matrix in viewing plane i.e. in XY plane is given as,
Hence the coordinate of new geometry are Viso=Iso * V
i.e. Viso = * =
0.7070 0 -0.7070 0
-0.408 0.817 -0.408 0
0 0 0 0
0 0 0 1
0.7070 0 -0.7070 0
-0.408 0.817 -0.408 0
0 0 0 0
0 0 0 1
-14.14 7.07 -14.14 -56.56 -35.35 -56.56
0.03 -12.21 16.37 -24.45 -36.69 -8.11
0 0 0 0 0 0
1 1 1 1 1 1