Download presentation
Presentation is loading. Please wait.
Published byGeorgiana Flowers Modified over 9 years ago
1
CS-321 Dr. Mark L. Hornick 1 3-D Object Modeling
2
CS-321 Dr. Mark L. Hornick 2 There are basically two ways to model objects in 3-D Space-partitioning (Solid modeling) Describe interior as union of solids Parametric modeling what parameters would we use? Boundary representations (B-reps) Describe the set of surfaces That define the exterior surface of an object That separate object interior from exterior What kinds of surfaces?
3
CS-321 Dr. Mark L. Hornick 3 Most common is Boundary Representation Advantage: surface equations are linear Representing objects: Polyhedrons - no problem General shapes - approximation Tessellate (subdivide) to polygon mesh
4
CS-321 Dr. Mark L. Hornick 4 Polygon Meshes can be used to describe a general surface Replaces it with an approximation Common sets of polygons Triangles Advantage: 3 vertices determine plane Quadrilaterals
5
CS-321 Dr. Mark L. Hornick 5 Polygon Meshes
6
CS-321 Dr. Mark L. Hornick 6 Polygon Description Geometric data Description of position and shape Attribute data Description of surface Color Transparency Surface reflectivity Texture
7
CS-321 Dr. Mark L. Hornick 7 Polygon Description
8
CS-321 Dr. Mark L. Hornick 8 How do you represent a polygon surface approximation? List of vertices (in 3-D) could work Sufficient description But, polygons are joined Shared vertices and edges We need a more general description that Reduces redundancy Represents component polygons
9
CS-321 Dr. Mark L. Hornick 9 Polygon Tables Vertex table For all polygons in composite object Edge table Each edge listed once Even if part of more than one polygon Polygon-surface table Pointers or other links between tables for easy access
10
CS-321 Dr. Mark L. Hornick 10 Polygon Table Example E 1 : V 1,V 3 E 2 : V 1,V 2 E 3 : V 2,V 3 E 4 : V 1,V 4 E 5 : V 3,V 4 E 6 : V 4,V 5 E 7 : V 2,V 5 E 8 : V 1,V 5 V1V1 V2V2 V3V3 V4V4 V5V5 E1E1 E2E2 E3E3 E4E4 E5E5 E6E6 E7E7 E8E8 S 1 : E 1, E 2, E 3 S 2 : E 2, E 7, E 8 S 3 : E 1, E 4, E 5 S 4 : E 4, E 6, E 8 S 5 : E 3, E 5, E 6, E 7
11
CS-321 Dr. Mark L. Hornick 11 Polygon surfaces can be represented by Plane Equations Often need information on Spatial orientation of surfaces Visible surface identification Surface rendering (e.g. shading) Processing a 3-D object involves Equations of polygon planes Coordinate transformations (3-D)
12
CS-321 Dr. Mark L. Hornick 12 The Plane Equation Must be satisfied for any point (x,y,z) in the plane. We want to solve for coefficients (A, B, C, D). How many points define a plane? How many unknowns are there?
13
CS-321 Dr. Mark L. Hornick 13 Plane Equation Solution (1) Use Cramer’s Rule
14
CS-321 Dr. Mark L. Hornick 14 Plane Equation Solution (2)
15
CS-321 Dr. Mark L. Hornick 15 Vector Formulation (1) For a plane described by A vector normal to the plane surface is N Vector N is also the cross product of two successive polygon edges. We go CCW around the polygon to find the “inside-to- outside” normal vector:
16
CS-321 Dr. Mark L. Hornick 16 Vector Formulation (2) The normal vector: Gives us values for A, B, and C in the plane equation: N But what about D? D specifies which one of the planes normal to N we are talking about. Calculate D by substituting A, B, C, and one polygon vertex into plane equation.
17
CS-321 Dr. Mark L. Hornick 17 Vector Formulation (3) Solving for D in the plane equation: N P
18
CS-321 Dr. Mark L. Hornick 18 Testing Points If point is “inside” the plane, then: N P inside P outside If point is “outside” the plane, then: This can be used to determine what surfaces are hidden
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.