190 likes | 207 Views
Explore 3D transformations, rotations, projections, and viewing in computer graphics. Learn about parallel and perspective projections, isometric views, and more.
E N D
3D Concepts UNIT 3
y axis y P z x Right-Hand Reference System z axis x axis 3-D Coordinate Spaces • Remember what we mean by a 3-D coordinate space
(x, y, z) (x’, y’, z’) Translations In 3-D • To translate a point in three dimensions by tx, tyand tzsimply calculate the new points as follows: • x’ = x + tx y’ = y + ty z’ = z + tz Translated Position
(x’, y’, z’) (x, y, z) Scaled 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’ = 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θ Rotations In 3-D • The equations for the three kinds of rotations in 3-D are as follows:
y axis y P z x z axis x axis 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 P(x, y, z) =
3D Transformation Matrices Translation by tx, ty, tz Scaling by sx, sy, sz Rotate About X-Axis Rotate About Y-Axis Rotate About Z-Axis
Picture Plane Objects in World Space 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?
Converting From 3D To 2D • Projection is just one part of the process of converting from 3D world coordinates to a 2D image 3-D world coordinate output primitives Clip against view volume Project onto projection plane Transform to 2-D device coordinates 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. Parallel Projection Perspective 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 Parallel Perspective Two-point Orthographic Oblique One-point Three-point Axonometric Top Front Side elevation Cavalier Other Cabinet Isometric Other
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 OrthographicWireframeEnd-Elevation OrthographicWireframeElevation PerspectiveView OrthographicWireframePlan