CS-184: Computer Graphics

Similar documents
CS-184: Computer Graphics. Today

3D Modeling Parametric Curves & Surfaces

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

Curves and Surfaces Computer Graphics I Lecture 9

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

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

Curves and Surfaces Computer Graphics I Lecture 10

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

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

CS-184: Computer Graphics. Today

Computer Graphics Curves and Surfaces. Matthias Teschner

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

CS-184: Computer Graphics. Administrative

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

Central issues in modelling

2D Spline Curves. CS 4620 Lecture 18

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

Curves and Surfaces 1

Sung-Eui Yoon ( 윤성의 )

Design considerations

Parametric curves. Brian Curless CSE 457 Spring 2016

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

Lecture IV Bézier Curves

Information Coding / Computer Graphics, ISY, LiTH. Splines

2D Spline Curves. CS 4620 Lecture 13

Intro to Modeling Modeling in 3D

Introduction to Computer Graphics

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

Computer Graphics I Lecture 11

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

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Outline. Properties of Piecewise Linear Interpolations. The de Casteljau Algorithm. Recall: Linear Interpolation

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

Computergrafik. Matthias Zwicker. Herbst 2010

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

Outline. The de Casteljau Algorithm. Properties of Piecewise Linear Interpolations. Recall: Linear Interpolation

Rational Bezier Curves

Curves. Computer Graphics CSE 167 Lecture 11

Intro to Curves Week 1, Lecture 2

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

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

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

08 - Designing Approximating Curves

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

The Essentials of CAGD

Curve and Surface Basics

INF3320 Computer Graphics and Discrete Geometry

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

Rendering Curves and Surfaces. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg

Curves, Surfaces and Recursive Subdivision

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

Intro to Curves Week 4, Lecture 7

Shape modeling Modeling technique Shape representation! 3D Graphics Modeling Techniques

Bezier Curves, B-Splines, NURBS

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

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

Subdivision Surfaces

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

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

Computer Graphics Splines and Curves

Objects 2: Curves & Splines Christian Miller CS Fall 2011

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

Splines Computer Graphics I Lecture 10

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

Geometric Modeling of Curves

Subdivision. Outline. Key Questions. Subdivision Surfaces. Advanced Computer Graphics (Spring 2013) Video: Geri s Game (outside link)

Spline Notes. Marc Olano University of Maryland, Baltimore County. February 20, 2004

Need for Parametric Equations

Advanced Computer Graphics

Adaptive Tessellation for Trimmed NURBS Surface

Introduction to Geometry. Computer Graphics CMU /15-662

09 - Designing Surfaces. CSCI-GA Computer Graphics - Fall 16 - Daniele Panozzo

Dgp _ lecture 2. Curves

Properties of Blending Functions

Motivation. Parametric Curves (later Surfaces) Outline. Tangents, Normals, Binormals. Arclength. Advanced Computer Graphics (Fall 2010)

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.

Curves and Surfaces. CS475 / 675, Fall Siddhartha Chaudhuri

MA 323 Geometric Modelling Course Notes: Day 21 Three Dimensional Bezier Curves, Projections and Rational Bezier Curves

Rational Bezier Surface

MA 323 Geometric Modelling Course Notes: Day 31 Blended and Ruled Surfaces Coons Patches

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

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

3D Modeling techniques

and the crooked shall be made straight, and the rough ways shall be made smooth; Luke 3:5

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

Freeform Curves on Spheres of Arbitrary Dimension

Derivative. Bernstein polynomials: Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 313

Overview of 3D Object Representations

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

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

Computational Physics PHYS 420

Spline Surfaces, Subdivision Surfaces

3D Modeling I. CG08b Lior Shapira Lecture 8. Based on: Thomas Funkhouser,Princeton University. Thomas Funkhouser 2000

Direct Rendering of Trimmed NURBS Surfaces

CHAPTER 1 Graphics Systems and Models 3

Overview of 3D Object Representations

An Introduction to B-Spline Curves

CS 4620 Final Exam. (a) Is a circle C 0 continuous?

Transcription:

CS-184: Computer Graphics Lecture #12: Curves and Surfaces Prof. James O Brien University of California, Berkeley V2007-F-12-1.0

Today General curve and surface representations Splines and other polynomial bases

Geometry Representations Constructive Solid Geometry (CSG) Parametric Polygons Subdivision surfaces Implicit Surfaces Point-based Surface Not always clear distinctions i.e. CSG done with implicits

Geometry Representations Object made by CSG Converted to polygons

Geometry Representations Object made by CSG Converted to polygons Converted to implicit surface

Geometry Representations CSG on implicit surfaces

Geometry Representations Point-based surface descriptions Ohtake, et al., SIGGRAPH 2003

Geometry Representations Subdivision surface (different levels of refinement) Images from Subdivision.org

Geometry Representations Various strengths and weaknesses Ease of use for design Ease/speed for rendering Simplicity Smoothness Collision detection Flexibility (in more than one sense) Suitability for simulation many others...

Parametric Representations Curves: x = x(u) x R n u R Surfaces: x = x(u, v) x R n u, v R x = x(u) u R 2 Volumes: x = x(u, v, w) x = x(u) x R n u, v, w R u R 3 and so on... Note: a vector function is really n scalar functions

Parametric Rep. Non-unique Same curve/surface may have multiple formulae 3 3 2 2 1 1 0 0-1 -1 0 1 2 3-1 -1 0 1 2 3 x(u) = [u, u] x(u) = [u 3, u 3 ]

Simple Differential Geometry Tangent to curve t(u) = x u u Tangents to surface tu(u, v) = x u u,v Normal of surface ˆn = t u tv tu tv tv(u, v) = x v Also: curvature, curve normals, curve bi-normal, others... Degeneracies: x/ u = 0 or tu tv = 0 u,v

Discretization Arbitrary curves have an uncountable number of parameters 3 2 1 0-1 -1 0 1 2 3 i.e. specify function value at all points on real number line

Discretization Arbitrary curves have an uncountable number of parameters Pick complete set of basis functions Polynomials, Fourier series, etc. Truncate set at some reasonable point x(u) = i=0 c i φ i (u) x(u) = 3 i=0 c i φ i (u) = 3 i=0 c i u i Function represented by the vector (list) of c i The c i may themselves be vectors x(u) = 3 i=0 c i φ i (u)

Power Basis x(u) = Polynomial Basis d i=0 c i u i x(u) = C P d C = [c 0, c 1, c 2,..., c d ] P d = [1, u, u 2,..., u d ] The elements of P d are linearly independant i.e. no good approximation u k c i u i i k Skipping something would lead to bad results... odd stiffness

Specifying a Curve Given desired values (constraints) how do we determine the coefficients for cubic power basis? tu(u 0 ) For now, assume u 0 = 0 u 1 = 1 x(u 0 ) x(u 1 ) tu(u 1 ) u 0 u 1

Specifying a Curve Given desired values (constraints) how do we determine the coefficients for cubic power basis? x(0) = c 0 = x 0 tu(u 0 ) x(1) = c i = x 1 x (0)= c 1 = x 0 x (1)= i c i = x 1 x(u 0 ) tu(u 1 ) x(u 1 ) 0 1

Specifying a Curve tu(u 0 ) tu(u 1 ) x(u 0 ) x(u 1 ) Given desired values (constraints) how do we determine the coefficients for cubic power basis? 0 1 x 0 x 1 x 0 x 1 = 1 0 0 0 1 1 1 1 0 1 0 0 0 1 2 3 c 0 c 1 c 2 c 3 p = B c

Specifying a Curve tu(u 0 ) tu(u 1 ) x(u 0 ) x(u 1 ) Given desired values (constraints) how do we determine the coefficients for cubic power basis? 0 1 c = β H p β H = B 1 = 1 0 0 0 0 0 1 0 3 3 2 1 2 2 1 1

Specifying a Curve Given desired values (constraints) how do we determine the coefficients for cubic power basis? c = β H p β H = B 1 = 1 0 0 0 0 0 1 0 3 3 2 1 2 2 1 1 tu(u 0 ) tu(u 1 ) x(u 0 ) x(u 1 ) 0 1 x(u) = P 3 c = P 3 β H p = 1 + 0u 3u 2 + 2u 3 0 + 0u + 3u 2 2u 3 0 + 1u 2u 2 + 1u 3 0 + 0u 1u 2 + 1u 3 p

Specifying a Curve Given desired values (constraints) how do we determine the coefficients for cubic power basis? c = β H p x(u) = 1 + 0u 3u 2 + 2u 3 0 + 0u + 3u 2 2u 3 0 + 1u 2u 2 + 1u 3 0 + 0u 1u 2 + 1u 3 p Hermite basis functions x(u) = 3 tu(u 0 ) x(u x(u 0 ) 1 ) tu(u 1 ) 0 1 i=0 p i b i (u)

Specifying a Curve Given desired values (constraints) how do we determine the coefficients for cubic power basis? tu(u 0 ) Probably not to scale. x(u 0 ) x(u 1 ) tu(u 1 ) 0 1 Hermite basis functions x(u) = 3 i=0 p i b i (u)

Hermite Basis Specify curve by Endpoint values Endpoint tangents (derivatives) Parameter interval is arbitrary (most times) Don t need to recompute basis functions These are cubic Hermite Could do construction for any odd degree (d 1)/2 derivatives at end points

Cubic Bézier Similar to Hermite, but specify tangents indirectly x 0 = p 0 x 1 = p 3 x 0 = 3(p 1 p 0 ) x 1 = 3(p 3 p 2 ) Note: all the control points are points in space, no tangents.

Cubic Bézier Similar to Hermite, but specify tangents indirectly 1 0 0 0 1 1 1 1 0 1 0 0 0 1 2 3 c = 1 0 0 0 0 0 0 1 3 3 0 0 0 0 3 3 p x 0 = p 0 x 1 = p 3 x 0 = 3(p 1 p 0 ) x 1 = 3(p 3 p 2 ) c = 1 0 0 0 3 3 0 0 3 6 3 0 1 3 3 1 p c = β Z p

Cubic Bézier Plot of Bézier basis functions 1 0.8 0.6 0.4 0.2 0.2 0.4 0.6 0.8 1

Changing Bases Power basis, Hermite, and Bézier all are still just cubic polynomials The three basis sets all span the same space Like different axes in Changing basis R 3 R 4 c = β Z p Z c = β H p H p Z = β 1 Z β H p H

Useful Properties of a Basis Convex Hull All points on curve inside convex hull of control points i b i (u) = 1 b i (u) 0 u Ω Bézier basis has convex hull property

Useful Properties of a Basis Invariance under class of transforms Transforming curve is same as transforming control points x(u) = p i b i (u) T x(u) = (T p i )b i (u) i i Bézier basis invariant for affine transforms Bézier basis NOT invariant for perspective transforms NURBS are though...

Useful Properties of a Basis Local support Changing one control point has limited impact on entire curve Nice subdivision rules Orthogonality ( ) Fast evaluation scheme Interpolation -vs- approximation Ω b i(u)b j (u)du = δ ij

DeCasteljau Evaluation A geometric evaluation scheme for Bézier error... u = 0 u =.25 u =.5 u =.75 u = 1

Adaptive Tessellation Midpoint test subdivision Possible problem Simple solution if curve basis has convex hull property If curve inside convex hull and the convex hull is nearly flat: curve is nearly flat and can be drawn as straight line Better: draw convex hull Works for Bézier because the ends are interpolated Recall...

Bézier Subdivision Form control polygon for half of curve by evaluating at u=0.5 Repeated subdivision makes smaller/flatter segments Also works for surfaces...

Joining a C 0 b = b C 1 b a = c b b G 1 b a b a = c b c b c If you change a, b, or c you must change the others But if you change a, b, or c you do not have to change beyond those three. *Local Support*

Hump Functions Constraints at joining can be built in to make new basis

Tensor-Product Surfaces Surface is a curve swept through space Replace control points of curve with other curves x(u, v) = i p i b i (u) i q i (v) b i (u) q i (v) = j p ji b j (v) x(u, v) = ij p ij b i (u)b j (v) b ij (u, v) = b i (u)b j (v) x(u, v) = ij p ij b ij (u, v)

Hermite Surface Bases 1 0.75 0.5 0.25 0 0 0.2 0.4 0.4 0.6 1 0.8 0.6 0.8 1 0 0.2 0.15 0.1 0.05 0 0 0.2 0.4 0.4 0.6 1 0.8 0.6 0.8 1 0 0.2 Plus symmetries... 0.02 0.015 0.01 0.005 0 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 1 0.8

Hermite Surface Hump Functions 1 0.75 0.5 0.25 0 0 0.2 0.4 0.4 0.6 1 0.8 1 0.75 0.5 0.25 0-1 -0.5 0 0.5 1-1 0-0.5 1 0.5 Plus symmetries... 0.1 0-0.1-1 -0.5 0.6 0.8 0 1 0 0.2 0.5 1-1 0.15 0.1 0.05 0 0 0.2 0.4 0.6 0.8 0-0.5 1 0.5 1 0 0.2 0.4 0.6 1 0.8 0.02 0.01-0.01 0-0.02-1 -0.5 0 0.5 0.02 0.015 0.01 0.005 0 0 0.2 0.4 0.6 0.8 1-1 0-0.5 1 0 0.2 1 0.5 0.4 0.6 1 0.8

Adaptive Tessellation Given surface patch If close to flat: draw it Else subdivide 4 ways

Adaptive Tessellation Avoid cracking Passes flatness test Fails flatness test

Adaptive Tessellation Avoid cracking Cracks may be okay in some contexts... Crack in the surface

Adaptive Tessellation Avoid cracking

Adaptive Tessellation Avoid cracking Test interior and boundary of patch Split boundary based on boundary test Table of polygon patterns May wish to avoid slivers