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

Similar documents
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.

(Spline, Bezier, B-Spline)

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

08 - Designing Approximating Curves

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

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

Rational Bezier Curves

2D Spline Curves. CS 4620 Lecture 18

Need for Parametric Equations

2D Spline Curves. CS 4620 Lecture 13

Design considerations

Important Properties of B-spline Basis Functions

Rational Bezier Surface

Bezier Curves, B-Splines, NURBS

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

3D Modeling Parametric Curves & Surfaces

Curve and Surface Basics

Central issues in modelling

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

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

Lecture IV Bézier Curves

B-Splines and NURBS Week 5, Lecture 9

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

Properties of Blending Functions

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

Parametric curves. Brian Curless CSE 457 Spring 2016

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

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

Curves and Surfaces 1

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

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

B(asis) Splines. Ashish Myles CISE, UF

Dgp _ lecture 2. Curves

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

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

Intro to Curves Week 4, Lecture 7

Designing by a Quadratic Trigonometric Spline with Point and Interval Shape Control

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

Computergrafik. Matthias Zwicker. Herbst 2010

Curves and Surfaces Computer Graphics I Lecture 9

Intro to Curves Week 1, Lecture 2

Curves. Computer Graphics CSE 167 Lecture 11

Computer Graphics Curves and Surfaces. Matthias Teschner

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

Advanced Modeling 2. Katja Bühler, Andrej Varchola, Eduard Gröller. March 24, x(t) z(t)

B-spline Curves. Smoother than other curve forms

A Practical Review of Uniform B-Splines

Computer Graphics Spline and Surfaces

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

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

Computer Graphics Splines and Curves

Curve Construction via Local Fitting

CAGD PACKAGE FOR MATHEMATICA AND ITS USAGE IN THE TEACHING

Bezier Curves. An Introduction. Detlef Reimers

Knot Insertion and Reparametrization of Interval B-spline Curves

Freeform Curves on Spheres of Arbitrary Dimension

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

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

Figure 5.1: Spline and ducks.

15.10 Curve Interpolation using Uniform Cubic B-Spline Curves. CS Dept, UK

CS-184: Computer Graphics. Today

Spline curves. in polar and Cartesian coordinates. Giulio Casciola and Serena Morigi. Department of Mathematics, University of Bologna, Italy

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

Spline Methods Draft. Tom Lyche and Knut Mørken. Department of Informatics Centre of Mathematics for Applications University of Oslo

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

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

Curves and Surfaces Computer Graphics I Lecture 10

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

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

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

Fathi El-Yafi Project and Software Development Manager Engineering Simulation

CS-184: Computer Graphics

CS 450 Numerical Analysis. Chapter 7: Interpolation

An Introduction to B-Spline Curves

Spline Methods Draft. Tom Lyche and Knut Mørken

PS Geometric Modeling Homework Assignment Sheet I (Due 20-Oct-2017)

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

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

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

Objects 2: Curves & Splines Christian Miller CS Fall 2011

A New Class of Quasi-Cubic Trigonometric Bezier Curve and Surfaces

Splines. Connecting the Dots

On an approach for cubic Bézier interpolation

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

Friday, 11 January 13. Interpolation

Drawing hypergraphs using NURBS curves

Spline Methods Draft. Tom Lyche and Knut Mørken

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

Quasi-Quartic Trigonometric Bézier Curves and Surfaces with Shape Parameters

Interactive Graphics. Lecture 9: Introduction to Spline Curves. Interactive Graphics Lecture 9: Slide 1

The Free-form Surface Modelling System

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

Parameterization. Michael S. Floater. November 10, 2011

Parameterization of triangular meshes

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

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

ECE 600, Dr. Farag, Summer 09

A generalized conversion matrix between non-uniform B-spline and Bézier representations with applications in CAGD

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

Transcription:

CS 475 / CS 675 - Computer Graphics Modelling Curves 3 -

Bézier Splines n P t = i=0 No local control. B i J n,i t with 0 t 1 J n,i t = n i t i 1 t n i Degree restricted by the control polygon. http://www.cs.mtu.edu/~shene/courses/cs3621/notes/spline/bezier/bezier-move-ct-pt.html CS475/CS675 - Lecture 11 2

Terminology B 2 B 4 Q 3 x 3 Q 1 x x 4 2 Q 2 B 5 B 1 x 1 B 3 Knot Point Q 1 : B 1, B 2, B 3, B 4, x 1 t x 2 Q Control Point 2 : B 2, B 3, B 4, B 5, x 2 t x 3 [ x 1, x 2, x 3, x 4 ] Knot Vector CS475/CS675 - Lecture 11 3

The B-Spline Curve of order k (degree, k-1)is given by: n 1 P t = i=1 B i B i N i,k t with t min t t max and 2 k n 1 - position vectors of the n+1 vertices of the control polygon N i, k - normalized B-spline basis functions N i,1 ={ 1, if x t x i i 1 0, otherwise N i, k t = t x N t i i, k 1 x t N t i k i 1, k 1 x i k 1 x i x i k x i 1 Cox-deBoor Basis recursive formula CS475/CS675 - Lecture 11 4

Properties: The function P(t) is a polynomial of degree k-1 on each interval i.e., A 4 th -order B-spline curve is a piecewise cubic curve. P(t) and its derivatives of order 1 to k-2 are all continuous over the entire curve. Positivity N i, k t 0 t n 1 i=1 Partition of Unity N i,k t =1for any t and k x i t x i 1 CS475/CS675 - Lecture 11 5

Strong Convex Hull Property: For a B-spline curve of order k (degree k-1), a point on the curve lies within the convex hull of k neighbouring control points. For k=2 CS475/CS675 - Lecture 11 6

Strong Convex Hull Property: For a B-spline curve of order k (degree k-1), a point on the curve lies within the convex hull of k neighbouring control points. For k=3 CS475/CS675 - Lecture 11 7

Strong Convex Hull Property: For a B-spline curve of order k (degree k-1), a point on the curve lies within the convex hull of k neighbouring control points. For k=3 CS475/CS675 - Lecture 11 8

Strong Convex Hull Property: For a B-spline curve of order k (degree k-1), a point on the curve lies within the convex hull of k neighbouring control points. For k=3 CS475/CS675 - Lecture 11 9

Strong Convex Hull Property: For a B-spline curve of order k (degree k-1), a point on the curve lies within the convex hull of k neighbouring control points. For k=3 CS475/CS675 - Lecture 11 10

Strong Convex Hull Property: For a B-spline curve of order k (degree k-1), a point on the curve lies within the convex hull of k neighbouring control points. For k=4 CS475/CS675 - Lecture 11 11

Strong Convex Hull Property: For a B-spline curve of order k (degree k-1), a point on the curve lies within the convex hull of k neighbouring control points. For k=9 CS475/CS675 - Lecture 11 12

Strong Convex Hull Property: For a B-spline curve of order k (degree k-1), a point on the curve lies within the convex hull of k neighbouring control points. If all vertices of the control polygon are collinear then the B-spline curve is a straight line. If at least k-1 coincident vertices of the defining polygon occur, i.e., B i =B i+1 =...=B i+k-2, then the convex hull of these vertices is the vertex itself and so the resulting curve must pass through this vertex. CS475/CS675 - Lecture 11 13

Knot Vectors and Basis ={ functions N 1,if x i t x i 1 i,1 0, otherwise N i, k t = t x N t i i, k 1 x i k 1 x i The x i 's are the knot values with, x i x i 1 Cox-deBoor recursive formula x i k t N i 1, k 1 t x i k x i 1 The basis function N i, k t is zero outside the knot span x i x i k Total number of knot values is n 1 k,where n 1is the number of vertices of the control polygon and k is the order of the b-spline curve. For e.g., n 1=4, k=3 N 1,3 x 1,, x 4 [ x 1, x 2, x 3, x 4, x 5, x 6, x 7 ] N 4,3 x 4,, x 7 CS475/CS675 - Lecture 11 14

Types of Knot Vectors Uniform (or periodic) knot vector : Individual knot values are evenly spaced. For e.g., [1,2,3,4] [ 0.2, 0.1, 0.0, 0.1, 0.2] [0.0,0.25,0.50,0.75,1.0] k For a given order, uniform knot vectors yield periodic uniform basis functions for which N i, k t =N i 1, k t 1 =N i 1, k t 1 CS475/CS675 - Lecture 11 15

Types of Knot Vectors Uniform (or periodic) knot vector : Individual knot values are evenly spaced. For a given order k, uniform knot vectors yield periodic uniform basis functions for which: N i, k t =N i 1, k t 1 =N i 1, k t 1 Thus each basis function is a translate of the other. Mathematical Elements for Computer Graphics, 4ed., D. F. Rogers and J. A. Adams CS475/CS675 - Lecture 11 16

Types of Knot Vectors Open uniform knot vector : this has a multiplicity of knot values at the ends of the knot vector equal to the order k of the b-spline basis function. Internal knot values are evenly spaced. For e.g., [0, 0,1,2,3,4,4] for k=2 [0, 0,1/4,1/2, 3/ 4,1,1] for k=2 Formally, x i ={0, i k, n k 2, 1 i k k 1 i n 1 n 2 i n k 1 CS475/CS675 - Lecture 11 17

Types of Knot Vectors Open uniform knot vector : this has a multiplicity of knot values at the ends of the knot vector equal to the order k of the b-spline basis function. Internal knot values are evenly spaced. 1 i k Formally, x i ={0, i k, k 1 i n 1 n k 2, n 2 i n k 1 N 1,4 N 2,4 N 3,4 N 4,4 The basis functions look as shown [ X ]=[0.0 0.0 0.0 0.0 1.01.0 1.0 1.0] for k=4, n 1=4 Looks familiar? CS475/CS675 - Lecture 11 18

Types of Knot Vectors Open uniform knot vector : this has a multiplicity of knot values at the ends of the knot vector equal to the order k of the b-spline basis function. Internal knot values are evenly spaced. 1 i k Formally, x i ={0, i k, k 1 i n 1 n k 2, n 2 i n k 1 N 1,4 N 2,4 N 3,4 N 4,4 The basis functions look as shown [ X ]=[0.0 0.0 0.0 0.0 1.01.0 1.0 1.0] for k=4, n 1=4 The B-spline basis reduces to the Bernstien basis when k=n 1and an open uniform knot vector is CS475/CS675 - Lecture 11 19 used.

Types of Knot Vectors Non-uniform knot vector : this has a unequally spaced and/or multiple internal knot values. They may be periodic or open. For e.g., [0 0 0112 2 2],[0, 0.28, 0.5, 0.72,1] Mathematical Elements for Computer Graphics, 4ed., D. F. Rogers and J. A. Adams CS475/CS675 - Lecture 11 20

Buildup of b-spline basis functions N i, k N i, k 1 N i 1, k 1 N i, k 2 N i 1, k 2 N i 2, k 2 N i,1 N i 1,1 N i 2,1 N i 3,1 N i k 1,1 CS475/CS675 - Lecture 11 21

Buildup of b-spline basis functions N i k 1, k N i k 1, k N i,k N i 1, k N i k 1, k N i 1,2 N i,2 N i 1,2 N i,1 CS475/CS675 - Lecture 11 22

Buildup of b-spline basis functions 1 N 1,1 N 2,1 N 3,1 N 4,1 N 5,1 N 6,1 n 1=4 k=1 0 1 0 1 1 2 3 4 5 6 N 1,2 N 2,2 N 3,2 N 4,2 N 5,2 1 2 3 4 5 6 N 1,3 N 2,3 N 3,3 N 4,3 k=2 k=3 0 1 2 3 4 5 6 CS475/CS675 - Lecture 11 23

Properties Strong Convex Hull Property Curve follows shape of control polygon Maximum order = number of control points Invariance to affine transformation Variation diminishing property CS475/CS675 - Lecture 11 24

Controlling the B-Spline Knot Vector (uniform, open, non-uniform) Order of the curve Number and position of control points CS475/CS675 - Lecture 11 25

Order of the b-spline curve Open uniform knot vector B 2 B 4 k=2 k=3 k=4 B 3 B 1 CS475/CS675 - Lecture 11 26

Multiplicity of control points Open uniform knot vector, k=4 Control Polygon B 1, B 2, B 3, B 4 B 2 B 4 k=4 B 3 B 1 CS475/CS675 - Lecture 11 27

Multiplicity of control points Open uniform knot vector, k=4 Control Polygon B 1, B 2, B 2, B 3, B 4 B 2 B 2 B 4 k=4 B 3 B 1 CS475/CS675 - Lecture 11 28

Multiplicity of control points Open uniform knot vector, k=4 [0 0 0 01111] [0 0 0 012 22 2] [0 0 0 012 3333] Control Polygon B 1, B 2, B 2, B 2, B 3, B 4 B 2 B 2 B 2 B 4 B 3 B 1 CS475/CS675 - Lecture 11 29

Moving a control point Mathematical Elements for Computer Graphics, 4ed., D. F. Rogers and J. A. Adams To get a closed curve, repeat k-2 polygon vertices at the beginning or at the end CS475/CS675 - Lecture 11 30

Curve Fitting or Interpolating B-splines Find a B-spline passing through D 1, D 2,...D j D 1 t 1 =N 1, k t 1 B 1 N 2, k t 1 B 2 N i, k t 1 B i D 2 t 2 =N 1, k t 2 B 1 N 2, k t 2 B 2 N i,k t 2 B i = D j t j =N 1, k t j B 1 N 2, k t j B 2 N i,k t j B i where 2 k n 1 j CS475/CS675 - Lecture 11 31

Curve Fitting or Interpolating B-splines Find a B-spline passing through D 1, D 2,...D j D=N. B D=[ D 1 t 1 D 2 t 2 D j t j ] T B=[ B 1 B 2 B i ] T N=[N 1, k t 1 N i,k t 1 N 1, k t j N i,k t j ] CS475/CS675 - Lecture 11 32

Curve Fitting or Interpolating B-splines Find a B-spline passing through D 1, D 2,...D j t 1 =0, B=N 1. D if 2 k n 1= j B=[ N T N] 1 N T. D if 2 k n 1 j t l t max = l D s D s 1 s=2 j s=2 D s D s 1 for l 2 t max is the last (and maximum) value in the knot vector CS475/CS675 - Lecture 11 33

Rational n 1 P h t = i=1 P t = n 1 i=1 n 1 i=1 B i h N i, k t B i h i N i,k t h i N i,k t n 1 = i=1 Question: What can rational curves do for us that polynomial curves cannot? B i R i,k t R i,k t = n 1 i=1 h i N i,k t h i N i, k t Non-uniform knot vector + Rational B-splines = NURBS CS475/CS675 - Lecture 11 34