(Spline, Bezier, B-Spline)

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.

08 - Designing Approximating Curves

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

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

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

2D Spline Curves. CS 4620 Lecture 13

Design considerations

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

Information Coding / Computer Graphics, ISY, LiTH. Splines

3D Modeling Parametric Curves & Surfaces

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

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

Rational Bezier Curves

Bezier Curves, B-Splines, NURBS

Curves and Surfaces 1

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

Lecture IV Bézier Curves

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

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

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

Need for Parametric Equations

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

2D Spline Curves. CS 4620 Lecture 18

Parametric curves. Brian Curless CSE 457 Spring 2016

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

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

An Introduction to B-Spline Curves

Intro to Modeling Modeling in 3D

Computer Graphics Curves and Surfaces. Matthias Teschner

Introduction to Computer Graphics

Computer Graphics Spline and Surfaces

Central issues in modelling

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

Intro to Curves Week 1, Lecture 2

Rational Bezier Surface

Intro to Curves Week 4, Lecture 7

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

Figure 5.1: Spline and ducks.

The Free-form Surface Modelling System

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

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

ECE 600, Dr. Farag, Summer 09

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

Curve Construction via Local Fitting

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

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

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

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. Shireen Elhabian and Aly A. Farag University of Louisville

Cubic spline interpolation

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Computer Graphics Splines and Curves

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

Computer Graphics. Unit VI: Curves And Fractals. By Vaishali Kolhe

Computergrafik. Matthias Zwicker. Herbst 2010

Most shapes are simply too complicated to dene using a single Bezier curve. A spline curve is

Curves and Surfaces Computer Graphics I Lecture 9

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

CSC 305 More Modelling

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

Objects 2: Curves & Splines Christian Miller CS Fall 2011

Splines. Connecting the Dots

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

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

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

Curves. Computer Graphics CSE 167 Lecture 11

Dgp _ lecture 2. Curves

Freeform Curves on Spheres of Arbitrary Dimension

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

Properties of Blending Functions

CS3621 Midterm Solution (Fall 2005) 150 points

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

Spline Methods Draft. Tom Lyche and Knut Mørken

Spline Methods Draft. Tom Lyche and Knut Mørken

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

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg

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

Important Properties of B-spline Basis Functions

Sung-Eui Yoon ( 윤성의 )

MA 323 Geometric Modelling Course Notes: Day 14 Properties of Bezier Curves

A Practical Review of Uniform B-Splines

Subdivision Curves and Surfaces: An Introduction

An introduction to interpolation and splines

B-spline Curves. Smoother than other curve forms

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

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

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

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

Interactive Graphics Using Parametric Equations (Day 2)

Parametric Surfaces. Michael Kazhdan ( /657) HB , FvDFH 11.2

Review of Tuesday. ECS 175 Chapter 3: Object Representation

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

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

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

B-Splines and NURBS Week 5, Lecture 9

TO DUY ANH SHIP CALCULATION

Natural Numbers and Integers. Big Ideas in Numerical Methods. Overflow. Real Numbers 29/07/2011. Taking some ideas from NM course a little further

Keyword: Quadratic Bézier Curve, Bisection Algorithm, Biarc, Biarc Method, Hausdorff Distances, Tolerance Band.

Curves and Surfaces Computer Graphics I Lecture 10

Subdivision Surfaces

Transcription:

(Spline, Bezier, B-Spline)

Spline Drafting terminology Spline is a flexible strip that is easily flexed to pass through a series of design points (control points) to produce a smooth curve. Spline curve a piecewise polynomial (cubic) curve whose first and second derivatives are continuous across the various curve sections.

Bezier curve Developed by Paul de Casteljau (1959) and independently by Pierre Bezier (1962). French automobil company Citroen & Renault. P 1 P 2 P 0 P 3

Parametric function n P(u) = B n,i (u)p i i=0 Where B n,i (u) =. n!. u i (1-u) n-i i!(n-i)! 0<= u<= 1 For 3 control points, n = 2 P(u) = (1-u) 2 p 0 + 2u(1-u) p 1 + u 2 p 2 For four control points, n = 3 P(u) = (1-u) 3 p 0 + 3u(1-u) 2 p 1 + 3u 2 (1-u)p 2 + u 3 p 3

algorithm De Casteljau Basic concept To choose a point C in line segment AB such that C divides the line segment AB in a ratio of u: 1-u A C B P 0 10 P 1 20 11 00 01 21 P 2 Let u = 0.5 u=0.25 u=0.75

properties The curve passes through the first, P 0 and last vertex points, P n. The tangent vector at the starting point P 0 must be given by P 1 P 0 and the tangent P n given by P n P n-1 This requirement is generalized for higher derivatives at the curve s end points. E.g 2nd derivative at P 0 can be determined by P 0,P 1,P 2 (to satisfy continuity) The same curve is generated when the order of the control points is reversed

Properties (continued) Convex hull Convex polygon formed by connecting the control points of the curve. Curve resides completely inside its convex hull

B-Spline Motivation (recall bezier curve) The degree of a Bezier Curve is determined by the number of control points E. g. (bezier curve degree 11) difficult to bend the "neck" toward the line segment P 4 P 5. Of course, we can add more control points. BUT this will increase the degree of the curve increase computational burden

B-Spline Motivation (recall bezier curve) Joint many bezier curves of lower degree together (right figure) BUT maintaining continuity in the derivatives of the desired order at the connection point is not easy or may be tedious and undesirable.

B-Spline Motivation (recall bezier curve) moving a control point affects the shape of the entire curve- (global modification property) undesirable. - Thus, the solution is B-Spline the degree of the curve is independent of the number of control points - E.g - right figure a B-spline curve of degree 3 defined by 8 control points

B-Spline In fact, there are five Bézier curve segments of degree 3 joining together to form the B-spline curve defined by the control points little dots subdivide the B-spline curve into Bézier curve segments. Subdividing the curve directly is difficult to do so, subdivide the domain of the curve by points called knots 0 u 1

B-Spline In summary, to design a B-spline curve, we need a set of control points, a set of knots and a degree of curve.

B-Spline curve n P(u) = N i,k (u)p i (u 0 < u < u m ).. (1.0) i=0 Where basis function = N i,k (u) Degree of curve k-1 Control points, p i 0 < i < n Knot, u u 0 < u < u m m = n + k

B-Spline : definition P(u) = N i,k (u)p i (u 0 < u < u m ) u i knot [u i, u i+1 ) knot span (u 0, u 1, u 2,. u m ) knot vector The point on the curve that corresponds to a knot u i, knot point,p(u i ) If knots are equally space uniform (e.g, 0, 0.2, 0.4, 0.6 ) Otherwise non uniform (e.g: 0, 0.1, 0.3, 0.4, 0.8 )

B-Spline : definition Uniform knot vector Individual knot value is evenly spaced (0, 1, 2, 3, 4) Then, normalized to the range [0, 1] (0, 0.25, 0.5, 0.75, 1.0)

Type of B-Spline uniform knot vector Non-periodic knots (open knots) -First and last knots are duplicated k times. -E.g (0,0,0,1,2,2,2) -Curve pass through the first and last control points Periodic knots (non-open knots) -First and last knots are not duplicated same contribution. -E.g (0, 1, 2, 3) -Curve doesn t pass through end points. - used to generate closed curves (when first = last control points)

Type of B-Spline knot vector Non-periodic knots (open knots) Periodic knots (non-open knots) (Closed knots)

Non-periodic (open) uniform B-Spline The knot spacing is evenly spaced except at the ends where knot values are repeated k times. n E.g P(u) = N i,k (u)p i (u 0 < u < u m ) i=0 Degree = k-1, number of control points = n + 1 Number of knots = m + 1 @ n+ k + 1 for degree = 1 and number of control points = 4 (k = 2, n = 3) Number of knots = n + k + 1 = 6 non periodic uniform knot vector (0,0,1,2,3, 3) * Knot value between 0 and 3 are equally spaced uniform

Non-periodic (open) uniform B-Spline Example For curve degree = 3, number of control points = 5 k = 4, n = 4 number of knots = n+k+1 = 9 non periodic knots vector = (0,0,0,0,1,2,2,2) For curve degree = 1, number of control points = 5 k = 2, n = 4 number of knots = n + k + 1 = 7 non periodic uniform knots vector = (0, 0, 1, 2, 3, 4, 4)

Non-periodic (open) uniform B-Spline For any value of parameters k and n, non periodic knots are determined from 0 0 i < k u i = i k + 1 k i n n k + 2 n < i n+k (1.3) e.g k=2, n = 3 u i = 0 0 i < 2 i 2 + 1 2 i 3 3 2 + 2 3 < i 5 u = (0, 0, 1, 2, 3, 3)

B-Spline basis function N i, k u u u i u N i, k 1 i k 1 u u i u i k u N u i 1, k 1 i k u u i 1 (1.1) 2 N i,1 1 u u u i i 1 0 Otherwise selainnya. 3 (1.2) In equation (1.1), the denominators can have a value of zero, 0/0 is presumed to be zero. If the degree is zero basis function N i,1 (u) is 1 if u is in the i-th knot span [u i, u i+1 ).

B-Spline basis function For example, if we have four knots u 0 = 0, u 1 = 1, u 2 = 2 and u 3 = 3, knot spans 0, 1 and 2 are [0,1), [1,2), [2,3) the basis functions of degree 0 are N 0,1 (u) = 1 on [0,1) and 0 elsewhere, N 1,1 (u) = 1 on [1,2) and 0 elsewhere, and N 2,1 (u) = 1 on [2,3) and 0 elsewhere. This is shown below

B-Spline basis function To understand the way of computing N i,p (u) for p greater than 0, we use the triangular computation scheme

Non-periodic (open) uniform B-Spline Example Find the knot values of a non periodic uniform B-Spline which has degree = 2 and 3 control points. Then, find the equation of B-Spline curve in polynomial form.

Non-periodic (open) uniform B-Spline Answer Degree = k-1 = 2 k=3 Control points = n + 1 = 3 n=2 Number of knot = n + k + 1 = 6 Knot values u 0 =0, u 1 =0, u 2 =0, u 3 =1,u 4 =1,u 5 = 1

Non-periodic (open) uniform B-Spline Answer(cont) To obtain the polynomial equation, n P(u) = N i,k (u)p i=0 i 2 = N i,3 (u)p i i=0 = N 0,3 (u)p 0 + N 1,3 (u)p 1 + N 2,3 (u)p 2 firstly, find the N i,k (u) using the knot value that shown above, start from k =1 to k=3

Non-periodic (open) uniform B-Spline Answer (cont) For k = 1, find N i,1 (u) use equation (1.2): N 0,1 (u) = 1 u 0 u u 1 ; (u=0) 0 otherwise N 1,1 (u) = 1 u 1 u u 2 ; (u=0) 0 otherwise N 2,1 (u) = 1 u 2 u u 3 ; (0 u 1) 0 otherwise N 3,1 (u) = 1 u 3 u u 4 ; (u=1) 0 otherwise N 4,1 (u) = 1 u 4 u u 5 ; (u=1) 0 otherwise

Non-periodic (open) uniform B-Spline Answer (cont) For k = 2, find N i,2 (u) use equation (1.1): N i, k 1 u N i N u u u u u i, k i i k u u u i k 1 i 1, k 1 u N 0,2 (u) = u - u 0 N 0,1 + u 2 u N 1,1 (u 0 =u 1 =u 2 = 0) i k u i 1 2 u 1 - u 0 u 2 u 1 = u 0 N 0,1 + 0 u N 1,1 = 0 0 0 0 0 N 1,2 (u) = u - u 1 N 1,1 + u 3 u N 2,1 (u 1 =u 2 = 0, u 3 = 1) u 2 - u 1 u 3 u 2 = u 0 N 1,1 + 1 u N 2,1 = 1 - u 0 0 1 0

Non-periodic (open) uniform B-Spline Answer (cont) N 2,2 (u) = u u 2 N 2,1 + u 4 u N 3,1 (u 2 =0, u 3 =u 4 = 1) u 3 u 2 u 4 u 3 = u 0 N 2,1 + 1 u N 3,1 = u 1 0 1 1 N 3,2 (u) = u u 3 N 3,1 + u 5 u N 4,1 (u 3 =u 4 = u 5 = 1) u 4 u 3 u 5 u 4 = u 1 N 3,1 + 1 u N 4,1 = 0 1 1 1 1

Non-periodic (open) uniform B-Spline Answer (cont) For k = 2 N 0,2 (u) = 0 N 1,2 (u) = 1 - u N 2,2 (u) = u N 3,2 (u) = 0

Non-periodic (open) uniform B-Spline Answer (cont) For k = 3, find N i,3 (u) use equation (1.1): N i, k 1 u N i N u u u u u i, k i i k u u u i k 1 N 0,3 (u) = u - u 0 N 0,2 + u 3 u N 1,2 (u 0 =u 1 =u 2 = 0, u 3 =1 ) u 2 - u 0 u 3 u 1 = u 0 N 0,2 + 1 u N 1,2 = (1-u)(1-u) = (1- u) 2 0 0 1 0 N 1,3 (u) = u - u 1 N 1,2 + u 4 u N 2,2 (u 1 =u 2 = 0, u 3 = u 4 = 1) u 3 - u 1 u 4 u 2 = u 0 N 1,2 + 1 u N 2,2 = u(1 u) +(1-u)u = 2u(1-u) 1 0 1 0 i i k 1, k 1 u u i 1 2

Non-periodic (open) uniform B-Spline Answer (cont) N 2,3 (u) = u u 2 N 2,2 + u 5 u N 3,2 (u 2 =0, u 3 =u 4 = u 5 =1) u 4 u 2 u 5 u 3 = u 0 N 2,2 + 1 u N 3,2 = u 2 1 0 1 1 N 0,3 (u) =(1- u) 2, N 1,3 (u) = 2u(1-u), N 2,3 (u) = u 2 The polynomial equation, P(u) = N i,k (u)p i P(u) = N 0,3 (u)p 0 + N 1,3 (u)p 1 + N 2,3 (u)p 2 = (1- u) 2 p 0 + 2u(1-u) p 1 + u 2 p 2 (0 <= u <= 1) n i=0

Non-periodic (open) uniform B- Exercise Spline Find the polynomial equation for curve with degree = 1 and number of control points = 4

Non-periodic (open) uniform B-Spline Answer k = 2, n = 3 number of knots = 6 Knot vector = (0, 0, 1, 2, 3, 3) For k = 1, find N i,1 (u) use equation (1.2): N 0,1 (u) = 1 u 0 u u 1 ; (u=0) N 1,1 (u) = 1 u 1 u u 2 ; (0 u 1) N 2,1 (u) = 1 u 2 u u 3 ; (1 u 2) N 3,1 (u) = 1 u 3 u u 4 ; (2 u 3) N 4,1 (u) = 1 u 4 u u 5 ; (u=3)

Answer (cont) For k = 2, find N i,2 (u) use equation (1.1): N 0,2 (u) = u - u 0 N 0,1 + u 2 u N 1,1 (u 0 =u 1 =0, u 2 = 1) u 1 - u 0 u 2 u 1 = u 0 N 0,1 + 1 u N 1,1 0 0 1 0 = 1 u (0 u 1) Non-periodic (open) uniform B-Spline 2 1 1 1, 1 1,, i k i k i k i i k i k i i k i u u u N u u u u u N u u u N

Non-periodic (open) uniform B-Spline Answer (cont) For k = 2, find N i,2 (u) use equation (1.1): N i, k 1 u N i N u u u u u i, k i i k u u u i k 1 N 1,2 (u) = u - u 1 N 1,1 + u 3 u N 2,1 (u 1 =0, u 2 =1, u 3 = 2) u 2 - u 1 u 3 u 2 = u 0 N 1,1 + 2 u N 2,1 1 0 2 1 N 1,2 (u) = u (0 u 1) N 1,2 (u) = 2 u (1 u 2) i i k 1, k 1 u u i 1 2

Non-periodic (open) uniform B-Spline Answer (cont) N 2,2 (u) = u u 2 N 2,1 + u 4 u N 3,1 (u 2 =1, u 3 =2,u 4 = 3) u 3 u 2 u 4 u 3 = u 1 N 2,1 + 3 u N 3,1 = 2 1 3 2 N 2,2 (u) = u 1 (1 u 2) N 2,2 (u) = 3 u (2 u 3)

Non-periodic (open) uniform B-Spline Answer (cont) N 3,2 (u) = u u 3 N 3,1 + u 5 u N 4,1 (u 3 = 2, u 4 = 3, u 5 = 3) u 4 u 3 u 5 u 4 = u 2 N 3,1 + 3 u N 4,1 = 3 2 3 3 = u 2 (2 u 3)

Non-periodic (open) uniform B-Spline Answer (cont) The polynomial equation P(u) = N i,k (u)p i P(u) = N 0,2 (u)p 0 + N 1,2 (u)p 1 + N 2,2 (u)p 2 + N 3,2 (u)p 3 P(u) = (1 u) p 0 + u p 1 (0 u 1) P(u) = (2 u) p 1 + (u 1) p 2 (1 u 2) P(u) = (3 u) p 2 + (u - 2) p 3 (2 u 3)

Periodic uniform knot Periodic knots are determined from U i = i - k (0 i n+k) Example For curve with degree = 3 and number of control points = 4 (cubic B-spline) (k = 4, n = 3) number of knots = 8 (0, 1, 2, 3, 4, 5, 6, 8)

Periodic uniform knot Normalize u (0<= u <= 1) N 0,4 (u) = 1/6 (1-u) 3 N 1,4 (u) = 1/6 (3u 3 6u 2 +4) N 2,4 (u) = 1/6 (-3u 3 + 3u 2 + 3u +1) N 3,4 (u) = 1/6 u 3 P(u) = N 0,4 (u)p 0 + N 1,4 (u)p 1 + N 2,4 (u)p 2 + N 3,4 (u)p 3

Periodic uniform knot In matrix form P(u) = [u 3,u 2, u, 1].M n. M n = 1/6-1 3-3 1 3-6 3 0-3 0 3 0 1 4 1 0 P 0 P 1 P 2 P 3

Periodic uniform knot P 0

Example k = 4, n = 5 Closed periodic P 2 P 1 P 3 P 0 P 4 P 5

Equation 1.0 change to N i,k (u) = N 0,k ((u-i)mod(n+1)) n Closed periodic P(u) = N 0,k ((u-i)mod(n+1))p i i=0 0<= u <= n+1

Properties of B-Spline 1. The m degree B-Spline function are piecewise polynomials of degree m have C m-1 continuity. e.g B-Spline degree 3 have C 2 continuity. u=2 u=1

Properties of B-Spline In general, the lower the degree, the closer a B-spline curve follows its control polyline. Degree = 7 Degree = 5 Degree = 3

Properties of B-Spline Equality m = n + k must be satisfied Number of knots = m + 1 k cannot exceed the number of control points, n+ 1

Properties of B-Spline 2. Each curve segment is affected by k control points as shown by past examples. e.g k = 3, P(u) = N i-1,k p i-1 + N i,k p i + N i+1,k p i+1

Properties of B-Spline Local Modification Scheme: changing the position of control point P i only affects the curve C(u) on interval [u i, u i+k ). Modify control point P 2

Properties of B-Spline 3. Strong Convex Hull Property: A B-spline curve is contained in the convex hull of its control polyline. More specifically, if u is in knot span [u i,u i+1 ), then C(u) is in the convex hull of control points P i-p, P i-p+1,..., P i. Degree = 3, k = 4 Convex hull based on 4 control points

Properties of B-Spline 4. Non-periodic B-spline curve C(u) passes through the two end control points P 0 and P n. 5. Each B-spline function Nk,m(t) is nonnegative for every t, and the family of such functions n sums to unity, that is N i,k (u) = 1 6. Affine Invariance to transform a B-Spline curve, we simply transform each control points. 7. Bézier Curves Are Special Cases of B-spline Curves i=0

Properties of B-Spline 8. Variation Diminishing : A B-Spline curve does not pass through any line more times than does its control polyline

Knot Insertion : B-Spline knot insertion is adding a new knot into the existing knot vector without changing the shape of the curve. new knot may be equal to an existing knot the multiplicity of that knot is increased by one Since, number of knots = k + n + 1 If the number of knots is increased by 1 either degree or number of control points must also be increased by 1. Maintain the curve shape maintain degree change the number of control points.

Knot Insertion : B-Spline So, inserting a new knot causes a new control point to be added. In fact, some existing control points are removed and replaced with new ones by corner cutting Insert knot u = 0.5

Single knot insertion : B-Spline Given n+1 control points P 0, P 1,.. P n Knot vector, U= (u 0, u 1, u m ) Degree = p, order, k = p+1 Insert a new knot t into knot vector without changing the shape. find the knot span that contains the new knot. Let say [u k, u k+1 )

Single knot insertion : B-Spline This insertion will affected to k (degree + 1) control points (refer to B-Spline properties) P k, P k-1, P k-1, P k-p Find p new control points Q k on leg P k-1 P k, Q k-1 on leg P k- 2 P k-1,..., and Q k-p+1 on leg P k-p P k-p+1 such that the old polyline between P k-p and P k (in black below) is replaced by P k-p Q k-p+1...q k P k (in orange below) P k-2 P k-1 Q k-1 Q k P k P k-p+1 Q k-p+1 P k-p

Single knot insertion : B-Spline All other control points are not change The formula for computing the new control point Q i on leg P i-1 P i is the following Q i = (1-a i )P i-1 + a i P i a i = t- u i k-p+1<= i <= k u i+p -u i

Single knot insertion : B-Spline Example Suppose we have a B-spline curve of degree 3 with a knot vector as follows: u 0 to u 3 u 4 u 5 u 6 u 7 u 8 to u 11 0 0.2 0.4 0.6 0.8 1 Insert a new knot t = 0.5, find new control points and new knot vector?

Single knot insertion : B-Spline Solution: - t = 0.5 lies in knot span [u 5, u 6 ) - the affected control points are P 5, P 4, P 3 and P 2 - find the 3 new control points Q 5, Q 4, Q 3 - we need to compute a 5, a 4 and a 3 as follows - a 5 = t - u 5 = 0.5 0.4 = 1/6 u 8 -u 5 1 0.4 - a 4 = t - u 4 = 0.5 0.2 = 1/2 u 7 u 4 0.8 0.2 - a 3 = t - u 3 = 0.5 0 = 5/6 u 6 -u 3 0.6 0

Single knot insertion : B-Spline Solution (cont) The three new control points are Q 5 = (1-a 5 )P 4 + a 5 P 5 = (1-1/6)P 4 + 1/6P 5 Q 4 = (1-a 4 )P 3 + a 4 P 4 = (1-1/6)P 3 + 1/6P 4 Q 3 = (1-a 3 )P 2 + a 3 P 3 = (1-5/6)P 2 + 5/6P 3

Single knot insertion : B-Spline Solution (cont) The new control points are P 0, P 1, P 2, Q 3, Q 4, Q 5, P 5, P 6, P 7 the new knot vector is u 0 to u 3 u 4 u 5 u 6 u 7 u 8 u 9 to u 12 0 0.2 0.4 0.5 0.6 0.8 1