You are on page 1of 14

# AML710 CAD LECTURE 14

SPACE CURVES

Curves and their applications in
design
B spline curves

The B-Spline
Two Major Limitations of the Bezier Curves
1. Dependence on the number of defining
polygon vertices
– Hence the degree of the basis function is fixed by
this
– To increase or decrease the order we need to
increase or decrease the no. of polygon vertices
2. No local control – only global control

P (t ) = (1 − t ) 3 B0 + 3t (1 − t ) 2 B1 + (1 − t ) B2 + t 3 B3

1

k (t ) t min ≤ t ≤ t max 2 ≤ k ≤ n +1 i =1 – k=degree • Can be 2 to the number of control points – If k set to 1.k blending functions Polynomials of degree k-1at each interval xi≤ t≤xi+1 2 . B-Spline • How it is like the bezier – Approximates control points – Possesses Convex Hull Property • How it differs – Degree of polynomial is for the most part independent of the control points – Local control over spline shape • Local contorl acheieved by defining blending functions over subintervals of the total range of t – Stronger Convex Hull Property • More complex than Bezier • Generally non-global Description of B-Spline n +1 P(t ) = Bi N i . then only a plot of the control points • Bi is the input set of n+1 control points (polygon vertices) • Parameter t now depends on how we choose the other parameters (no longer locked to 0-1) • N i.

.1 3 . .. B-Spline blending functions defined by Cox-deBoor recursion formula 1 if xi ≤ t ≤ xi +1 N i .e the influence of a first order basis function Ni. 2 N i ..1 N i +3.. N i −1.k N i +1.. .k . 2 N i ..1 .k N i .k −1 N i . N i + k −1.1 N i +1.k (t ) = + xi + k −1 − xi xi + k − xi +1 Dependence of basis function in Cox-deBoor recursion formula A basis function of given order k depends on lower order functions down to order 1. N i .k N i ..1 (t ) = 0 otherwise and (t − xi ) N i . .... N i .k − 2 N i +1.k −2 N i + 2 .k −1 (t ) ( xi + k − t ) N i +1..1 on higher order basis functions is given by N i −k +1. N i + k −1..k − 2 ..k −1 N i +1...k −1 (t ) N i .k .k . N i −1. ...1 The inverse dependence I.1 N i + 2 .. 2 N i +1.

Knots and Knot vectors of B-splines • Knot – Each subinterval endpoint xi – Knot Vector • Entire set of selected subinterval endpoints • Choose any values for subinterval endpoints – Only condition is xi ≤ xi +1 • It is possible to choose a knot vector such that the Cox-deBoor denominator is 0 – Then assume 0/0 = 0 Cubic B-Spline 4 .

k (t ) ≡ 1 i =1 5 . xn+k} – B-spline curve defined only in the interval from knot value xk-1 up to knot value xn+1 • Each section of B-spline curve between 2 successive knot values is influenced by k control points • Any control point can affect the shape of at most k sections B-Spline properties (Contd. x1. B-Spline properties • Degree k-1 and Ck-2 continuity over range of n+1 control points – Described with n+1 blending functions • Each blending function Ni. ….k defined over k subintervals of the total range of x. starting at knot value xk • Range of x divided into n+k subintervals by the n+k+1 values specified in the knot vector – Knot values labeled as {x0.) • Local control • Varying the number of control points without varying the degree of the polynomial • Increase number of values in knot vector to aid in curve design • Adding knots to knot vector – Must add control points • Size of knot vector is n+k+1 – n depends on the number of control points n +1 N i .

22) Uniform Periodic B-spline curve • Spacing between knot values is constant • Periodic – has periodic blending functions • Given values n&k.5 0.6.k(t) = Ni+1.2.k (t ) = + xi + k −1 − xi xi + k − xi +1 6 . Classes of knot vectors • Uniform – Spacing between knot values is constant • Eg (0.1.k(t + 1) = Ni-1.75 1.0.k −1 (t ) ( xi + k − t ) N i +1.5.k(t -1) – 1 is the interval between knots (t − xi ) N i .3.k −1 (t ) N i .0) (Normalized) • Open Uniform – Have repeating values in knot vector • Eg (0. all blending functions have the same shape – Each successive blending function is a shifted version of the previous • Ni.1.0.0.8.1) • Non-uniform – Spacing between knot values is non-constant • Eg (01.7.25 0.4.7) • (0 0.4.3.1.1.

N 2.3 2 7 .2 (t) = 0 i ≠ 1. N i.1 (t) = 1.4 • Here N+1=4 • Calculating knot vector: Calculation of N6.) 1≤ t ≤ 2 N 2. i.2.3 (t) = (2 − t ) + (t − 1). N i. [X]=[0 1 2 3 4 5 6 ] 0 ≤ t ≤1 N1.3 (t) = 0 i ≠1 2 Uniform Periodic basis (contd. 2 2 (t .e.2.3(t).1) 2 N 2.2 (t) = (t − 1).1 (t) = 0 i ≠1 N1. N i.2 (t) = (2 − t ). N i. N i.1requires x6 and x7 while N1.i=1.3 (t) = . N i.2 (t) = t .2 t 3−t N1.2 (t) = 0 i ≠1 t2 N1.1 (t) = 0 i≠2 N1. in all we need n+k+1 knot values.1 (t) = 1.3 (t) = . Calculating Uniform Periodic functions • Calculate 4 third order (k=3) basis functions Ni.3.3 (t) = 0 i ≠ 1.1requires x1 and x2 Therefore.

2 (t) = (3 − t ).) 3≤ t ≤ 4 N 4.2 (t) = (t − 3). N i.3.2 (t) = 0 i ≠ 3.2) N 2.1 (t) = 1.2 (t) = (4 − t ). N i. Uniform Periodic basis (contd.4 (4 − t ) 2 N 2.3 (t) = N i. N i.3 (t) = + . N 3.1 (t) = 0 i≠3 N 2.t)(t .2.t) (4 .3 (t) = .) 2≤t≤3 N 3.3 (t) = 0 i ≠ 2.3) N 3.3 (t) = + .2 (t) = (t − 2).3 2 Uniform Periodic basis (contd. N i.4 2 8 .3 (3 − t )2 N1.3 (t) = 0 i ≠ 1.1 (t) = 1. 2 2 (t − 2) 2 N 3. 2 2 (t − 3) 2 N 4. 2 (t .3 (t) = . 2 (t .t) (5 .2)(4 .2 (t) = 0 i ≠ 2.1)(3 . N 4.t)(t .1 (t) = 0 i≠4 N 3.3 (t) = N i.

4) N 4.3 (t) = . Uniform Periodic functions 1 N1. N i.4 2 2 9 .3 (t) = 0 i ≠ 3.3 0. N 5.t) (6 .2 (t) = 0 i ≠ 4.3 N3.7 0.1 0 0 1 2 3 4 5 6 Uniform Periodic basis (contd.8 N4.3 0. N i.6 0.1 (t) = 1.5 0.t)(t .3)(5 .1 (t) = 0 i≠5 N 4.3 (t) = + .2 (t) = (5 − t ).5 (5 − t ) 2 N 3.9 N2.3 0.) 4≤t≤5 N 5. N i.2 0.4 0.3 0. 2 (t .2 (t) = (t − 4).

3.3 (t) = (1 . 2 t2 N 3.3 (2 .3 (t) = 0 i ≠ 1. k=3 need to calculate Ni.2 (t) = t . N i.) 5≤ t ≤6 N 6. N i.t) 2 . N i.2 (t) = (6 − t ).t) N1.t) N 4. N i. N 3.t) t.2 (t) = 0 i≠5 2 (6 .3 (t) = . N 2.2. N i.1 (t) = 0 i≠3 N 2. N i.3 2 10 .4 • The knot vector [x]=[0 0 0 1 2 2 2] 0 ≤ t ≤1 N 3.3 (t) = t (1 .2 (t) = (1 − t ).3 (t) = .2.3=I=1.2 (t) = 0 i ≠ 2. Uniform Periodic basis (contd.1 (t) = 0 i≠6 N 5.1 (t) = 1.3 (t) = 0 i≠4 2 Open Uniform basis Functions • To calculate 4 third order basis functions: • Here n+1=4.1 (t) = 1.

3 (t) = (t . N 4.4 B-Spline Control The control is achieved by following common methods •Changing the type of knot vector and hence the basis function: periodic uniform. N 3. Open Uniform basis Functions • Continuing for the next interval 1≤ t ≤ 2 N 4.3. open uniform or non- uniform •Changing the order k of the basis functions •Changing the number and position of the defining polygon vertices •Using multiple polygon vertices •Using multiple knot values in the knot vector 11 . N i.1 (t) = 0 i≠4 N 3.2 (t) = 0 i ≠ 3.t) 2 (2 .3 (t) = 0 i ≠ 2.3 (t) = .t) N 2.1 (t) = 1.1).4 (2 . N i. 2 2 N 4.2 (t) = (t − 1).t)(t .1) 2 . N i.2 (t) = (2 − t ).3 (t) = t + (2 .

B-Spline Control: Changing Number and position of vertices Controlling the curve with repeating the vertices [0 0 0 0 1 1 1 1] 12 .

B-Spline Control: Repeating the Number of vertices B-Spline Control: Closed – Non-uniform knot vector a b c d 13 .

Cubic B-Spline 14 .