3D Modeling Parametric Curves & Surfaces

Similar documents
3D Modeling Parametric Curves & Surfaces. Shandong University Spring 2013

Design considerations

CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

Geometric Modeling of Curves

Computer Graphics Splines and Curves

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

CS-184: Computer Graphics. Today

Intro to Curves Week 4, Lecture 7

08 - Designing Approximating Curves

Intro to Modeling Modeling in 3D

Curves and Surfaces 1

Introduction to Computer Graphics

CS-184: Computer Graphics

Curves and Surfaces Computer Graphics I Lecture 9

Computer Graphics Curves and Surfaces. Matthias Teschner

Bezier Curves, B-Splines, NURBS

Curves. Computer Graphics CSE 167 Lecture 11

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Intro to Curves Week 1, Lecture 2

Curves and Surfaces Computer Graphics I Lecture 10

Central issues in modelling

CS 536 Computer Graphics Intro to Curves Week 1, Lecture 2

Information Coding / Computer Graphics, ISY, LiTH. Splines

Implicit Surfaces & Solid Representations COS 426

Rational Bezier Curves

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

LECTURE #6. Geometric Modelling for Engineering Applications. Geometric modeling for engineering applications

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

Computergrafik. Matthias Zwicker. Herbst 2010

The Free-form Surface Modelling System

Know it. Control points. B Spline surfaces. Implicit surfaces

Surface Modeling. Polygon Tables. Types: Generating models: Polygon Surfaces. Polygon surfaces Curved surfaces Volumes. Interactive Procedural

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

Until now we have worked with flat entities such as lines and flat polygons. Fit well with graphics hardware Mathematically simple

Sung-Eui Yoon ( 윤성의 )

3D Object Representation. Michael Kazhdan ( /657)

CSE 167: Introduction to Computer Graphics Lecture #13: Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

An introduction to interpolation and splines

CS770/870 Spring 2017 Curve Generation

Curve and Surface Basics

Computer Graphics. Curves and Surfaces. Hermite/Bezier Curves, (B-)Splines, and NURBS. By Ulf Assarsson

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

Curves and Surface I. Angel Ch.10

(Spline, Bezier, B-Spline)

Subdivision Surfaces. Course Syllabus. Course Syllabus. Modeling. Equivalence of Representations. 3D Object Representations

Curves and Curved Surfaces. Adapted by FFL from CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006

2D Spline Curves. CS 4620 Lecture 13

3D Modeling techniques

Dgp _ lecture 2. Curves

Introduction p. 1 What Is Geometric Modeling? p. 1 Computer-aided geometric design Solid modeling Algebraic geometry Computational geometry

Curves and Surfaces. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd

Advanced Graphics. Beziers, B-splines, and NURBS. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Lecture IV Bézier Curves

Properties of Blending Functions

Curve Representation ME761A Instructor in Charge Prof. J. Ramkumar Department of Mechanical Engineering, IIT Kanpur

Parametric curves. Brian Curless CSE 457 Spring 2016

B-spline Curves. Smoother than other curve forms

Curves and Surfaces. CS475 / 675, Fall Siddhartha Chaudhuri

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Bézier Splines. B-Splines. B-Splines. CS 475 / CS 675 Computer Graphics. Lecture 14 : Modelling Curves 3 B-Splines. n i t i 1 t n i. J n,i.

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

Roadmap for tonight. What are Bezier curves (mathematically)? Programming Bezier curves (very high level view).

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg

CS130 : Computer Graphics Curves. Tamar Shinar Computer Science & Engineering UC Riverside

Curves D.A. Forsyth, with slides from John Hart

2D Spline Curves. CS 4620 Lecture 18

Geometric Modeling Systems

CS 475 / CS Computer Graphics. Modelling Curves 3 - B-Splines

Splines. Connecting the Dots

Need for Parametric Equations

COMP3421. Global Lighting Part 2: Radiosity

Introduction to Geometry. Computer Graphics CMU /15-662

Fathi El-Yafi Project and Software Development Manager Engineering Simulation

Computer Graphics I Lecture 11

(Refer Slide Time: 00:02:24 min)

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics 1/15

Review of Tuesday. ECS 175 Chapter 3: Object Representation

Curves, Surfaces and Recursive Subdivision

Curves & Surfaces. MIT EECS 6.837, Durand and Cutler

Representing Curves Part II. Foley & Van Dam, Chapter 11

CS337 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics. Bin Sheng Representing Shape 9/20/16 1/15

Further Graphics. Bezier Curves and Surfaces. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Modeling 3D Objects: Part 2

Curves & Surfaces. Last Time? Progressive Meshes. Selective Refinement. Adjacency Data Structures. Mesh Simplification. Mesh Simplification

Surfaces for CAGD. FSP Tutorial. FSP-Seminar, Graz, November

Remark. Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 331

Spline Surfaces, Subdivision Surfaces

To Do. Resources. Algorithm Outline. Simplifications. Advanced Computer Graphics (Spring 2013) Surface Simplification: Goals (Garland)

Computer Graphics Spline and Surfaces

Curves and Surfaces for Computer-Aided Geometric Design

Fundamentals of Computer Graphics. Lecture 3 Parametric curve and surface. Yong-Jin Liu.

Parametric curves. Reading. Curves before computers. Mathematical curve representation. CSE 457 Winter Required:

9. Three Dimensional Object Representations

Introduction to the Mathematical Concepts of CATIA V5

Overview of 3D Object Representations

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

Transcription:

3D Modeling Parametric Curves & Surfaces Shandong University Spring 2012 3D Object Representations Raw data Point cloud Range image Polygon soup Solids Voxels BSP tree CSG Sweep Surfaces Mesh Subdivision Parametric Implicit High-level structures Scene graph Skeleton Application specific 1

Parametric Surfaces Applications Design of smooth surfaces in cars, ships, etc. Continuity When two curves are joined, we typically want some degree of continuity across the boundary (the knot) Geometric Continuity G 0 : The curves touch at the join point. G 1 : The curves also share a common tangent direction at the join point. G 2 : The curves also share a common center of curvature at the join point. 2

Continuity Parametric Continuity C 1 : curves include discontinuities C 0 : curves are joined C 1 : first derivatives are continuous C 2 : first and second derivatives are continuous C n : first through n th derivatives are continuous Continuity Parametric (red) and Geometric (black) Continuity comparison 3

Parametric Curves Boundary defined by parametric functions: Example: line segment u V1 V0 Parametric Curves Boundary defined by parametric functions: Example: ellipse cos sin 4

Parametric Curves How can we define arbitrary curves? u Parametric Curves How can we define arbitrary curves? V1 u V0 Use functions that blend control points 5

Parametric Curves More generally: Parametric Curves What B(u) functions should we use? V1 V0 6

Parametric Curves What B(u) functions should we use? Parametric Polynomial Curves Polynomial blending functions: Advantages of polynomials Easy to compute Easy differentiation Easy to derive curve properties 7

Parametric Polynomial Curves Polynomial blending functions: What degree polynomial? Easy to compute Easy to control Expressive Parametric Cubic Curves Why cubic? lower-degree polynomials give too little flexibility in controlling the shape of the curve higher-degree polynomials can introduce unwanted wiggles and require more computation lowest degree that allows specification of endpoints and their derivatives lowest degree that is not planar in 3D 8

Parametric Cubic Curves General form: xu ( ) au bu cu d 3 2 x x x x yu ( ) au bu cu d 3 2 y y y y zu ( ) au bu cu d 3 2 z z z z ax ay az bx by b z C T u u u cx cy c z dx dy dz Qu ( ) [ xu ( ) yu ( ) zu ( )] TC 3 2 [ 1] Major Types of Parametric Cubic Curves Cubic Bézier defined by two endpoints and two other points that control the endpoint tangent vectors Hermite defined by two endpoints and two tangent vectors Splines several kinds, each defined by four points uniform B-splines, non-uniform B-splines, ß- splines 9

Bézier Curves Developed independently in 1960s by Bézier (at Renault) decasteljau (at Citroen) Curve Q(u) is defined by nested interpolation: s are control points,,, is control polygon Basic properties of Bézier curves Endpoint interpolation: Convex hull: Curve is contained within convex hull of control polygon Transformational invariance Symmetry defined by,, defined by,, 10

More Properties General case: Bernstein polynomials Degree: polynomial of degree n Tangents: Some Bézier Curves 11

Cubic Bézier Curves,,, Hermite Curves Given: two points and two tangent vectors Similarity to cubic Bézier curves Other two Bézier control points along those tangents Call the points and, and the tangents and So given two points and vectors, find the coefficients of etc. 12

Hermite Curves We can treat x in the mapping as a vector. Its components can be explicitly written as 3 2 3 0 0 u x x1 x0 x 1 x 0 2 2 3 0 1 u y y y y y 1 0 1 0 1 1 0 0 u z z1 z0 z 1 z 0 1 2 1 0 1 Longer Curves A single cubic Bezier or Hermite curve can only capture a small class of curves At most 2 inflection points One solution is to raise the degree Allows more control, at the expense of more control points and higher degree polynomials Control is not local, one control point influences entire curve Alternate, most common solution is to join pieces of cubic curve together into piecewise cubic curves Total curve can be broken into pieces, each of which is cubic Local control: Each control point only influences a limited part of the curve Interaction and design is much easier 13

Piecewise Bézier Curve P 0,1 P 0,2 P 0,0 P 0,3 P 1,0 knot P 1,3 P 1,1 P 1,2 Continuity Question: How do we ensure that two Hermite curves are C 1 across a knot? Question: How do we ensure that two Bézier curves are C 0, or C 1, or C 2 across a knot? 14

Achieving Continuity For Hermite curves, the user specifies the derivatives, so C 1 is achieved simply by sharing points and derivatives across the knot For Bézier curves: They interpolate their endpoints, so C 0 is achieved by sharing control points The parametric derivative is a constant multiple of the vector joining the first/last 2 control points So C 1 is achieved by setting P 0,3 =P 1,0 =J, and making P 0,2 and J and P 1,1 collinear, with J-P 0,2 =P 1,1 -J C 2 comes from further constraints on P 0,1 and P 1,2 Bézier Continuity P 0,1 P 0,2 P 0,0 J P 1,3 P 1,1 P 1,2 15

B-Spline Curves Why to introduce B-Spline? Bezier curve/surface has many advantages, but they have two main shortcomings: Bezier curve/surface cannot be modified locally It is very complex to satisfy geometric continuity conditions for Bezier curves or surfaces joining. Why not use lower degree piecewise polynomial with continuous joining? that s Spline B-Spline Curves Formula of B-Spline Curve. Pi (i=0,1, n) are control points Ni,k(t) (i=0,1,..,n) are the i-th B-Spline basis function of order k. B-Spline basis function is an order k (degree k -1) piecewise polynomial. 16

B-Spline Curves Definition of B-Spline Basis Function B-Spline Curves Cubic B-Spline n=3, k=4 p 1 p(u) = ( 1/6p 0 +1/2p 1 1/2p 2 +1/6p 3 )u 3 + ( 1/2p 0 p 1 +1/2p 2 )u 2 + ( 1/2p 0 + 1/2p 2 )u + 1/6p 0 +2/3p 1 +1/6p 2 p 2 but makes more sense as p(u) = ( 1/6u 3 + 1/2u 2 1/2u + 1/6)p 0 + ( 1/2u 3 u 2 + 2/3)p 1 + ( 1/2u 3 + 1/2u 2 + 1/2u + 1/6)p 2 + ( 1/6u 3 )p 3 p 0 p 3 17

B-Spline Curves In matrix form,,, B-Spline Curves Examples: 18

B-Spline Curves Properties: Local Continuity P(t) is C k-1-r continuous at a node of repetitiveness r. Convex hull Piecewise polynomial Geometry invariant Affine invariant Flexibility How to Choose a Spline Hermite curves are good for single segments where you know the parametric derivative or want easy control of it Bézier curves are good for single segments or patches where a user controls the points B-splines are good for large continuous curves and surfaces NURBS are the most general, and are good when that generality is useful, or when conic sections must be accurately represented (CAD) 19

Parametric Surfaces Boundary defined by parametric functions:,,, Parametric Surfaces Boundary defined by parametric functions:,,, Example: quadrilateral, 1 1 1, 1 1 1, 1 1 1 20

Parametric Surfaces Boundary defined by parametric functions:,,, Example: quadrilateral, 1 1 1, 1 1 1, 1 1 1 Parametric Surfaces Boundary defined by parametric functions:,,, Example: ellipsoid, cos cos, cos sin, sin 21

Parametric Surfaces Advantage: easy to enumerate points on surface. Disadvantage: need piecewise-parametric surface to describe complex shape. Piecewise Polynomial Parametric Surfaces Surface is partitioned into parametric patches: 22

Parametric Patches Each patch is defined by blending control points Same ideas as parametric curves! Parametric Patches Point Q(u,v) on the patch is the tensor product of parametric curves defined by the control points 23

Parametric Bicubic Patches Point Q(u,v) on any patch is defined by combining control points with polynomial blending functions:,,,,,,,,,,,,,,,,,, Where M is a matrix describing the blending functions for a parametric cubic curve (e.g., Bézier, B-spline, etc.) Bézier Patches, é,, é,,,,,,,,,,,,,, é 1 3 3 6 3 3 1 0 3 1 3 0 0 0 0 0 24

Bézier Patches The patch interpolates its corner points Comes from the interpolation property of the underlying curves The tangent plane at each corner interpolates the corner vertex and the two neighboring edge vertices The patch lies within the convex hull of its control vertices The basis functions sum to one and are positive everywhere Bézier Patches A patch mesh is just many patches joined together along their edges Patches meet along complete edges Each patch must be a quadrilateral OK OK Not OK Not OK 25

Bézier Surfaces Continuity constraints are similar to the ones for Bézier splines Bézier Surfaces C 0 continuity requires aligning boundary curves 26

Bézier Surfaces C 1 continuity requires aligning boundary curves and derivatives B-Spline Patches,,,,,,,,,,,,,,,,, 1/6 1/2 1/2 1 1/2 0 1/6 2/3 1/2 1/6 1/2 0 1/2 0 1/6 0 27

Parametric Surfaces Advantages: Easy to enumerate points on surface Possible to describe complex shapes Disadvantages: Control mesh must be quadrilaterals Continuity constraints difficult to maintain Hard to find intersections Summary Feature Polygon Mesh Subdivision Surface Accurate Concise Intuitive specification Local support Affine invariant Arbitrary topology Guaranteed continuity Natural parameterization Efficient display Efficient intersections No No No No No No No No No Parametric Surface No No 28