1/25/16. Polygon Meshes and Implicit Surfaces. Shape Representations. Modeling Complex Shapes. What do we need from shapes in Computer Graphics?

Similar documents
Curves and Surfaces. Goals. How do we draw surfaces? How do we specify a surface? How do we approximate a surface?

Computer Graphics. Geometric Modeling. Page 1. Copyright Gotsman, Elber, Barequet, Karni, Sheffer Computer Science - Technion. An Example.

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

How To Draw In Autocad

Angle - a figure formed by two rays or two line segments with a common endpoint called the vertex of the angle; angles are measured in degrees

Name Class. Date Section. Test Form A Chapter 11. Chapter 11 Test Bank 155

Geometric Modelling & Curves

Arrangements And Duality

Solutions to Homework 10

Algebra Geometry Glossary. 90 angle

The Essentials of CAGD

3D shapes. Level A. 1. Which of the following is a 3-D shape? A) Cylinder B) Octagon C) Kite. 2. What is another name for 3-D shapes?

Volumes of Revolution

Math 1B, lecture 5: area and volume

Intersection of a Line and a Convex. Hull of Points Cloud

Activity Set 4. Trainer Guide

11.1. Objectives. Component Form of a Vector. Component Form of a Vector. Component Form of a Vector. Vectors and the Geometry of Space

Chapter 8 Geometry We will discuss following concepts in this chapter.

Essential Mathematics for Computer Graphics fast

Additional Topics in Math

Everyday Mathematics. Grade 4 Grade-Level Goals CCSS EDITION. Content Strand: Number and Numeration. Program Goal Content Thread Grade-Level Goal

Number Sense and Operations

Everyday Mathematics. Grade 4 Grade-Level Goals. 3rd Edition. Content Strand: Number and Numeration. Program Goal Content Thread Grade-Level Goals

CHAPTER 8, GEOMETRY. 4. A circular cylinder has a circumference of 33 in. Use 22 as the approximate value of π and find the radius of this cylinder.

Efficient Storage, Compression and Transmission

Geometry Notes PERIMETER AND AREA

Seminar. Path planning using Voronoi diagrams and B-Splines. Stefano Martina

Shape Dictionary YR to Y6

A Generalized Marching Cubes Algorithm Based On Non-Binary Classifications

NCTM Curriculum Focal Points for Grade 5. Everyday Mathematics, Grade 5

Model Repair. Leif Kobbelt RWTH Aachen University )NPUT $ATA 2EMOVAL OF TOPOLOGICAL AND GEOMETRICAL ERRORS !NALYSIS OF SURFACE QUALITY

Vector storage and access; algorithms in GIS. This is lecture 6

Dual Marching Cubes: Primal Contouring of Dual Grids

56 questions (multiple choice, check all that apply, and fill in the blank) The exam is worth 224 points.

Bicycle Math. presented to the Math, Computer Science, & Physics Seminar Bard College Annandale-on-Hudson, New York. Timothy E.

Computational Geometry. Lecture 1: Introduction and Convex Hulls

42 CHAPTER 1. VECTORS AND THE GEOMETRY OF SPACE. Figure 1.18: Parabola y = 2x Brief review of Conic Sections

Introduction to Computer Graphics

IT 386: 3D Modeling and Animation. Review Sheet. Notes from Professor Nersesian s IT 386: 3D Modeling and Animation course

Figure 2.1: Center of mass of four points.

Indicator 2: Use a variety of algebraic concepts and methods to solve equations and inequalities.

GRADES 7, 8, AND 9 BIG IDEAS

A Short Introduction to Computer Graphics

Everyday Mathematics CCSS EDITION CCSS EDITION. Content Strand: Number and Numeration

of surface, , , of triangle, 548 Associative Property of addition, 12, 331 of multiplication, 18, 433

How To Create A Surface From Points On A Computer With A Marching Cube

Everyday Mathematics GOALS

Planar Curve Intersection

TEXTURE AND BUMP MAPPING

Third Grade Shapes Up! Grade Level: Third Grade Written by: Jill Pisman, St. Mary s School East Moline, Illinois Length of Unit: Eight Lessons

Pre-Algebra Academic Content Standards Grade Eight Ohio. Number, Number Sense and Operations Standard. Number and Number Systems

INTRODUCTION TO RENDERING TECHNIQUES

CHAPTER 1 Splines and B-splines an Introduction

Two vectors are equal if they have the same length and direction. They do not

Platonic Solids. Some solids have curved surfaces or a mix of curved and flat surfaces (so they aren't polyhedra). Examples:

H.Calculating Normal Vectors

In mathematics, there are four attainment targets: using and applying mathematics; number and algebra; shape, space and measures, and handling data.

An Overview of the Finite Element Analysis

Intermediate Tutorials Modeling - Trees. 3d studio max. 3d studio max. Tree Modeling Matthew D'Onofrio Page 1 of 12

Mean Value Coordinates

Fundamental Theorems of Vector Calculus

Angles that are between parallel lines, but on opposite sides of a transversal.

CAD/CAM and the Exchange of Product Data

Area of Parallelograms (pages )

Algorithms for Real-Time Tool Path Generation

ME 111: Engineering Drawing

Such As Statements, Kindergarten Grade 8

How does one make and support a reasonable conclusion regarding a problem? How does what I measure influence how I measure?

Course Overview. CSCI 480 Computer Graphics Lecture 1. Administrative Issues Modeling Animation Rendering OpenGL Programming [Angel Ch.

Geometry Course Summary Department: Math. Semester 1

DISCOVERING 3D SHAPES

CAMI Education linked to CAPS: Mathematics

Math 2443, Section 16.3

Conjectures. Chapter 2. Chapter 3

CSU Fresno Problem Solving Session. Geometry, 17 March 2012

Algebra Academic Content Standards Grade Eight and Grade Nine Ohio. Grade Eight. Number, Number Sense and Operations Standard

Cabri Geometry Application User Guide

Discovering Math: Exploring Geometry Teacher s Guide

G3-33 Building Pyramids

Computer Aided Systems

Glencoe. correlated to SOUTH CAROLINA MATH CURRICULUM STANDARDS GRADE 6 3-3, , , 4-9

Conjectures for Geometry for Math 70 By I. L. Tse

Computational Geometry Lab: FEM BASIS FUNCTIONS FOR A TETRAHEDRON

Dear Grade 4 Families,

Recovering Primitives in 3D CAD meshes

SolidWorks Implementation Guides. Sketching Concepts

Area of Parallelograms, Triangles, and Trapezoids (pages )

Reflection and Refraction

CATIA Wireframe & Surfaces TABLE OF CONTENTS

The small increase in x is. and the corresponding increase in y is. Therefore

An introduction to 3D draughting & solid modelling using AutoCAD

Geometry and Measurement

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

Mathematics Pre-Test Sample Questions A. { 11, 7} B. { 7,0,7} C. { 7, 7} D. { 11, 11}

MENSURATION. Definition

Topological Treatment of Platonic, Archimedean, and Related Polyhedra

Double Integrals in Polar Coordinates

From Scattered Samples to Smooth Surfaces

Solutions to Practice Problems for Test 4

Transcription:

CSCI 420 Computer Graphics Lecture 8 and Constructive Solid Geometry [Angel Ch. 10] Jernej Barbic University of Southern California Modeling Complex Shapes An equation for a sphere is possible, but how about an equation for a telephone, or a face? Complexity is achieved using simple pieces polygons, parametric surfaces, or implicit surfaces Goals Model anything with arbitrary precision (in principle) Easy to build and modify Efficient computations (for rendering, collisions, etc.) Easy to implement (a minor consideration...) Source: Wikipedia 1 2 What do we need from shapes in Computer Graphics? Shape Representations Local control of shape for modeling Ability to model what we need Smoothness and continuity Ability to evaluate derivatives Ability to do collision detection Ease of rendering No single technique solves all problems! 3 4 Normals Any shape can be modeled out of polygons if you use enough of them Polygons with how many sides? Can use triangles, quadrilaterals, pentagons, n-gons Triangles are most common. When > 3 sides are used, ambiguity about what to do when polygon nonplanar, or concave, or selfintersecting. Polygon meshes are built out of vertices (points) edges (line segments between vertices) faces (polygons bounded by edges) edges faces vertices 5 6 1

Where Meshes Come From Specify manually Write out all polygons Write some code to generate them Interactive editing: move vertices in space Acquisition from real objects Laser scanners, vision systems Generate set of points on the surface Need to convert to polygons Data Structures for Simplest (but dumb) float triangle[n][3][3]; (each triangle stores 3 (x,y,z) points) redundant: each vertex stored multiple times Vertex List, Face List List of vertices, each vertex consists of (x,y,z) geometric (shape) info only List of triangles, each a triple of vertex id s (or pointers) topological (connectivity, adjacency) info only Fine for many purposes, but finding the faces adjacent to a vertex takes O(F) time for a model with F faces. Such queries are important for topological editing. Fancier schemes: Store more topological info so adjacency queries can be answered in O(1) time. Winged-edge data structure edge structures contain all topological info (pointers to adjacent vertices, edges, and faces). 7 8 A File Format for Polygon Models: OBJ How Many Polygons to Use? # OBJ file for a 2x2x2 cube v -1.0 1.0 1.0 - vertex 1 v -1.0-1.0 1.0 - vertex 2 v 1.0-1.0 1.0 - vertex 3 v 1.0 1.0 1.0 - v -1.0 1.0-1.0 v -1.0-1.0-1.0 v 1.0-1.0-1.0 v 1.0 1.0-1.0 Syntax: f 1 2 3 4 f 8 7 6 5 v x y z f 4 3 7 8 f 5 1 4 8 f 5 6 2 1 f v 1 v 2 v n f 2 6 7 3 - a vertex at (x,y,z) # anything - comment - a face with vertices v 1, v 2, v n 9 10 Why Level of Detail? Different models for near and far objects Different models for rendering and collision detection Compression of data recorded from the real world We need automatic algorithms for reducing the polygon count without losing key features getting artifacts in the silhouette popping Problems with Triangular Meshes? Need a lot of polygons to represent smooth shapes Need a lot of polygons to represent detailed shapes Hard to edit Need to move individual vertices Intersection test? Inside/outside test? 11 12 2

Shape Representations p(u,v) = [x(u,v), y(u,v), z(u,v)] e.g. plane, cylinder, bicubic surface, swept surface Bezier patch 13 14 p(u,v) = [x(u,v), y(u,v), z(u,v)] e.g. plane, cylinder, bicubic surface, swept surface Why better than polygon meshes? Much more compact More convenient to control --- just edit control points Easy to construct from control points What are the problems? Work well for smooth surfaces Must still split surfaces into discrete number of patches Rendering times are higher than for polygons Intersection test? Inside/outside test? the Utah teapot 15 16 Shape Representations Two Ways to Define a Circle Parametric Implicit u F<0 F>0 F=0 x = f(u) = r cos (u) y = g(u) = r sin (u) F(x,y) = x² + y² - r² 17 18 3

well defined inside/outside polygons and parametric surfaces do not have this information Quadric Surfaces F(x,y,z) = ax 2 +by 2 +cz 2 +2fyz+2gzx+2hxy+2px+2qy+2rz+d = 0 Computing is hard: implicit functions for a cube? telephone? Implicit surface: F(x,y,z) = 0 e.g. plane, sphere, cylinder, quadric, torus, blobby models sphere with radius r : F(x,y,z) = x 2 +y 2 +z 2 -r 2 = 0 ellipsoid parabolic terrible for iterating over the surface great for intersections, inside/outside test hyperboloids cone cylinder 19 20 What Implicit Functions are Good For F<0? X + kv F=0? F>0? X Surfaces from Implicit Functions Constant Value Surfaces are called (depending on whom you ask): constant value surfaces level sets isosurfaces F(X + kv) = 0 Ray - Surface Intersection Test Inside/Outside Test Nice Feature: you can add them! (and other tricks) this merges the shapes When you use this with spherical exponential potentials, it s called Blobs, Metaballs, or Soft Objects. Great for modeling animals. 21 22 Blobby Models How to draw implicit surfaces? It s easy to ray trace implicit surfaces because of that easy intersection test Volume Rendering can display them Convert to polygons: the Marching Cubes algorithm Divide space into cubes Evaluate implicit function at each cube vertex Do root finding or linear interpolation along each edge Polygonize on a cube-by-cube basis 23 24 4

Constructive Solid Geometry (CSG) Generate complex shapes with basic building blocks Machine an object - saw parts off, drill holes, glue pieces together Constructive Solid Geometry (CSG) union difference intersection the merger of two objects into one the subtraction of one object from another Source: Wikipedia the portion common to both objects 25 26 Constructive Solid Geometry (CSG) A CSG Train Generate complex shapes with basic building blocks Machine an object - saw parts off, drill holes, glue pieces together This is sensible for objects that are actually made that way (human-made, particularly machined objects) Brian Wyvill & students, Univ. of Calgary 27 28 Negative Objects Use point-by-point boolean functions remove a volume by using a negative object e.g. drill a hole by subtracting a cylinder Subtract From UNION: INTERSECTION: Set Operations Inside(A) Inside(B) Join A and B Inside(A) && Inside(B) Chop off any part of A that sticks out of B SUBTRACTION: Inside(A) && (! Inside(B)) Use B to Cut A To get Inside(BLOCK-CYL) = Inside(BLOCK) And Not(Inside(CYL)) 29 Examples: Use cylinders to drill holes Use rectangular blocks to cut slots Use half-spaces to cut planar faces Use surfaces swept from curves as jigsaws, etc. 30 5

Implicit Functions for Booleans Recall the implicit function for a solid: F(x,y,z)<0 Boolean operations are replaced by arithmetic: MAX MIN MINUS Thus replaces AND (intersection) replaces OR (union) replaces NOT(unary subtraction) A F(Intersect(A,B)) = MAX(F(A),F(B)) F(Union(A,B)) = MIN(F(A),F(B)) F(Subtract(A,B)) = MAX(F(A), -F(B)) F1<0 F1<0 B F2<0 F2<0 CSG Trees Set operations yield tree-based representation 31 Source: Wikipedia 32 Summary Good for smoothly blending multiple components Clearly defined solid along with its boundary Intersection test and Inside/outside test are easy Need to polygonize to render --- expensive Interactive control is not easy Fitting to real world data is not easy Always smooth Polygonal Meshes Constructive Solid Geometry 33 34 6