Date post: | 03-Jan-2016 |
Category: |
Documents |
Upload: | moses-ellison |
View: | 22 times |
Download: | 0 times |
3D Concepts
UNIT 3
3-D Coordinate Spaces• Remember what we mean by a 3-D coordinate
space
x axis
y axis
z axis
P
y
zx
Right-Hand Reference System
Translations In 3-D• To translate a point in three dimensions by tx,
ty and tz simply calculate the new points as follows:• x’ = x + tx y’ = y + ty z’ = z + tz
(x’, y’, z’)
(x, y, z)
Translated Position
Scaling In 3-D
• To scale a point in three dimensions by sx, sy and sz simply calculate the new points as follows:• x’ = sx*x y’ = sy*y z’ = sz*z
(x, y, z)
Scaled Position
(x’, y’, z’)
Rotations In 3-D
x’ = x·cosθ - y·sinθ
y’ = x·sinθ + y·cosθ
z’ = z
x’ = x
y’ = y·cosθ - z·sinθ
z’ = y·sinθ + z·cosθ
x’ = z·sinθ + x·cosθ
y’ = y
z’ = z·cosθ - x·sinθ
• The equations for the three kinds of rotations in 3-D are as follows:
Homogeneous Coordinates In 3-D
• Similar to the 2-D situation we can use homogeneous coordinates for 3-D transformations - 4 coordinate column vector
• All transformations can then be represented as matrices
1
z
y
x
x axis
y axis
z axis
P
y
zxP(x, y, z) =
3D Transformation Matrices
1
0100
0010
0001
tztytx
1000
000
000
000
z
y
x
s
s
s
1000
0cos0sin
0010
0sin0cos
Translation bytx, ty, tz
Scaling by sx, sy, sz
1000
0cossin0
0sincos0
0001
Rotate About X-Axis
1000
0100
00cossin
00sincos
Rotate About Y-Axis Rotate About Z-Axis
Projections• Our 3-D scenes are all specified in 3-D world
coordinates• To display these we need to generate a 2-D
image - project objects onto a picture plane
• So how do we figure out these projections?
Picture Plane
Objects in World Space
Converting From 3D To 2D
• Projection is just one part of the process of converting from 3D world coordinates to a 2D image
Clip against view volume
Project onto projection
plane
Transform to 2-D device
coordinates
3-D world coordinate
output primitives
2-D device coordinates
3D Viewing• In 2D viewing we have 2D window & 2D viewport &
objects in the world coordinates.• The 3D viewing has an added dimension which makes it
complex as even though objects are 3D the display devices are only 2D.
• The mismatch between 3D objects & 2D displays is compensated by introducing projections. The projection transforms 3D objects into a 2D projection plane.
• View plane: It is nothing but the film plane in a camera which is positioned & oriented for a particular shot of the scene.
• World coordinates positions in the scene are transformed to viewing coordinates, then viewing coordinates are projected onto the view plane.
• View reference point: This point is the center of our viewing coordinate system.
• The production of a 2D image of higher dimensional object refers to graphical projection.
• A projection can be defined as a mapping of any point P[x,y,z] to its image P`[x`,y`,z`] onto the view plane, called as projection plane.
• Parallel & perspective projections are the two broad categories of projections.
Types of Projections• There are two broad classes of projection:– Parallel: Typically used for architectural and
engineering drawings.– Perspective: Realistic looking and used in
computer graphics.
Perspective ProjectionParallel Projection
Parallel Projections• Some examples of parallel projections
Orthographic Projection
Isometric Projection
Perspective Projections• Perspective projections are much more realistic
than parallel projections
Geometric projection
PerspectiveParallel
Orthographic
Three-point
Two-pointOblique
Top
One-point
Other
Other
Cavalier
Isometric
Cabinet
Front
Axonometric
Side elevatio
n
• Parallel projection:– If the direction of projection is perpendicular to the
projection plane, it is an orthographic projection.– If the direction of projection is not perpendicular to
the projection plane is called as oblique projection.– A multi-view projection displays a single face of a 3D
object.– Axonometric projections allow the user to place the
view-plane normal in any direction such that 3 adjacent faces of a cube like object are visible.
– Dimetric projections differ from isometric projections in the direction of the view-plane normal.
– Trimetric projections allow the viewer the most freedom in selecting the components of n.
• Perspective projection:– It is a type of projection where 3D objects are not
projected along parallel lines, but along lines emerging from a single point.
– A vanishing point is a point in a perspective drawing to which parallel lines appear to converge.
– One-point perspective exists when a painting plate is parallel to two axes of a rectilinear scene.
– Two point perspective
Assignment
OrthographicWireframe
Elevation
OrthographicWireframe
Plan
OrthographicWireframeEnd-Elevation
PerspectiveView