09 modelsolid en.ppt -...
TRANSCRIPT
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
1
Solid Modelling
Graphics Systems /
Computer Graphics and Interfaces
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
2
Solid Modelling• In 2D, one set 2D line segments or curves does not necessarily form a closed area.
• In 3D, a collection of surfaces does not necessarily involve a closed volume.
Solid modeling:In some applications it is important to: distinguish between the interior and exterior surface of a 3D object; and evaluate properties of objects that depend on this distinction.
Ex: Simulation of mechanisms, volume, center of mass, application of finite elements to determine response to factors such as stress and temperature, etc.
Applications: CAD / CAM and photo-realistic imaging.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
3
Characteristics of a solid model1. Should cover a domain representation broad enough to incorporate all kinds of
objects we want to model.
2. The representation must be unambiguous and unique: A given representation must correspond to a single solid; and each object must have only one possible representation. The only representation allows us to compare two objects to determine equality.
3. Precision / Correctness: accurate modeling allows to represent the object without approximations. Systems that only accept representation by line segments only approximate curved surfaces.
4. Impossibility of creating invalid objects, i.e. that do not correspond to a solid.
5. Closed representation: The representation must remain valid after the application of any valid operations.
6. Compact representation to optimize the use of memory.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
4
Characteristics of a solid modelExample of invalid objects as a solid.
- The representation of a) does not clearly identify the faces of the cube, only indicates edges.- We can consider that a sequence of 4 segments form a face? But solid b) would be (wrong) considered as a solid.
In general, the representations used do not have all the features presented.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
5
Boolean operationsThe combination of Boolean operations allows to define new objects, independently of the representation used. Operations are:
union,difference / subtractionintersection.
a) Objects A and B b) The U B c) A ∩ B d) A - B e) B - A
6
Operating two objects...Consider the two objects, CUBE and CYLINDER.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
7
SubtractionExample: CUBE - CYLINDER
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
8
UnionExample: CUBE U CYLINDER
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
9
IntersectionExample: CUBE ∩ CYLINDER
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
9
Example
- Ask Lego performed with Boolean operations. The solids are used cube and cylinder.
This type of modeling is mainly used for regular objects as exemplified.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
10
Types of Representation
1. Representation by Instantiating Primitives
2. Representation by Extrusion
3. Boundary Representation (Representação pela Fronteira)
4. Representation by Spatial Decomposition
5. Constructive Solid Geometry Representation (CSG)
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
11
Representation by Instantiating Primitives
The modeling system has, pre-defined, a set of useful 3D solid for the desired modeling.
The user can control the shape of the object defining the parameters that characterize it.
It does not include the combination of objects as Boolean operations. Used for complex parts.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
12
Representation by ExtrusionThe displacement of an object according to a trajectory defines another object:
– Translation (Extrusion)– Rotation
Ex: The translation a 2D rectangle along its perpendicular to the plane creates a parallelepiped. A simple extension is to modify the dimensions of the 2D object along the path.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
13
Representation by Extrusion
Boolean operations with objects created by extrusion.
• Using this method without path constraints can result in inefficient modeling of the object.
Ex: If the object intersects itself complicates the calculation of volume.
• Can not generate a valid solid if the motion is in the plane containing the 2D shape.
• In general, software tools convert objects created by extrusion into other representations of the same objects.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
14
Representation by Extrusion - Example
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
15
Representation by Extrusion - Example
1. Defining a way to make scanning for translation.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
16
Representation by Extrusion - Example
2. Defining the shape of the section of the final object.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
17
Representation by Extrusion - Example
Object obtained by translation.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
18
Representation by Extrusion - Example
Object obtained by translation, rotation around the axis shifting and scaling along the route.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
19
Boundary Representation (B-rep)
• The solids are described by its boundary surface. Uses the description by vertices, edges and faces.
• The most common representation is the boundary by a closed polygonal mesh.
• Will be considered only the solids with boundary “2-manifolds”: Ie the neighbors of any point of the boundary surfasse are in a disk (that is to say that each edge is shared by two faces)
(a) and (b) are 2-manifold (c) is not 2-manifold
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
20
Boundary Representation (B-rep)
PolyhedronSolid delimited by a set of polygons whose edges belong to two polygons (solids 2-manifolds).
Euler FormulaA simple polyhedron without holes, obeys Euler's formula:
V - E + F = 2V - Vertex
E - Edges (edges)
F - Faces
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
21
By Boundary Representation (B-rep)
The Euler's formula is necessary but it is not sufficient to ensure that an object is a simple polyhedron / valid solid.
Additional conditions:
1. Each edge connects 2 vertices and is shared by 2 faces
2. At least three edges are at the same vertex
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
21
By Boundary Representation (B-rep)
Generalization of Euler's Formula for polyhedra with holes: V - E + F - H = 2 (C - G)
V - Vertex
E - Edges (edges)
F - Faces
H - number of holes in the faces
G - Number of holes crossing the object
C - number of parts of the object
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
22
Exercise
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
23
Representation by Spatial Decomposition
• A solid is decomposed into:– In a number of more primitive solids than the original– The primitive solids are adjacent and do not intersect
• Types of Representation for Spatial Decomposition– Cell Decomposition
– Enumeration of Space Occupation
– Octrees
– Binary trees Space Partition
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
24
Representation by Spatial DecompositionCell Decomposition
In Cell Decomposition:• There is a set of primitive, parameterized cells• Can be Curves• Differs from Instance Primitives, by admitting the composition of more complex
objects from other already established
Gluing operationIt is a union of cells that do not intersect
a) Primitive cells to transform
b) c) are the same final object created with different combinations
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
25
Representation by Spatial DecompositionSpace Occupation Enumeration
The Space Occupation Enumeration is a particular case of Cell Decomposition:• Solid formed by identical cells of equal size, placed in a regular grid.• The cells are designated Voxels (Volume elements) by analogy with pixels• It controls only the presence or absence of each cell in the grid• The most common form for cells is the cube• The object is encoded by a single list of occupied cells
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
26
Representation for Spatial DecompositionOctrees
The Octree is similar to quadtree• The octree is 3D and the division of space is made by octants
Number of nodes of an octree• It is proportional to the object surface because of the need to subdivide occurs on the
surface.
Enumeration of octree
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
27
Representation for Spatial DecompositionBinary Space Partitioning Trees (BSP)
• At each step, the space is divided by a plane of arbitrary position and orientation
• Each internal node of the tree is associated with a plane and two pointers (one to inside and the other to outside).
• If a sub-space is homogeneous (fully indoors or outdoors), cease to be divided.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
28
(CSG - Constructive Solid Geometry)• The object is obtained by combining simple primitives using Boolean operators.
• The object is stored as a tree, where the interior nodes are operators and leaves are simple primitives
• Nodes represent Boolean operations and geometric transformations.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
29
Exercise
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO
COMPUTER GRAPHICS AND INTERFACES /GRAPHICS SYSTEMS JGB / AAS 2004
30
References
• 3D Modeling & Surfacing Bill FlemingMorgan Kaufmann, Academic Press, 1999
• Introduction to Computer GraphicsJames Foley, A. van Dam, S. Feiner, J. Hughes, R. PhillipsAddison-Wesley Publishing Company, 1996