890 likes | 1.09k Views
Special Topics in Computer Science Computational Modeling for Snake-Based Robots Computer-Aided Design Crash Course Week 1, Lecture 2. William Regli Geometric and Intelligent Computing Laboratory Department of Computer Science Drexel University http://gicl.cs.drexel.edu.
E N D
Special Topics in Computer ScienceComputational Modeling for Snake-Based RobotsComputer-Aided Design Crash CourseWeek 1, Lecture 2 William Regli Geometric and Intelligent Computing Laboratory Department of Computer Science Drexel University http://gicl.cs.drexel.edu
Building Multidisciplinary Model • Class Goal: create multidisciplinary engineering models • Challenge: Learn enough about each discipline to create integrated models! • Today: The role of 3D models and CAD
Computer Aided Design: A Brief History • In The Beginning…1963Ivan Sutherland’sSketchpad • Modified oscilloscope for drawing • The original CAD system Courtesy Marc Levoy @ Stanford U
History of the 3D graphics industry • 1960s: • Line drawings, hidden lines, parametric surfaces (B-splines…) • Automated drafting & machining for car, airplane, and ships manufacturers • 1970’s: • Mainframes, Vector tubes (HP…) • Software: Solids, (CSG), Ray Tracing, Z-buffer for hidden lines • 1980s: • Graphics workstations ($50K-$1M): Frame buffers, rasterizers , GL, Phigs • VR: CAVEs and head-mounted displays • CAD/CAM & GIS: CATIA, SDRC, PTC • Sun, HP, IBM, SGI, E&S, DEC • 1990s: • PCs ($2K): Graphics boards, OpenGL, Java3D • CAD+Videogames+Animations: AutoCAD, SolidWorks…, Alias-Wavefront • Intel, many board vendors • 2000s: • Laptops, PDAs, Cell Phones: Parallel graphic chips • Everything will be graphics, 3D, animated, interactive • Nvidia, Sony, Nokia
Buzzword Deconfliction • Computer Aided Geometric Design (CAGD): Curves/surfaces • Solid Modeling: Representations and Algorithms for solids • Computational Geometry: Provably efficient algorithms • Computer-Aided Design (CAD): Automation of Shape Design • Computer-Aided Manufacturing (CAM): NC Machining • Finite Element Meshing (FEM): Construction and simulation • Animation: Capture, Design, Simulation of shape behavior • Visualization: Graphical interpretations of (large) nD datasets • Rendering: Making (realistic) pictures of 3D geometric shapes • Image-Based Rendering (IBR): Mix images and geometry • Computer Vision: Reconstruction of 3D models from images • Reverse Engineering: Fitting surfaces to scanned 3D points • Virtual Reality (VR): Immersion in interactive environments • Augmented Reality (AR): Track and mark-up what you see
What is CAD? • Primary authoring tool for the geometry and topology data associated with a product (plan, train, auto, building, etc) • CAD software is central to Product Lifecycle Management and is often integrated with manufacturing, analysis, simulation and other engineering and business functions
Raster:Pixels X11 bitmap, XBM X11 pixmap, XPM GIF TIFF PNG JPG Lossy, jaggies when transforming, good for photos. Vector:Drawing instructions Postscript CGM Fig DWG Non-lossy, smooth when scaling, good for line art and diagrams. 2D Graphics
Approximate Facet / Mesh Just surfaces Voxel Volume info Exact Wireframe Parametric Surface Solid Model CSG BRep Implicit Solid Modeling Representing 3D Objects
Exact Precise model of object topology Mathematically represent all geometry Approximate A discretization of the 3D object Use simple primitives to model topology and geometry Representing 3D Objects
Exact Complex data structures Expensive algorithms Wide variety of formats, each with subtle nuances Hard to acquire data Translation required for rendering Approximate Lossy Data structure sizes can get HUGE, if you want good fidelity Easy to break (i.e. cracks can appear) Not good for certain applications Lots of interpolation and guess work Negatives when Representing 3D Objects
Exact Precision Simulation, modeling, etc Lots of modeling environments Physical properties Many applications (tool path generation, motion, etc.) Compact Approximate Easy to implement Easy to acquire 3D scanner, CT Easy to render Direct mapping to the graphics pipeline Lots of algorithms Positives when Representing 3D Objects
Two Major Types to Care About(for this class) • Mesh-based representations • Solid Models • As generated from CAD or modeling systems
3D Mesh File Formats Some common formats • STL • SMF • OpenInventor • VRML
Minimal • Vertex + Face • No colors, normals, or texture • Primarily used to demonstrate geometry algorithms
Full-Featured • Colors / Transparency • Vertex-Face Normals(optional, can be computed) • Scene Graph • Lights • Textures • Views and Navigation
Subdivision Surfaces • Coarse Mesh & Subdivision Rule • Define smooth surface as limit of sequence of algorithmic refinements • Modify topology & interpolate neighboring vertices • Used in graphics, animation and digital arts applications
Simple Mesh Format (SMF) • Michael Garland http://graphics.cs.uiuc.edu/~garland/ • Triangle data • Vertex indices begin at 1
Stereolithography (STL) • Triangle data +Face Normal • The de-facto standard for rapid prototyping
Open Inventor • Developed by SGI • Predecessor to VRML • Scene Graph
Virtual Reality Modeling Language (VRML) • SGML Based • Scene-Graph • Full Featured
Issues with 3D “mesh” formats • Easy to acquire • Easy to render • Harder to model with • Error prone • split faces, holes, gaps, etc
Scanned Data From Exact Representation 360° Scan Single Scan
Issues with Scanning • Error and noise • Time consuming • Lots of human editing required to create clean models • Models can be very large • Much larger than original BRep
3D solid model representations • Implicit models • Super/quadrics • Blobbies • Swept objects • Boundary representations • Spatial enumerations • Distance fields • Quadtrees/octrees • Stochastic models
3D solid model representations • Implicit models • Super/quadrics • Blobbies • Swept objects • Boundary representations • Spatial enumerations • Distance fields • Quadtrees/octrees • Stochastic models
Boundary Representation Solid Modeling • The de facto standard for CAD since ~1987 • BReps integrated into CAGD surfaces + analytic surfaces + boolean modeling • Models are defined by their boundaries • Topological and geometric integrity constraints are enforced for the boundaries • Faces meet at shared edges, vertices are shared, etc.
Solids and Solid Modeling • Solid modeling introduces a mathematical theory of solid shape • Domain of objects • Set of operations on the domain of objects • Representation that is • Unambiguous • Accurate • Unique • Compact • Efficient
Solid Objects and Operations • Solids are point sets • Boundary and interior • Point sets can be operated on with boolean algebra (union, intersect, etc) Foley/VanDam, 1990/1994
Solid Object Definitions • Boundary points • Points where distance to the object and the object’s complement is zero • Interior points • All the other points in the object • Closure • Union of interior points and boundary points
Let’s Start Simple:Polyhedral Solid Modeling • Definition • Solid bounded by polygons whose edges are each a member of an even number of polygons • A 2-manifold: edges members of 2 polygons
BRep Data Structure • Vertex structure • X,Y,Z point • Pointers to n coincident edges • Edge structure • 2 pointers to end-point vertices • 2 pointers to adjacent faces • Pointer to next edge • Pointer to previous edge • Face structure • Pointers to m edges
BRep Data Structures • Winged-Edge Data Structure (Weiler) • Vertex • n edges • Edge • 2 vertices • 2 faces • Face • m edges Pics/Math courtesy of Dave Mount @ UMD-CP
State of the Art: BRep Solid Modeling • … but much more than polyhedra • Two main (commercial) alternatives • All NURBS, all the time • Pro/E, SDRC, … • Analytic surfaces + parametric surfaces + NURBS + …. all stitched together at edges • Parasolid, ACIS, …
Issues in Boundary Representation Solid Modeling • Very complex data structures • NURBS-based winged-edges, etc • Complex algorithms • manipulation, booleans, collision detection • Robustness • Integrity • Translation • Features • Constraints and Parametrics
Issues with 3D Set Operations • Ops on 3D objects can create “non-3D objects” or objects with non-uniform dimensions • Objects need to be “Regularized” • Take the closure of the interior Input set Closure Interior Regularized Foley/VanDam, 1990/1994
Regularized Boolean Operations • 3D Example • Two solids A and B • Intersection leaves a “dangling wall” • A 2D portion hanging off a 3D object • Closure of interior gives a uniform 3D result Pics/Math courtesy of Dave Mount @ UMD-CP
Boolean Operations • Other Examples: • (c) ordinary intersection • (d) regularized intersection • AB - objects on the same side • CD objects on different sides Foley/VanDam, 1990/1994
Boolean Operations Foley/VanDam, 1990/1994
Constructive Solid Geometry (CSG) • A tree structure combining primitives via regularized boolean operations • Primitives can be solids or half spaces
A Sequence of Boolean Operations • Boolean operations • Rigid transformations Pics/Math courtesy of Dave Mount @ UMD-CP
The Induced CSG Tree Pics/Math courtesy of Dave Mount @ UMD-CP
The Induced CSG Tree • Can also be represented as a directed acyclic graph (DAG) Pics/Math courtesy of Dave Mount @ UMD-CP
Issues with Constructive Solid Geometry • Non-uniqueness • Choice of primitives • How to handle more complex modeling? • Sculpted surfaces? Deformable objects?
Issues with Constructive Solid Geometry • Non-Uniqueness • There is more than one way to model the same artifact • Hard to tell if A and B are identical
Issues with CSG • Minor changes in primitive objects greatly affect outcomes • Shift up top solid face Foley/VanDam, 1990/1994