Introduction to Computer Graphics CS 445 / 645Rendering geometric primitivesRendering3D Rendering ExampleOverviewSlide 63D Scene Representation3D PointSlide 93D VectorSlide 11Vector Addition/SubtractionVector SpaceAffine SpacesCoordinate SystemsPoints + Vectors3D Line SegmentSlide 183D Ray3D Line3D Line – Slope InterceptEuclidean SpacesDot ProductSlide 24Slide 25Slide 26Cross ProductCross Product Right Hand RuleSlide 29Slide 30Slide 31Slide 32Other helpful formulas3D PlaneSlide 353D Sphere3D Geometric PrimitivesTake a breathRendering 3D ScenesCamera ModelsCamera ParametersSlide 42Moving the cameraThe Rendering PipelineRendering: TransformationsThe Rendering Pipeline: 3-DSlide 47Slide 48Slide 49Lighting SimulationSlide 51Slide 52Slide 53Slide 54Assignment 2Slide 56Slide 57Slide 58Slide 59RasterizeSummaryIntroduction to Computer GraphicsCS 445 / 645Lecture 6Lecture 6Geometric primitives andGeometric primitives andthe rendering pipeplinethe rendering pipeplineLecture 6Lecture 6Geometric primitives andGeometric primitives andthe rendering pipeplinethe rendering pipeplineM.C. Escher – Smaller and Smaller (1956)Rendering geometric primitivesDescribe objects with points, lines, and surfaces Describe objects with points, lines, and surfaces •Compact mathematical notationCompact mathematical notation•Operators to apply to those representationsOperators to apply to those representationsRender the objectsRender the objects•The rendering pipelineThe rendering pipelineAppendix A1-A5Appendix A1-A5Describe objects with points, lines, and surfaces Describe objects with points, lines, and surfaces •Compact mathematical notationCompact mathematical notation•Operators to apply to those representationsOperators to apply to those representationsRender the objectsRender the objects•The rendering pipelineThe rendering pipelineAppendix A1-A5Appendix A1-A5H&B Figure 109RenderingGenerate an image from geometric primitivesGenerate an image from geometric primitivesGenerate an image from geometric primitivesGenerate an image from geometric primitivesRenderingGeometric PrimitivesRaster Image3D Rendering ExampleWhat issues must be addressed by a 3D rendering system?Overview3D scene representation3D scene representation3D viewer representation3D viewer representationVisible surface determinationVisible surface determinationLighting simulationLighting simulation3D scene representation3D scene representation3D viewer representation3D viewer representationVisible surface determinationVisible surface determinationLighting simulationLighting simulationOverview3D scene representation3D scene representation3D viewer representation3D viewer representationVisible surface determinationVisible surface determinationLighting simulationLighting simulation3D scene representation3D scene representation3D viewer representation3D viewer representationVisible surface determinationVisible surface determinationLighting simulationLighting simulationHow is the 3D scenedescribed in a computer?How is the 3D scenedescribed in a computer?3D Scene RepresentationScene is usually approximated by 3D primitivesScene is usually approximated by 3D primitives•PointPoint•Line segmentLine segment•PolygonPolygon•PolyhedronPolyhedron•Curved surfaceCurved surface•Solid object Solid object •etc.etc.Scene is usually approximated by 3D primitivesScene is usually approximated by 3D primitives•PointPoint•Line segmentLine segment•PolygonPolygon•PolyhedronPolyhedron•Curved surfaceCurved surface•Solid object Solid object •etc.etc.3D PointSpecifies a locationSpecifies a locationSpecifies a locationSpecifies a location3D PointSpecifies a locationSpecifies a location•Represented by three coordinatesRepresented by three coordinates•Infinitely smallInfinitely smallSpecifies a locationSpecifies a location•Represented by three coordinatesRepresented by three coordinates•Infinitely smallInfinitely small(x,y,z)3D VectorSpecifies a direction and a magnitudeSpecifies a direction and a magnitudeSpecifies a direction and a magnitudeSpecifies a direction and a magnitude3D VectorSpecifies a direction and a magnitudeSpecifies a direction and a magnitude•Represented by three coordinatesRepresented by three coordinates•Magnitude ||V|| = sqrt(dx dx + dy dy + dz dz)Magnitude ||V|| = sqrt(dx dx + dy dy + dz dz)•Has no locationHas no locationSpecifies a direction and a magnitudeSpecifies a direction and a magnitude•Represented by three coordinatesRepresented by three coordinates•Magnitude ||V|| = sqrt(dx dx + dy dy + dz dz)Magnitude ||V|| = sqrt(dx dx + dy dy + dz dz)•Has no locationHas no location(dx,dy,dz)Vector Addition/Subtraction•operation operation u + vu + v, with:, with:–Identity Identity 00 : :vv + + 00 = = v v–Inverse Inverse -- : :vv + (- + (-vv) = ) = 00•Addition uses the “parallelogram rule”:Addition uses the “parallelogram rule”:•operation operation u + vu + v, with:, with:–Identity Identity 00 : :vv + + 00 = = v v–Inverse Inverse -- : :vv + (- + (-vv) = ) = 00•Addition uses the “parallelogram rule”:Addition uses the “parallelogram rule”:u+vuvu-vuv-v-vVector SpaceVectors define a vector spaceVectors define a vector space•They support vector additionThey support vector addition–Commutative and associativeCommutative and associative–Possess identity and inversePossess identity and inverse•They support scalar multiplicationThey support scalar multiplication–Associative, distributiveAssociative, distributive–Possess identityPossess identityVectors define a vector spaceVectors define a vector space•They support vector additionThey support vector addition–Commutative and associativeCommutative and associative–Possess identity and inversePossess identity and inverse•They support scalar multiplicationThey support scalar multiplication–Associative, distributiveAssociative, distributive–Possess identityPossess identityAffine Spaces•Vector spaces lack position and distanceVector spaces lack position and distance–They have magnitude and direction but no locationThey have magnitude and direction but no location•Combine the point and vector primitivesCombine the point and vector primitives–Permits describing vectors relative to a common locationPermits describing vectors relative to a common location•A point and three vectors define a 3-D coordinate system A point and three vectors define a 3-D coordinate system •Point-point subtraction yields a
View Full Document