You are on page 1of 44

3D viewing

Projections
• Projections transform points in n-space to m-space, where m < n.
• In 3D, we map points from 3-space to the projection plane (PP) along
projectors emanating from the center of projection (COP).
• There are two basic types of projections:
• Perspective - distance from COP to PP finite
• Parallel - distance from COP to PP infinite
Parallel projection
Perspective projection
Perspective vs. parallel projections

Perspective projections pros and cons: Parallel projection pros and cons:
+Size varies inversely with -Less realistic looking
distance - looks realistic + Good for exact measurements
– Distance and angles are not (in + Parallel lines remain parallel
general) preserved
– Angles not (in general)
– Parallel lines do not (in general) preserved
remain parallel
Perspective projection
Perspective projection
• Projectors converge at a finite
center of projection.
• Parallel lines converge.
• We get non-uniform
foreshortening.
• Shape is not preserved.
• We see in perspective – so
perspective viewing seems
natural and helps in depth
perception.
Perspective projection
• Distance from COP to projection plane is finite.
• The projectors are not parallel & we specify a center of projection (COP).
• Center of Projection is also called the Perspective Reference Point COP=PRP
• Perspective foreshortening:
• The size of the perspective projection of the object varies inversely with the
distance of the object from the center of projection.

A perspective projection of two equal-length line segments at


different distances from the view plane.
Vanishing points
• 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?


A typical eye space
Types of perspective drawing
• Perspective drawings are often classified by the number of principal
vanishing points.
• One-point perspective — simplest to draw
• Two-point perspective — gives better impression of depth
• Three-point perspective — most difficult to draw
Y

Perspective projection
C’ X
• Centre of projection (0,0,Zc) B’
C
• Point to be projected P(x,y,z) B
• Projection plane : plane on which point P is
projected which is perpendicular to z- A P’
principle axis. P
• Projected point P’ (x’,y’) , z=0
A B’
B

B’

A C’
C
Perspective projection
• First we apply a perspective transform to a point X that takes it to X’

• Now we add projection on the z=0 plane.


Vanishing point
• Vanishing point in the z direction.
• Set of lines not parallel to the projection plane converge at a
vanishing point.
• If we want to know the vanishing point, we can actually take a point
at infinity an apply our perspective transformations.
• Here , to find the vanishing point along the z direction we apply the
perspective transformation to the point at infinity along the z direction.
• Remember that homogenous co-ordinate enable us to represent point at infinity, just by the
homogeneous part of co-ordinate as zero i.e. [0 0 1 0] :This is the point at infinity on positive Z-
axis.
Vanishing point
• apply the perspective transformation we have seen in previous
section, using the value of ‘r’ in the last row, we obtain

• After dividing by the last homogeneous co-ordinate,


Perspective Projection Types
• Single point perspective projection
• Two point perspective projection
Fig a. Single point perspective projection
• Three point perspective projection

Fig b. Two point perspective projection


Fig c. Three point perspective projection
Single point perspective-COP on x-axis
Single point perspective-COP on y-axis
• The first figure represents single-point perspective transformation.
• The lines along X-axis seem to be parallel, the lines along Y axis also seem to
be parallel but the lines along Z-axis seem to converge to a point, thus giving
us single-point perspective transformation.
• The second figure is two-point perspective.
• The lines along the Y-axis seemed to be parallel, but the lines along other
ones seem to converge.
• The third figure is three-point perspective.
• None of the parallel lines seem to remain parallel. They tend to converge at
some point.
Two-point perspective
• After we have seen our single-point perspective transformation, the idea
can be extended to two-point perspective transformations using the same
framework of the matrix.
• Now, instead of having one of the values of last row as non-zero, we can
have two values p and q, as seen in figure below:
1 0 0 0
0 1 0 0
0 0 1 0
𝑝 𝑞 0 1
• which can also be obtained by concatenating the individual matrixes of
one-point perspective as in the matrix above Pp and Pq.
• So this is two-point perspective transformations.
• So this will give us two centre of projections and correspondingly two
principal vanishing points
Three-point perspective
• We can further extend the idea of two-point perspective
transformations where all the three entries of the last row are non-
zero and again this can be obtained by concatenating the three single-
point perspective transformations.
• This gives us, three center projections and three principal vanishing
points.
1 0 0 0
0 1 0 0
0 0 1 0
𝑝 𝑞 𝑟 1
Generation of perspective views : translation
• If we apply the translation offset (l,m,n) to the object, the centre of
projection at zc and the projection plane z = 0 and we just concatenate the
translation matrix and the projection matrix and we get a result is shown in
figure below

• An example of this if we consider figure above, the translation along say y =


x line, an object initially located at the origin point when translated along y
= x line will look like the subsequent figures or objects ,as in above figure
,along that line which adds to the 3D viewing.
• So a simple translation is adding to the process of 3D viewing
• Similarly if we have a translation along z will actually give us the
notion of scaling and that is what we observe what is known as
“zooming-in or zooming-out”.
• As in the figure above an object located far from the centre
of projection(COP) will look small and object located near to the COP
will look bigger.
Generation of perspective views : Rotation
Parallel projections
Parallel projection
Orthographic Projections
• Consider the projection plane perpendicular to one of the co-ordinate
axis(x/y/z axis) or parallel to one of the principal planes(for e.g. xz-
plane/yz- plane/xy-plane are also called principal planes) formed by
any two coordinate axes.
Orthographic Projections
• Let say,we consider a projection
plane is perpendicular to the Y-
axis, then we get a projection
which is referred as the top
view.
• If the projection plane is
perpendicular to the X-axis, then
we get a projection which is
referred as the side view
• if the projection plane is is
perpendicular to the Z-axis, then
we get a projection which is
referred as the front view.
• We observed that the projectors are parallel.
• we may require say x=0, y=0, z=0 planes which generate number of
views and one view is not adequate to represent the 3D aspect.
• the shape and size of an object does not change
• If we want to perform orthographic projection, we want that the
projection should be like transformation matrix, so that we can use
the transformation just in a way we use the geometrical
transformations.
Let us take the orthographic projection on z=0 plane which is

• Similarly, if we need to take an orthographic projection on Y=0 plane,


then the second row entries are zero.
• If we need to take an orthographic projection on X=0 plane, then the
first row entries are zero.
Axonometric Projection
• There is a class of projections called axonometric projections, where
we perform additional rotations , translations and then we perform
projection on Z=0 plane – better representation of a 3D object using 1
view.
• That is, by combining some transformations like rotation and translation
before we perform standard orthographic projection.
• it can actually render 3D aspect of an object.
• Face parallel to projection plane shows true shape and size.
• In axonometric projections when projections are done, there can be
some sort of distortion or foreshorting in each of the dimensions.
Axonometric Projection
• In order to compute these foreshortenings, we take a unit vector in X, a
unit vector in Y and a unit vector in Z in a homogeneous coordinate
system.

• What we see from the above that we take a unit vector along X i.e.
[ 1 0 0 1] , perform transformation T , we get [Xx’ YX’ 0 1].
• Similarly, we take a unit vector along Y i.e. [ 0 1 0 1] , perform
transformation T , we get [Xy’ Yy’ 0 1].
• And we take a unit vector along Z i.e. [ 0 0 1 1] , perform
transformation T , we get [Xz’ Yz’ 0 1]
• The foreshortening ratios for each projected principal axes are then
given by:

• foreshortening means what is the amount of distortion happened in


each dimension. (This is sometimes called scaling )
Types of axonometric projection
• Depending on the relationships of foreshortenings, we have three
types of axonometric projections.
• Trimetric : where no foreshortenings is the same

• Dimetric : where two foreshortenings are same

• Isometric : All foreshortenings are the same.


isometric projections
• We consider two rotations
• a) about Y-axis by an angle, ɸ
b) about X-axis by angle Ɵ
and then the projection on Z = 0 plane.
• The transformation,
• Now we apply this axonometric projection to [T] to unit vector [U]

• So the foreshortening ratios become

• For Isometric projections, if we solve for then we get and f x = f y = f z


θ=35.26 degrees =±45 degrees.
Oblique Projection
• Projectors are parallel
• because we want the center of projection to lie at infinity.
• But they need not be perpendicular to the projection plane.
• This gives us oblique projection.
• With the oblique property, the true shape and size will be preserved only to the faces
parallel to the projection plane.
Oblique Projection
• Mathematically , we observe
• We have a point P given as (x,y,z)
• we have a projection plane (xy-plane)
• PP’’ is the projector
• Now we want to get the value of (Xp,Yp)
• which are the coordinates of point P in XY-plane.
• The projector which is parallel to the z-axis is PP’ where P’(x,y) .
• We can represent (Xp,Yp) in terms of (x,y).
• So

• Where L is P’P’’
• φ is the angle between P’P’’ and x-axis on xy-plane.
• The angle which the projector is making with the projection is α.
• For a given α ,we can get many projectors.
• So we have to restrict the location of projector, which we can do this
using φ ,then PP’P” gives us a cone, which is a set of all projectors.
• Then, α is related to z and L which is given as
tan α = z/L
• Or L = z cot α
Oblique projections :Cavalier and cabinet
projection
• Depending on what α we choose we get a particular type of oblique
matrix for some value of φ.
• The oblique projection is called cavalier projection when α = 45°.
• Here the lines which are perpendicular to the projection plane are not foreshortened.
• The oblique projection is called cabinet when cot α = ½.
• then the lines perpendicular to the plane of projection is foreshortened by
half.
• The value of φ is either 30° or 45° .

You might also like