B-Splines and NURBS Week 5, Lecture 9

Similar documents
Bezier Curves, B-Splines, NURBS

Intro to Curves Week 4, Lecture 7

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

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.

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

Rational Bezier Curves

2D Spline Curves. CS 4620 Lecture 13

Design considerations

Intro to Curves Week 1, Lecture 2

Need for Parametric Equations

Transformations Week 9, Lecture 18

A story about Non Uniform Rational B-Splines. E. Shcherbakov

Curves. Computer Graphics CSE 167 Lecture 11

3D Transformations World Window to Viewport Transformation Week 2, Lecture 4

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

2D Spline Curves. CS 4620 Lecture 18

XPM 2D Transformations Week 2, Lecture 3

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

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

XPM 2D Transformations Week 2, Lecture 3

3D Modeling: Surfaces

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

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

Computer Graphics Curves and Surfaces. Matthias Teschner

08 - Designing Approximating Curves

Parametric curves. Brian Curless CSE 457 Spring 2016

(Spline, Bezier, B-Spline)

Central issues in modelling

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

3D Modeling Parametric Curves & Surfaces

NURBS: Non-Uniform Rational B-Splines AUI Course Denbigh Starkey

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

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

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

Curves and Surfaces 1

Computergrafik. Matthias Zwicker. Herbst 2010

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

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

Curve and Surface Basics

Rational Bezier Surface

B-spline Curves. Smoother than other curve forms

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Curves and Surfaces Computer Graphics I Lecture 10

Curves and Surfaces Computer Graphics I Lecture 9

Lecture IV Bézier Curves

Dgp _ lecture 2. Curves

Objects 2: Curves & Splines Christian Miller CS Fall 2011

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

Splines. Connecting the Dots

Curves and Surfaces 2

3D Modeling: Solid Models

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

Lecture 2.2 Cubic Splines

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

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 goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

The Free-form Surface Modelling System

A Practical Review of Uniform B-Splines

Fathi El-Yafi Project and Software Development Manager Engineering Simulation

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

Sung-Eui Yoon ( 윤성의 )

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

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

Curve Construction via Local Fitting

CS-184: Computer Graphics. Today

COMP3421. Global Lighting Part 2: Radiosity

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

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

Intro to Modeling Modeling in 3D

CAGD PACKAGE FOR MATHEMATICA AND ITS USAGE IN THE TEACHING

An introduction to NURBS

B-Spline Polynomials. B-Spline Polynomials. Uniform Cubic B-Spline Curves CS 460. Computer Graphics

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

Spline Morphing. CG software practical course in the IWR. Carl Friedrich Bolz. Carl Friedrich Bolz

Important Properties of B-spline Basis Functions

CS-184: Computer Graphics

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

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

Advanced Texture-Mapping Curves and Curved Surfaces. Pre-Lecture Business. Texture Modes. Texture Modes. Review quiz

Mathematical Tools in Computer Graphics with C# Implementations Table of Contents

Properties of Blending Functions

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

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg

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

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

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

Geometric Modeling of Curves

CAP 6736 Geometric Modeling Team Hamilton B-Spline Basis Functions. Presented by Padmavathi Siddi Vigneshkumar Suresh Jorge Medrano

Bezier Curves. An Introduction. Detlef Reimers

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

3D Representation and Solid Modeling

An introduction to interpolation and splines

Freeform Curves on Spheres of Arbitrary Dimension

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

ECE 600, Dr. Farag, Summer 09

Flank Millable Surface Design with Conical and Barrel Tools

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

Introduction to Computer Graphics

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

Transcription:

CS 430/585 Computer Graphics I B-Splines an NURBS Week 5, Lecture 9 Davi Breen, William Regli an Maxim Peysakhov Geometric an Intelligent Computing Laboratory Department of Computer Science Drexel University http://gicl.cs.rexel.eu Outline Types of 2D Curves Splines B-splines NURBS Knot sequences Effects of the weights 1 2 Splines Popularize in late 1960s in US Auto inustry (GM) R. Riesenfel (1972) W. Goron Origin: the thin woo or metal strips use in builing/ship construction Goal: efine a curve as a set of piecewise simple polynomial functions connecte Natural Splines Mathematical representation of physical splines C 2 continuous Interpolate all control points Have Global control P 1 (no local control) P 0 P 2 P n-2 P n P n-1 together 3 4 B-splines: Basic Ieas B-splines Similar to Bézier curves Smooth blening function times control points But: Blening functions are non-zero over only a small part of the parameter range (giving us local suppor When nonzero, they are the concatenation of smooth polynomials 5 Define similarly to Bézier curves p i are the control points Compute with basis functions (Basis-splines) B-spline basis functions are blening functions Each point on the curve is efine by the blening of the control points (B i is the i-th B-spline blening function) m p( Bi, ( pi i 0 6

B B B-splines: Cox-eBoor Recursion Cox-eBoor Algorithm: efines the blening functions for spline curves (not limite to eg 3) curves are weighte avgs of lower egree curves Let B i, ( enote the i-th blening function for a B-spline of egree, then: k,0 k, 1, if tk t < tk + 1 ( 0, otherwise t tk tk ( Bk, 1( + t t t k + k + + 1 k+ + 1 t t k + 1 B k+ 1, 1 ( 7 B-spline Blening Functions is a step function that is 1 in the B ( k, 0 interval spans two intervals an is a B k,1 ( piecewise linear function that goes from 0 to 1 (an back) spans three intervals an is a B ( piecewise quaratic that grows k, 2 from 0 to 1/4, then up to 3/4 in the mile of the secon interval, back to 1/4, an back to 0 is a cubic that spans four intervals growing from 0 to 1/6 to 2/3, then B ( k, 3 back to 1/6 an to 0 B-spline blening functions 8 Pics/Math courtesy of Dave Mount @ UMD-CP B-spline Blening Functions: Example for 2 n Orer Splines Note: can t efine a polynomial with these properties (both 0 an non-zero for ranges) Iea: subivie the parameter space into intervals an buil a piecewise polynomial Each interval gets ifferent polynomial function 9 Pics/Math courtesy of Dave Mount @ UMD-CP B-spline Blening Functions: Example for 3 Orer Splines Observe: at t0 an t1 just three of the functions are non-zero all are >0 an sum to 1, hence the convex hull property hols for each curve segment of a B-spline 10 B-splines: Setting the Options Specifie by m 3 m+1 control points, P 0 P m m-2 cubic polynomial curve segments, Q 3 Q m m-1 knot points, t 4 t m+1 segments Q i of the B-spline curve are efine over a knot interval [ t i, t i+ 1] efine by 4 of the control points, P i-3 P i segments Q i of the B-spline curve are blene together into smooth transitions via (the new & improve) blening functions 11 Example: Creating a B-spline Curve Segment Q i t i 1 t i P i 12

B-splines: Knot Selection B-spline: Knot Sequences Instea of working with the parameter space 0 t 1, use tmin t0 t1 t2... tm 1 t The knot points joint points between curve segments, Q i Each has a knot value m-1 knots for m+1 points 13 max Even istribution of knots uniform B-splines Curve oes not interpolate en points first blening function not equal to 1 at t0 Uneven istribution of knots non-uniform B-splines Allows us to tie own the enpoints by repeating knot values (in Cox-eBoor, 0/01) If a knot value is repeate, it increases the effect (weigh of the blening function at that point If knot is repeate times, blening function converges to 1 an the curve interpolates the control point 14 Creating a Non-Uniform B-spline: Knot Selection Given curve of egree 3, with m+1 control points first, create m-1+2(-1) knot points use knot values (0,0,0,1,2,, m-2, m-1,m-1,m-1) (aing two extra 0 s an m-1 s) Note Causes Cox-eBoor to give ae weight in blening to the first an last points when t is near t min an t max Watching Effects of Knot Selection 8 knot points (initially) Note: knots are istribute parametrically base on t, hence why they move 10 control points Curves have as many segments as they have non-zero intervals in u egree of curve 15 16 B-splines: Local Control Property B-splines: Local Control Property Local Control polynomial coefficients epen on a few points moving control point (P 4 ) affects only local curve Why: Base on curve ef n, affecte region extens at most 1 knot point away 17 18 Recore from: http://heim.ifi.uio.no/~tronbre/osloalgapp.html

Control: Bézier vs B-splines Observe the effect on the whole curve when controls are move B-splines: Convex Hull Property The effect of multiple control points on a uniform B-spline curve 19 20 B-splines: Continuity B-splines: Setting the Options Derivatives are easy for cubics p( u) k 0 Derivative: p c + 2c u + c u Easy to show C 0, C 1, C 2 3 u k c k 1 2 3 3 2 21 How to space the knot points? Uniform equal spacing of knots along the curve Non-Uniform Which type of parametric function? Rational x(, y(, z( efine as ratio of cubic polynomials Non-Rational 22 NURBS At the core of several moern CAD systems I-DEAS, Pro/E, Alpha_1 Describes analytic an freeform shapes Accurate an efficient evaluation algorithms Invariant uner affine an perspective transformations 23 U of Utah, Alpha_1 Benefits of Rational Spline Curves Invariant uner rotation, scale, translation, perspective transformations transform just the control points, then regenerate the curve (non-rationals only invariant uner rotation, scale an translation) Can precisely efine the conic sections an other analytic functions conics require quaratic polynomials conics only approximate with non-rationals 24

NURBS Non-uniform Rational B-splines: NURBS Basic iea: four imensional non-uniform B-splines, followe by normalization via homogeneous coorinates If P i is [x, y, z, 1], results are invariant wrt perspective projection Also, recall in Cox-eBoor, knot spacing is arbitrary knots are close together, influence of some control points increases Duplicate knots can cause points to interpolate e.g. Knots {0, 0, 0, 0, 1, 1, 1, 1} create a Bézier curve Rational Functions Cubic curve segments X ( Y ( Z( x (, y(, z( W ( W ( W ( where X (, Y (, Z(, W ( are all cubic polynomials with control points specifie in homogenous coorinates, [x,y,z,w] Note: for 2D case, Z( 0 25 26 Rational Functions: Example Example: rational function: a ratio of polynomials a rational parameterization in u of a unit circle in xy-plane: a unit circle in 3D homogeneous coorinates: NURBS: Notation Alert Depening on the source/reference Blening functions are either B i, or N i, Parameter variable is either u or t Curve is either C or P or Q Control Points are either P i or B i Variables for orer, egree, number of control points etc are frustratingly inconsistent k, i, j, m, n, p, L,,. 27 28 NURBS: Notation Alert NURBS 1. If efine using homogenous coorinates, the 4 th (3 r for 2D) imension of each P i is the weight 2. If efine as weighte eucliian, a separate constant w i, is efine for each control point 29 A -th egree NURBS curve C is ef as: C n i 0 i i, n 1 w i 0 ibi, Where control points, -th egree B-spline blening functions, the weight, w i, for control point P i (when all w i 1, we have a B-spline curve) 1 w B P i B i, 30

Observe: Weights Inuce New Rational Basis Functions, R Setting: R i w B i i, n 1 wi Bi, i 0 n 1 Allows us to write: ( ) C u Ri, Pi i 0 Where R are rational basis functions piecewise rational basis functions on u [0,1 weights are incorporate into the basis fctns i, ] 31 Geometric Interpretation of NURBS With Homogeneous coorinates, a rational n- D curve is represente by polynomial curve in (n+1)-d Homogeneous 3D control points are written as: in 4D where To get, ivie by w i a perspective transform with center at the origin Note: weights can allow final curve shape to go outsie the convex hull (i.e. negative w) 32 NURBS: Examples NURBS: Examples Unif. Knot Vector Non-Unif. Knot Vector {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0} {0.0, 1.0, 2.0, 3.75, 4.0, 4.25, 6.0, 7.0} Knot Vector {0.0, 0.0, 0.0, 3.0, 4.0, 5.0, 6.0, 7.0} Several consecutive knots get the same value Bunches up the curve an forces it to interpolate 33 34 NURBS: Examples Knot Vector {0.0, 1.0, 2.0, 3.0, 3.0, 5.0, 6.0, 7.0} Several consecutive knots get the same value Bunches up the curve an forces it to interpolate Can be one micurve 35 The Effects of the Weights w i of P i effects only the range [u i, u i+k+1 ) If w i 0 then P i oes not contribute to C If w i increases, point B an curve C are pulle towar P i an pushe away from P j If w i ecreases, point B an curve C are pushe away from P i an pulle towar P j If w i approaches infinity then B approaches 1 an B i -> P i, if u in [u i, u i+k+1 ) 36

The Effects of the Weights Increase weight pulls the curve towar B 3 37