Solid Modeling. Ron Goldman Department of Computer Science Rice University

Similar documents
Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

CSG obj. oper3. obj1 obj2 obj3. obj5. obj4

Solid Modelling. Graphics Systems / Computer Graphics and Interfaces COLLEGE OF ENGINEERING UNIVERSITY OF PORTO

SOME 024: Computer Aided Design. E. Rozos

Introduction to 2D and 3D Computer Graphics. Realistic Rendering. -- Solids Modeling --

Geometric Modeling. Introduction

Advanced 3D-Data Structures

Geometric Modeling Mortenson Chapter 11. Complex Model Construction

Spatial Data Structures

3D Modeling: Solid Models

Spatial Data Structures

Computer Graphics Ray Casting. Matthias Teschner

Spatial Data Structures

Implicit Surfaces & Solid Representations COS 426

Chapter 12 Solid Modeling. Disadvantages of wireframe representations

Polygon Meshes and Implicit Surfaces

Polygon Meshes and Implicit Surfaces

Physically-Based Modeling and Animation. University of Missouri at Columbia

Geometric Modeling Systems

11/1/13. Polygon Meshes and Implicit Surfaces. Shape Representations. Polygon Models in OpenGL. Modeling Complex Shapes

From curves to surfaces. Parametric surfaces and solid modeling. Extrusions. Surfaces of revolution. So far have discussed spline curves in 2D

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

Ray Tracing. Foley & Van Dam, Chapters 15 and 16

Ray Tracing Foley & Van Dam, Chapters 15 and 16

Solid Modeling Lecture Series. Prof. Gary Wang Department of Mechanical and Manufacturing Engineering The University of Manitoba

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

Model data extraction. Mass property data. Mass property data. Mass property data. Integral Processes. Units and volume

Ray Tracing Acceleration Data Structures

Introduction to Solid Modeling

Introduction to Solid Modeling Parametric Modeling. Mechanical Engineering Dept.

CPSC GLOBAL ILLUMINATION

Ray Tracing: Intersection

13.472J/1.128J/2.158J/16.940J COMPUTATIONAL GEOMETRY

Solid Modeling. Michael Kazhdan ( /657) HB , FvDFH 12.1, 12.2, 12.6, 12.7 Marching Cubes, Lorensen et al.

9. Three Dimensional Object Representations

Ray Tracer I: Ray Casting Due date: 12:00pm December 3, 2001

Solid Modeling. Thomas Funkhouser Princeton University C0S 426, Fall Represent solid interiors of objects

VALLIAMMAI ENGINEERING COLLEGE

1. Introduction to Constructive Solid Geometry (CSG)

Geometric and Solid Modeling. Problems

Lecture 11. More Ray Casting/Tracing

Shape Representation Basic problem We make pictures of things How do we describe those things? Many of those things are shapes Other things include

Lecture notes: Object modeling

Constructive Solid Geometry and Procedural Modeling. Stelian Coros

Parallel Physically Based Path-tracing and Shading Part 3 of 2. CIS565 Fall 2012 University of Pennsylvania by Yining Karl Li

2. Give an example of a non-constant function f(x, y) such that the average value of f over is 0.

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 24 Solid Modelling

MODELING AND HIERARCHY

Intersection Acceleration

Geometric Representations. Stelian Coros

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Development of Reverse Engineering System for Machine Engineering Using 3D Bit-map Data. Tatsuro Yashiki* and Tarou Takagi*

SOLID MODELLING. PARAMETRICALLY WE CAN DEFINE SOLID AS- X=x(u,v,w) Y=y(u,v,w) Z=z(u,v,w) Tricubic solid- u,v,w Є [0,1]

Second degree equations - quadratics. nonparametric: x 2 + y 2 + z 2 = r 2

Spatial Data Structures

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Ray Casting of Trimmed NURBS Surfaces on the GPU

Spatial Data Structures

Computer Aided Engineering Design Prof. Anupam Saxena Department of Mechanical Engineering Indian Institute of Technology, Kanpur.

Computer Graphics 1. Chapter 2 (May 19th, 2011, 2-4pm): 3D Modeling. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2011

3D Modeling techniques

Surfaces. Ron Goldman Department of Computer Science Rice University

3/3/2014. Sharif University of Technology. Session # 5. Instructor. Class time. Course evaluation. Department of Industrial Engineering

TNM079 Modeling & Animation Lecture 6 (Implicit surfaces)

Polygonization of Implicit Surfaces

Ray Intersection Acceleration

CS 352: Computer Graphics. Hierarchical Graphics, Modeling, And Animation

Surface and Solid Geometry. 3D Polygons

Chapter 6 Some Applications of the Integral

Recursive Ray Tracing. Ron Goldman Department of Computer Science Rice University

Computer Aided Engineering Applications

Solid Modeling: Part 1

VIII. Visibility algorithms (II)

Lecture 4b. Surface. Lecture 3 1

Chapter 4-3D Modeling

Overview of 3D Object Representations

Engineering designs today are frequently

2/12/2015. Sharif University of Technology. Session # 4. Instructor. Class time. Course evaluation. Department of Industrial Engineering

Geometry Definition in the ADINA User Interface (AUI) Daniel Jose Payen, Ph.D. March 7, 2016

Engineering Drawing II

GL9: Engineering Communications. GL9: CAD techniques. Curves Surfaces Solids Techniques

L10 Layered Depth Normal Images. Introduction Related Work Structured Point Representation Boolean Operations Conclusion

Point Cloud Filtering using Ray Casting by Eric Jensen 2012 The Basic Methodology

Autodesk Inventor 2019 and Engineering Graphics

Homework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?

Math 2130 Practice Problems Sec Name. Change the Cartesian integral to an equivalent polar integral, and then evaluate.

CS 465 Program 4: Modeller

Modeling 3D Objects: Part 2

Isosurface Rendering. CSC 7443: Scientific Information Visualization

CPSC / Sonny Chan - University of Calgary. Collision Detection II

Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016

Curves and Surfaces Computer Graphics I Lecture 10

Lecture 11: Ray tracing (cont.)

Solids as point set. Solid models. Solid representation schemes (cont d) Solid representation schemes. Solid representation schemes (cont d)

4.4 3D Shape Interpolation - changing one 3D object into another

Geometric Queries for Ray Tracing

CS770/870 Spring 2017 Ray Tracing Implementation

Example: The following is an example of a polyhedron. Fill the blanks with the appropriate answer. Vertices:

Transcription:

Solid Modeling Ron Goldman Department of Computer Science Rice University

Solids Definition 1. A model which has a well defined inside and outside. 2. For each point, we can in principle determine whether the point is inside, outside, or on the solid. Purpose 1. Model More Complicated Shapes 2. Interference Checking 3. Mass Properties Calculations Volume Moments of Inertia 4. Finite Element Analysis Stress 5. Manufacturing (CAD/CAM) Numerical Control

Representations 1. Constructive Solid Geometry (CSG) 2. Boundary Representation (B-REP) 3. Octree

1. Constructive Solid Geometry

Constructive Solid Geometry (CSG) Data Structure = Binary Tree Nodes = Boolean Operations Union, Intersection, Difference Nodes = Transformations To Position and Scale Objects Leaves = Primitives Blocks and Wedges Natural Quadrics -- Spheres, Cylinders, Cones Other Quadrics -- Ellipsoids, Paraboloids, Hyperboloids Torus -- for blending quadrics (piping) Extruded Solids -- Solid Cylinders and Cones Swept Solids -- Solids of Revolution Deformed Solids

Ray Tracing CSG Trees Algorithm For each Pixel, Construct a Line from the Eye through the Pixel. If the Solid is a Primitive Compute all the intersections of the Line with the Primitive. Display the closest intersection. Otherwise if the Solid is a CSG tree Recursively find all the intervals in which the line intersects the Left and Right subtrees. Combine these intervals using the Boolean operation at the root. Display the closest intersection.

Ray Tracing CSG-Trees (continued) Transformation Nodes If the node is a transformation T, then Compute the inverse transformation T 1 Apply T 1 to the line L Intersect T 1 (L) with the Solid below the node Remarks 1. Initially, there is no need to perform T on the intersection points because we are computing parameter values, not points! 2. Transformation nodes permit use of canonical primitives in canonical positions. May simplify intersection computations.

Volume Computations Volume (Riemann Sum) Same Algorithm as Display, but Use parallel rays (Eye at Infinity). Think of each ray as a beam with length and width Δx,Δy. Multiply each intersection interval by Δx,Δy. Add the results of all the intervals and all the rays.

Volume Computation Ray Tracing Volume Algorithm Initialize Volume = 0 For Each Pixel Construct a Line through the Pixel perpendicular to the Plane of the Pixel. (Eye at Infinity) If the Solid is a Primitive Compute all the intersections of the Line with the Primitive Vol = Vol + Length(I k )ΔxΔy. k Otherwise if the Solid is a CSG Tree Recursively find all the intervals in which the Line intersects the Left and Right subtrees. Combine these intervals using the Boolean operation at the root Vol = Vol + Length(I k )ΔxΔy. k

Alternative Volume Computation Monte Carlo Algorithm Construct a Bounding Box around the Solid. Select points at random inside the Bounding Box. {Random Number Generator} For each point, determine whether it is inside or outside the Solid. If the Solid is a Primitive, perform a parity check. {Ray Casting} Otherwise if the Solid is a CSG tree Recursively determine whether the point is inside or outside the Left and Right subtrees. Combine these results using the Boolean operation at the root Vol(Solid) Vol(Box) Vol(Solid) # Points inside Solid # Points selected # Points inside Solid # Points selected Vol(Box)

Constructive Solid Geometry Advantages Compact representation Natural user interface Robust data structure Parametrized objects Parametrized primitives Canonical primitives in canonical positions Easy analysis -- Ray Casting Rendering Mass Properties Inside/Outside

Constructive Solid Geometry (continued) Disadvantages No adjacency information for NC etc. Difficult to distinguish the part from the scrap No direct access to vertices and edges Difficult for designer to select specific part of object No tweaking of the model Not easy to perform FEM Representation not unique Hard to extract important features for manufacturing Holes, Slots,...

2. Boundary Representation

Boundary Representation (B Rep) Data Structures=Boundary File Topology (Binary Information) Connectivity Vertices, Edges, Faces Geometry (Floating Point Data) Position, Orientation, and Size Points, Curves, Surfaces Analysis Algorithm=Ray Casting Intersect with surface boundaries No special techniques here

Topology and Geometry Topology Geometry Vertex Point Edge Curve Face Surface

Topology Vertices, Edges, Faces For solids bounded by 2-manifolds Each edge connects 2 vertices Each edge lies on two faces Each face is defined by a set of non-intersecting loops Connectivity information explicit E V E F Other pointers as required for 9 possible adjacency relations Winged-edge data structure Speed vs. Storage Answers questions of the form: Is A on or adjacent to B Pointers to Geometry V P E C F S

Winged Edge Topology Rationale Fast Retrieval of Topological Information Supports All Queries Easy to Maintain Medium size Data Structure Edge Data -- Oriented Edge 2 Vertices -- First and Second, Previous and Next (orientation) 2 Faces -- L and R 4 Edges -- P R, N R and P L, N L Vertex Data Point (Geometry) 1 Edge Face Data Surface (Geometry) 1 Edge

Winged Edge Data Structure N L N N R L Face P L E P R Face P R

Winged Edge Topology (continued) Queries Find all edges surrounding a face Find all faces adjacent to a face Find all vertices on a face Find all edges on a vertex M Faces with Holes Problem -- not supported by winged edge structure Solution -- auxiliary edges connecting hole bdy to outer bdy Auxiliary edges have same face on both sides!

Euler s Formula Formula (for solids bounded by 2-manifolds) V E + F H = 2(C G) V = vertices E = edges F = faces H = holes in the faces C = connected components G = holes in the solid = genus Examples Platonic Solids (LHS=2) Torus (LHS=0)

Intersection Algorithm Algorithm Intersect each surface (face) of A with each surface (face) of B to form new curves on A and B. {Difficult Computations} Intersect each new curve with existing edges on the old faces to form new vertices and edges on A and B. Insert new faces, edges, and vertices into topology of A and B. {Update Topological Data Structures} Combine the boundary topologies based on the particular Boolean operation. Boundaries (A B) = ( A A inb ) ( B B ina ) (A B) = A inb B ina (A B) = ( A A inb ) B ina (B A) = ( A inb ) ( B B ina )

Intersections Examples Cut a cylindrical corner from a box. Remarks Maintaining correct boundary files is time consuming. Maintaining correct boundary files is susceptible to numerical errors. Computing correct and accurate intersections is difficult.

Boundary Representation Advantages Adjacency information for NC etc. Simple to find connected components using topological structure Distinguish part from scrap NC tool path verification Representation is unique Verification of model correctness using Euler s formula Tweaking of vertices and edges Easy to extract important features for manufacturing Holes, Slots,... Disadvantages Large data base Slow computation of B-Rep evaluation from CSG input Hard to maintain robust models for curved surfaces Disagreement between geometry and topology Tangencies particularly difficult to handle

3. Octrees

Octrees Tree Data Structure (Divide and Conquer) Divide a cube into 8 octants Label each octant: E = empty, F = full, P = partially full Recursively subdivide the P nodes until their descendent are E, F, or a lowest level of resolution (cutoff depth) is reached Observations Number of nodes proportional to Surface Area Subdivision occurs mostly to capture the boundary

Algorithms Ray Casting Intersect Line with all F voxels and accept nearest hit Boolean Operations Apply Boolean operation to corresponding nodes in octree Union If either node is F, place F in result Otherwise if both nodes are E, place E in the result Otherwise, mark node as P and recursively inspect the children Intersection If either node is E, place E in the result Otherwise if both nodes are F, place F in the result Otherwise, mark node as P and recursively inspect the children If all children marked E (F), then change P to E (F)

Octrees Advantages Fast Volume/Mass Properties Calculations -- sum the voxels Fast Boolean operations -- simple interference checking Fast scaling and 900 rotations around axes Fast Mesh Generation? Much more compact representation than spatial enumeration Accuracy as desired Disadvantages Difficult to perform arbitrary affine transformations Coordinate dependent model High accuracy requires high storage

Summary CSG B REP Octree Accuracy Good Good Mediocre Domain Large Small Large Uniqueness No Yes Yes Validity Easy Hard Easy Closure Yes No Yes Compactness Good Bad Mediocre

Problems 1. Converting between different representations CSG to B REP (Boundary Evaluation) B REP to CSG (Hard) 2. Extracting information from a particular representation Connected Components Adjacent Patches 3. Robust Intersections Surface Surface Ray Casting 4. Blends and Offsets 5. Tolerances 6. Features for Manufacturing