Graphic Communications Lecture 8: Projections Assoc. Prof.Dr. Cengizhan İpbüker İTÜ-SUNY 2004-2005 2005 Fall ipbuker_graph06
Projections The projections used to display 3D objects in 2D are called Planar Geometric Projections For computer graphics, the main types of projection used are: Perspective Projections Parallel Projections Perspective projections are defined by a Center Of Projection (COP) and a projection plane Parallel projections are defined by a Direction Of Projection and a projection plane
Perspective Projections Perspective projections are defined by a Center Of Projection (COP) and a projection plane Perspective projections produce a perspective foreshortening effect They tend, therefore, to appear more realistic than parallel projections (this is how our eye and a camera lens form images) Object positions are transformed to the view plane along lines that converge to a point (the COP)
Perspective projections The projected view of an object is determined by calculating the intersections of the projection lines with the view plane Projection lines (or centre of projection)
Perspective Projections Parallel lines in the 3D model which are not parallel to the projection plane, converge to a vanishing point If the vanishing point lies on a principle axis, it is called a principle vanishing point
Perspective Projections - Cont. The number of principal vanishing points is determined by the number of principal axes cut by the projection plane. If the plane only cuts the z axis (most common), there is only 1 vanishing point. 2-points sometimes used in architecture and engineering. 3-points seldom used add little extra realism
Perspective Projections - Cont. 2-points sometimes used in architecture and engineering
Perspective projections Perspective views and principal vanishing points of a cube for various orientations of the view plane relative to the principal axes of the object
Perspective Projections - Cont. 3-points seldom used add little extra realism
Perspective projections s1 s2 Perspective projection of objects at different distances from the view plane: the shorter segment s1 appears longer => no preservation of relative proportions
Parallel Projections Parallel projections are defined by a Direction Of Projection (DOP) and a projection plane DOP also called projection vector Coordinate positions are transformed to the view plane along parallel lines Important property: they preserve relative proportions of objects Less realistic effect
Parallel projections DOP (projection plane)
Parallel Projections Classified as orthographic or oblique The DOP makes 2 angles with the projection plane Orthographic means DOP is perpendicular to the projection plane, i.e. both angles are 90 degrees Oblique means DOP not perpendicular DOP i.e. one or both angles are not equal to 90 degrees orthographic DOP oblique
Parallel projections 3 parallel projections of an object showing relative proportions from different viewing positions. Used in engineering and architectural drawings: object represented through a set of views => its appearance can be reconstructed from these views
Orthographic projections Plan Elevation Model Side Elevation Front Elevation
Orthographic projections Orthographic projections of an object (plan + elevation views)
Oblique Oblique projections are used to give a flat view of the most important side and view of two other sides at a given angle φ (e.g., 45 degrees) This view is most useful if we need to show a small detail on one side but don't need all other complete views (e.g., plan and elevation). φ
Perspective Projections - 1 View Plane CO P The larger-sized object will be smaller on the viewplane because it is further away from the Centre of Projection (COP)
Perspective Projections - 2 To obtain a perspective projection of a threedimensional object, we transform points along projection lines that meet at the COP Example: z=d projection plane; (0,0,0) COP y-axis x-axis P P (x P,y P,d) P(x,y,z) d z-axis
View along y axis Other Views x-axis Projection Plane x P P(x,y,z) d z-axis View along x axis d z-axis P(x,y,z) y-axis Projection Plane
Perspective projections: equations To calculate P P = (x P,y P,z P ), the perspective projection of (x,y,z) onto the projection plane at z = d we use the shared properties of similar triangles x P d y P d = = x z y z x-axis Mutiplying each side by d yields x P = d.x z x = z/d y P = d d.y z Projection Plane y = z/d x P P(x,y,z) z-axis The distance d is just a scale factor applied to x P and y P All values of z are allowable except z = 0
Homogeneous Matrix Form Using a 3D homogeneous coordinate representation, we can write the perspective projection transformation matrix form X p d/z 0 0 0 x Y p Z p = 0 d/z 0 0 0 0 d/z 0 y z 1 0 0 1/z 0 (x P, y P, z P, 1) = ( ) d, 1 x, z/d y, z/d 1
Projection Equations Cont. This makes sense intuitively: the further away from the origin (our COP) a point P is, the larger its z value By dividing the x and y co-ordinates of every point of an object by the z coordinate means that objects further away will have each x and y divided by a larger number, and therefore the projection onto the projection plane will be much smaller than objects that are closer to the COP (in this case the origin)