Introduction to Computer Graphics CS 445 / 645 Lecture 11 Chapter 7: Camera TransformationsAnnouncementsTaxonomy of ProjectionsSlide 4Parallel ProjectionOrthographic ProjectionsOblique ProjectionsOblique Parallel-ProjectionSlide 9Transformation MatrixOrthographic ProjectionOrthographic: Screen Space TransformationOrthographic: Screen Space Transformation (Normalization)Perspective TransformationPerspective ProjectionSlide 16Slide 17Slide 18Slide 19A Perspective Projection MatrixSlide 21Projection MatricesPerspective vs. ParallelClassical ProjectionsViewing in OpenGLOpenGL ExampleA 3D SceneViewing Transformations2 Basic StepsSlide 30Creating Camera Coordinate SpaceConstructing Viewing Transformation, VSlide 33Constructing Viewing Transformation, VCompositing Vectors to Form VSlide 36Slide 37Slide 38Final Viewing Transformation, VIntroduction to Computer GraphicsCS 445 / 645Lecture 11Chapter 7: Camera TransformationsAngel: Interactive ComputerGraphicsAnnouncementsMidterm is one week from todayMidterm is one week from today•Old tests will be availableOld tests will be available•Detailed list of chapter coverage made availableDetailed list of chapter coverage made available•Homework on Thursday to sample coverageHomework on Thursday to sample coverage•Material covers up to today’s classMaterial covers up to today’s classMidterm is one week from todayMidterm is one week from today•Old tests will be availableOld tests will be available•Detailed list of chapter coverage made availableDetailed list of chapter coverage made available•Homework on Thursday to sample coverageHomework on Thursday to sample coverage•Material covers up to today’s classMaterial covers up to today’s classTaxonomy of ProjectionsFVFHP Figure 6.10Taxonomy of ProjectionsParallel ProjectionAngel Figure 5.4Center of projection is at infinityCenter of projection is at infinity•Direction of projection (DOP) same for all pointsDirection of projection (DOP) same for all pointsCenter of projection is at infinityCenter of projection is at infinity•Direction of projection (DOP) same for all pointsDirection of projection (DOP) same for all pointsDOPViewPlaneOrthographic ProjectionsAngel Figure 5.5Top SideFrontDOP perpendicular to view planeDOP perpendicular to view planeDOP perpendicular to view planeDOP perpendicular to view planeOblique ProjectionsH&BDOP DOP notnot perpendicular to view plane perpendicular to view planeDOP DOP notnot perpendicular to view plane perpendicular to view planeCavalier(DOP = 45o)tan() = 1Cabinet(DOP = 63.4o)tan() = 2454.63Oblique Parallel-ProjectionOblique View Volume Transformed View VolumeOblique Parallel-ProjectionOblique View Volume Transformed View VolumeTransformation Matrix100001001001pzpyvppzpypzpxvppzpxVVzVVVVzVVpzpxvppVVzzxx )( VpHB Matrix 7-13Orthographic ProjectionSimple OrthographicSimple OrthographicTransformationTransformationOriginal world units are preservedOriginal world units are preserved•Pixel units are preferredPixel units are preferredSimple OrthographicSimple OrthographicTransformationTransformationOriginal world units are preservedOriginal world units are preserved•Pixel units are preferredPixel units are preferredOrthographic: Screen Space Transformationtop=20 mbottom=10 mleft =10 m right = 20 m(0, 0)(max pixx, max pixy)(width in pixels)(height in pixels)Orthographic: Screen Space Transformation (Normalization)left, right, top, bottom refer to the viewing frustum in left, right, top, bottom refer to the viewing frustum in modeling coordinatesmodeling coordinateswidth and height are in pixel unitswidth and height are in pixel unitsThis matrix scales and translates to accomplish the This matrix scales and translates to accomplish the transition in unitstransition in unitsleft, right, top, bottom refer to the viewing frustum in left, right, top, bottom refer to the viewing frustum in modeling coordinatesmodeling coordinateswidth and height are in pixel unitswidth and height are in pixel unitsThis matrix scales and translates to accomplish the This matrix scales and translates to accomplish the transition in unitstransition in unitsHB Matrix: 7-7Perspective TransformationFirst discovered by Donatello, Brunelleschi, and DaVinci First discovered by Donatello, Brunelleschi, and DaVinci during Renaissanceduring RenaissanceObjects closer to viewer look largerObjects closer to viewer look largerParallel lines appear to converge to single pointParallel lines appear to converge to single pointFirst discovered by Donatello, Brunelleschi, and DaVinci First discovered by Donatello, Brunelleschi, and DaVinci during Renaissanceduring RenaissanceObjects closer to viewer look largerObjects closer to viewer look largerParallel lines appear to converge to single pointParallel lines appear to converge to single pointPerspective ProjectionAngel Figure 5.103-PointPerspective2-PointPerspective1-PointPerspectiveHow many vanishing points?How many vanishing points?How many vanishing points?How many vanishing points?Perspective ProjectionIn the real world, objects exhibit In the real world, objects exhibit perspective perspective foreshorteningforeshortening: distant objects appear : distant objects appear smallersmallerThe basic situation:The basic situation:In the real world, objects exhibit In the real world, objects exhibit perspective perspective foreshorteningforeshortening: distant objects appear : distant objects appear smallersmallerThe basic situation:The basic situation:Perspective ProjectionWhen we do 3-D graphics, we think of the When we do 3-D graphics, we think of the screen as a 2-D window onto the 3-D world:screen as a 2-D window onto the 3-D world:When we do 3-D graphics, we think of the When we do 3-D graphics, we think of the screen as a 2-D window onto the 3-D world:screen as a 2-D window onto the 3-D world:How tall shouldthis bunny be?Perspective ProjectionThe geometry of the situation is that of The geometry of the situation is that of similar trianglessimilar triangles. View . View from above:from above:What is x’ ?What is x’ ? The geometry of the situation is that of The geometry of the situation is that of similar trianglessimilar triangles. View . View from above:from above:What is x’ ?What is x’ ? dP (x, y, z)XZViewplane(0,0,0)x’ = ?Perspective ProjectionDesired result for a point Desired result for a point [[x, y, z, 1x, y, z,
View Full Document