0% found this document useful (0 votes)
90 views

Unit-5 3D Transformation & Viewing: 2160703 Computer Graphics

This document discusses 3D transformations and viewing in computer graphics. It covers topics like 3D translation, rotation, and scaling using transformation matrices. It explains coordinate axis rotations around the X, Y, and Z axes as well as general rotations for arbitrary axes. The viewing pipeline, viewing coordinates, projections, and view volume are also introduced.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views

Unit-5 3D Transformation & Viewing: 2160703 Computer Graphics

This document discusses 3D transformations and viewing in computer graphics. It covers topics like 3D translation, rotation, and scaling using transformation matrices. It explains coordinate axis rotations around the X, Y, and Z axes as well as general rotations for arbitrary axes. The viewing pipeline, viewing coordinates, projections, and view volume are also introduced.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 71

2160703

Computer Graphics

Unit-5
3D Transformation
& Viewing
Prof. Vijay M. Shekhat
9558045778
[email protected]
Outline
 3D Translation
 3D Rotation
 3D Scaling
 Other Transformation
 Viewing Pipeline
 Viewing Co-ordinates
 Projections
 View Volume and General Projection Transformation

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 22 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
3D Translation
 Similar
  to 2D translation, which used matrices, 3D translation use
matrices .
 In 3D translation point is to be translated by amount , and to
location .

 Matrix equation,
y

(x’, y’, z’)


(x, y, z)

z x

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 33 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Example- 3D Translation
  Translate the given point into 3D space with translation factor .

 Final coordinate after translation is .

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 44 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Rotation
  For 3D rotation we need to pick an axis to rotate about.
 The most common choices are the , the , and the , it is known as
coordinate axis rotation.
 We can also chose other arbitrary axis for rotation.

Source: http://www.c-jump.com

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 55 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Z-Axis Rotation
 Two
  dimension rotation equations can be easily convert into 3D
rotation equations.
 Rotation about axis we leave coordinate unchanged.
Y

where Parameter specify rotation angle.


X
 Matrix equation is written as, Z

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 66 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
X-Axis Rotation
 Transformation
  equation for is obtain from equation of rotation
by replacing cyclically as
 Rotation about we leave coordinate unchanged.

where Parameter specify rotation angle. X


 Matrix equation is written as, Z

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 77 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Y-Axis Rotation
 Transformation
  equation for is obtain from equation of rotation
by replacing cyclically as
 Rotation about we leave coordinate unchanged.

where Parameter specify rotation angle. X


 Matrix equation is written as, Z

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 88 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Example- Coordinate Axis
Rotation
  Rotate the point about Z-axis.

 Final coordinate after rotation is .

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 99 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
General 3D Rotations
When
  rotation axis is parallel to one of the standard axis.
 Three steps require to complete such rotation these are,
1. Translate the object so that the rotation axis coincides with
the parallel coordinate axis.
2. Perform the specified rotation about that axis.
3. Translate the object so that the rotation axis is moved back to
its original position.
 This can be represented in equation form as,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 10
10 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
General 3D Rotations
When rotation axis is inclined in arbitrary direction.
 First we need rotations to align the axis with a selected coordinate
axis and to bring the axis back to its original orientation.
 Five steps require to complete such rotation these are,
1. Translate the object so that the rotation axis passes through the
coordinate origin.
2. Rotate the object so that the axis of rotation coincides with one of the
coordinate axes.
3. Perform the specified rotation about that coordinate axis.
4. Apply inverse rotations to bring the rotation axis back to its original
orientation.
5. Apply the inverse translation to bring the rotation axis back to its original
position.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 11
11 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 We
  can transform rotation axis onto any of the three coordinate
axes. The is a reasonable choice.
 We are given line in the form of two end points , and.
 Let’s discuss procedure step by step.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 12
12 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
1. Translate the Object so that the Rotation
Axis Passes Through the Coordinate Origin
 For
  translation of step one we will bring first end point at origin
and transformation matrix for the same is as below

Y
 𝑝2

 𝑝1

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 13
13 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
2. Rotate the Object so that the Axis of Rotation
Coincides with One of the Coordinate Axes

 This
  task can be completed by two rotations first rotation about
and second rotation about .
 But here we do not know rotation angle so we will use dot
product and vector product.
 Vector notation for rotation axis is,

 Unit vector along rotation axis is obtained by dividing vector by its


magnitude.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 14
14 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 Now
  we need cosine and sine value of angle between unit vector
and plane.
 For that take projection of on say
 Find dot product and cross product of and .
 Coordinate of is as we will take projection on value is zero.
 Dot product,

𝑌 
𝑢’
  𝑢 
𝛼 
𝑋 
𝑢  𝑧
𝑍 
Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 15
15 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
  Cross product,
…(1)

 From (1) and (2),

 Comparing magnitude

𝑌 
𝑢’
  𝑢 
𝛼 
𝑋 
𝑢  𝑧
𝑍 
Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 16
16 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 Now
  we have and so we will write matrix for rotation about X-
axis.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 17
17 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 After
  performing above rotation will rotated into in with
coordinates .
 As we know rotation about axis will leave coordinate unchanged.
 is in so coordinate is zero, and component is same as magnitude
of .
 Now rotate about so that it coincides with .

𝑌 

𝑢 
𝑢𝑧
 
𝑋 
𝛽  𝑢
  ′′
𝑍 
Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 18
18 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 For
  that we repeat above procedure between and to find matrix
for rotation about .
 Dot product,

𝑌 

𝑢 
𝑢𝑧
 
𝑋 
𝛽  𝑢
  ′′
𝑍 
Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 19
19 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
  Cross product,

 From (1) and (2),

 Comparing magnitude

𝑌 

𝑢 
𝑢𝑧
 
𝑋 
𝛽  𝑢
  ′′
𝑍 
Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 20
20 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
  Now we have and so we will write matrix for rotation about .

 Now by combining both rotation we can coincides rotation axis


with Z-axis

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 21
21 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
3. Perform the Specified Rotation
About that Coordinate Axis
  As we align rotation axis with so now matrix for rotation about ,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 22
22 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
4. Apply Inverse Rotations to Bring the
Rotation Axis Back to it’s Original Orientation
  This step is inverse of step number 2,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 23
23 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
5. Apply the Inverse Translation to Bring the
Rotation Axis Back to it’s Original Position
  This step is inverse of step number 1,

 So finally sequence of transformation for general 3D rotation is

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 24
24 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Scaling
 It is used to resize the object in 3D space.
 We can apply uniform as well as non uniform scaling by selecting
proper scaling factor.
 Scaling in 3D is similar to scaling in 2D. Only one extra coordinate
need to consider into it.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 25
25 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Coordinate Axes Scaling
  Simple coordinate axis scaling can be performed as below,

𝑌
 

Scaling

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 26
26 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Example-Coordinate Axes
Scaling
 Example:
  - Scale the line with coordinates and respectively with
scale factor .

 Final coordinates after scaling are,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 27
27 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Fixed Point Scaling
 Fixed point scaling is used when we require scaling of object but
particular point must be at its original position.
 Three steps require to complete such fixed point scaling these are,
1. Translate the fixed point
 𝑌
to the origin.
2. Scale the object relative
to the coordinate origin
using coordinate axes
scaling.
Fixed Point X
3. Translate the fixed point
back to its original
position. Z

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 28
28 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
  Matrix equation

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 29
29 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Other Transformations-
Reflection
 Reflection
  means mirror image produced when mirror is placed at
require position.
 When mirror is placed in XY-plane we obtain coordinates of image
by just changing the sign of coordinate.
 Transformation matrix for reflection about XY-plane is given below,

Source: http://www.yourarticlelibrary.com
Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 30
30 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
  Similarly Transformation matrix for reflection about YZ-plane is,

 Similarly Transformation matrix for reflection about XZ-plane is,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 31
31 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Other Transformations-Shear
  Shearing transformation can be used to modify object shapes.
 They are also useful in 3D viewing for obtaining general projection
transformations.
 Here we use shear parameter and
 Shear matrix for Z-axis is given below,

Source: http://140.129.20.249/~jmchen/cg
Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 32
32 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Other Transformations-Shear
  Similarly Shear matrix for X-axis is,

 Similarly Shear matrix for Y-axis is,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 33
33 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Viewing Pipeline

Modeling Viewing
MC WC
Transformation Transformation

VC

Projection Workstation
PC DC
Transformation Transformation

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 34
34 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Viewing Co-ordinates
 Generating a view of an object is similar to photographing the
object.
 We can take photograph from any side with any angle &
orientation of camera.
 Similarly we can specify viewing coordinate in ordinary direction.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 35
35 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Specifying the View Plan
 We
  decide view for a scene by first establishing viewing coordinate
system, also referred as view reference coordinate system.
 Projection plane is setup in perpendicular direction to axis.
 Projections positions in the scene are transferred to viewing
coordinate.
 Then viewing coordinate are projected onto the view plane.
 The origin of our viewing coordinate system is called view reference
point.
 View reference point is often chosen to be close to or on the
surface as same object scene.
 We can choose other point also.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 36
36 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 Next
  we select positive direction for the viewing axis and the
orientation of the view plane by specifying the view plane normal
vector .
 Finally we choose the up direction for the view by specifying a
vector called the view up vector. Which specify orientation of
camera.
 View up vector is generally selected perpendicular to normal
vector but we can select any angle between .

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 37
37 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 By
  fixing view reference point and changing direction of normal
vector we get different views of same object.

Source: https://sourcemaking.com

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 38
38 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
World to Viewing Coordinates Transformation
 Before taking projection of view plane object description is need
to transfer from world to viewing coordinate.
 It is same as transformation that superimposes viewing coordinate
system to world coordinate system.
 It requires following basic transformation.
1. Translate view reference point to the origin of the world
coordinate system.
2. Apply rotation to align.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 39
39 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 Consider
  view reference point in world coordinate system is at
position .
 For align view reference point to world origin we perform
translation with matrix,

 Now we require rotation sequence up-to three coordinate axis


rotations depending upon direction we choose for .
 In general case is at arbitrary direction then we can align it with
word coordinate axes by rotation sequence.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 40
40 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 Another
  method for generating the rotation transformation matrix
is to calculate unit vectors and from the composite rotation
matrix directly,

 This method also automatically adjusts the direction for so that is


perpendicular to .

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 41
41 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
  Than composite rotation matrix for the viewing transformation is,

 This aligns to axis, to axis and to axis.


 Finally composite matrix for world to viewing coordinate
transformation is given by,

 This transformation is applied to object’s coordinate to transfer


them to the viewing reference frame.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 42
42 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Projections
 Process of converting three-dimensional coordinates into two-
dimensional scene is known as projection.
 There are two projection methods namely,
1. Parallel Projection.
2. Perspective Projection.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 43
43 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Parallel Projections
 In a parallel projection, coordinate positions are transformed to
the view plane along parallel lines.
 We can specify a parallel projection with a projection vector that
defines the direction for the projection lines.
 It is further divide into two types,
1. Orthographic parallel projection.
2. Oblique parallel projection. View Plane
 
𝑝1 ′
 
𝑝1
 
𝑝2  
𝑝2 ′

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 44
44 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Orthographic Parallel
Projection
 When the projection lines are perpendicular to the view plane, we
have an orthographic parallel projection.
 Orthographic projections are most often used to produce the
front, side, and top views of an object.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 45
45 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 Engineering and architectural drawings commonly use
orthographic projections.
 We can also form orthographic projections that display more than
one face of an object.
 Such view are called axonometric orthographic projections. Very
good example of it is Isometric projection.
 Transformation equations for an orthographic parallel projection
are straight forward.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 46
46 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
  If the view plane is placed at position along the axis.
 Then any point in viewing coordinates is transformed to projection
coordinates as,

 Original -coordinate value is preserved for the depth information.

(𝑋 , 𝑌 , 𝑍 )
  Yv

(X,Y)
Xv

Zv

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 47
47 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Oblique Parallel Projection
 An
  oblique projection is obtained by projecting points along
parallel lines that are not perpendicular to the projection plane.
 is a point of which we are taking oblique projection on the view
plane and point on view plane is orthographic projection of .
 Now from figure using trigonometric rules we can write,

Yv

(Xp, Yp)
(𝑋 ,𝑌 ,𝑍)
 
αL
Φ
Xv
(X,Y)

Zv
Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 48
48 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 Length
  depends on the angle and the coordinate of the point to
be projected,
Yv

(Xp, Yp)
(𝑋 ,𝑌 ,𝑍)
 
αL
Φ
 Now put the value of in projection equation. Xv
(X,Y)

Zv

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 49
49 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
  Transformation matrix for this equation,

 This equation can be used for any parallel projection.


 For orthographic projection L1=0 and so whole term which is
multiply with z component is zero.
 When value of projection is known as Cavalier projection.
 When value of projection is known as Cabinet projection.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 50
50 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Perspective Projection
 In perspective projection object positions are transformed to the
view plane along lines that converge to a point called the
projection reference point (or center of projection or vanishing
point).

View Plane
  𝑝1
 𝑝 ′
1

 𝑝 ′
  𝑝2 2 Projection Reference Point

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 51
51 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 Suppose
  we set the projection reference point at position along
the axis.
 We place the view plane at as shown in figure.
 We can write equations describing coordinate positions along this
perspective projection line in parametric form as,
 𝑃=(𝑥 , 𝑦 , 𝑧)
 (𝑥 𝑝 , 𝑦 𝑝 , 𝑧 𝑣𝑝 )
  𝑧 𝑣𝑝  
𝑧 𝑝 𝑟𝑝  𝑧 𝑣
View Plane
 Here parameter takes the value from , which is depends on the
position of object, view plane, and projection reference point.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 52
52 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
  For obtaining value of we will put and solve equation of .

 Now substituting value of in equation of and we will obtain,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 53
53 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 Using
  3D homogeneous-coordinate representations, we can write
the perspective projection transformation matrix form as,

 In this representation, the homogeneous factor is,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 54
54 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 There
  are number of special cases for the perspective
transformation equations.
 If view plane is taken to be plane, then and the projection
coordinates are,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 55
55 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 If
  we take projection reference point at origin than and the
projection coordinates are,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 56
56 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 The vanishing point for any set of lines that are parallel to one of
the principal axes of an object is referred to as a principal
vanishing point.
 With the orientation of the projection plane, and perspective
projections are accordingly classified as,
1. One-point
2. Two-point
3. Three-point projections.
 The number of principal vanishing points in a projection is
determined by the number of principal axes intersecting the view
plane.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 57
57 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
View Volumes and General Projection
Transformations

Parallelepiped Frustum
View Volume View
𝑍𝑣
  Volume

Window Window
 𝑍𝑣
Back Front
Plane Plane
Back Projection
Front
Plane Reference
Plane
Point
(a) Parallel Projection (b) Perspective Projection

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 58
58 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 Based on view window we can generate different image of the
same scene.
 Volume which is appears on the display is known as view volume.
 Given the specification of the view window, we can set up a view
volume using the window boundaries.
 Only those objects within the view volume will appear in the
generated display on an output device, all others are clipped from
the display.
 The size of the view volume depends on the size of the window.
 Shape of the view volume depends on the type of projection to be
used to generate the display.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 59
59 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 A
  finite view volume is obtained by limiting the extent of the
volume in the direction.
 This is done by specifying positions for one or two additional
boundary planes.
 These -boundary planes are referred to as the front plane and
back plane, or the near plane and the far plane, of the viewing
volume.
 Orthographic parallel projections are not affected by view-plane
positioning.
 Because the projection lines are perpendicular to the view plane
regardless of its location.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 60
60 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
General Parallel-Projection Transformation
 Oblique projections may be affected by view-plane positioning,
depending on how the projection direction is to be specified.
 Obtain transformation matrix for parallel projection which is
applicable to both orthographic as well as oblique projection.
 parallel projection is specified with a projection vector from the
projection reference point to the view window.

Window N 𝑍𝑣
 

View Vp
Volume

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 61
61 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
  Now we will apply shear transformation
 View volume will convert into regular parallelepiped and
projection vector will become parallel to normal vector .
 Let’s consider projection vector .
 We need to determine the elements of a shear matrix
 That will align the projection vector with the view plane normal
vector . This transformation can be expressed as,

Window N 𝑍𝑣
 

View 𝑉  ’ 𝑝
Volume

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 62
62 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
  
whereis equivalent to the parallel projection matrix and
represents a shear of the form,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 63
63 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
  Now from above equation we can write,

 From matrix we can write,

So

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 64
64 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 Thus,
  we have the general parallel-projection matrix in terms of
the elements of the projection vector as,

 For an orthographic parallel projection, , and is the identity matrix.

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 65
65 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
General Perspective-Projection Transformations
 The projection reference point can be located at any position in
the viewing system, except on the view plane or between the
front and back clipping planes.
Frustum
Centerline
 𝑍𝑣 View
Volume

View
Plane Center of
Window
 
(𝑋𝑝𝑟𝑝 ,𝑌𝑝𝑟𝑝 ,𝑍𝑝𝑟𝑝)

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 66
66 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 We
  can obtain the general perspective-projection transformation
with the following two operations,
1. Shear the view volume so that the center line of the frustum is
perpendicular to the view plane.
2. Scale the view volume with a scaling factor that depends on .
Frustum
Centerline
(𝑋 ’’,𝑌 ’’ ,𝑍’ ’)
 

(X’, Y’, Z’)

  View Plane ()
Center of
Window
(Xprp, Yprp, Zprp)
Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 67
67 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 With
  the projection reference point at a general position the
transformation involves a combination of shear and a translation,

Where the shear parameters are,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 68
68 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
 Points
  within the view volume are transformed by this operation
as,

 After shear we apply scaling operation. Equation for that are,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 69
69 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Contd.
  Homogeneous matrix for this transformation is,

 Therefore the general perspective-projection transformation is


obtained by equation,

Unit:
Unit: 55 3D
3D Transformation
Transformation &
& Viewing
Viewing 70
70 Darshan
Darshan Institute
Institute of
of Engineering
Engineering &
& Technology
Technology
Thank You

You might also like