Spline – Old Days Draftsman use ‘ducks’ and strips of wood (splines) to draw curves Wood splines have second-order continuity A Duck (weight) Ducks trace out curve
Spline – Some definition Control Points A set of points that influence the curve ’ s shape Knots Control points that lie on the curve Interpolating Splines Curves that pass through the control points (knots ) Approximating Splines Control points only influence shape
Spline Specification Specified by a sum of smaller curve segments represented by the function ‘ Φ ’ known as basis or blending function. For curve modeling , polynomials are often the blending function of choice. Mathematically, Where, i = 0, 1, 2, 3, … , n and, p , p 1 , … , p n are weights.
Bézier Curves Similar to Hermite , but more intuitive definition of endpoint derivatives. Instead of using control points and slopes (as in H ermite ), Bézier curve can be generated only when control points are given. Given (n+1)-control points , the basis function of Bézier curve is a n-degree polynomial.
Bézier Curves Given (n+1)-control points , the basis function of Bézier curve is a n-degree polynomial . The parametric equation of the Bézier curve is: Expanding it: P (u) = p BEZ 0,n (u) + p 1 BEZ 1,n (u) + … + p n BEZ n,n (u) Point on the curve Control point Basis or Coefficient
Bézier Curves The Bezier blending functions BEZ k,n (u) are the Bernstein polynomials . Binomial Coefficient
Linear Bézier Curve Two control points: p , p 1 Represents a straight line between these points P (u) = p BEZ 0,n (u) + p 1 BEZ 1,n (u) + … + p n BEZ n,n (u ) Here n=1, k= 0,1 p(u) = p BEZ 0,1 ( u) + p 1 BEZ 1,1 (u) = p 1 C u (1-u) 1-0 + p 1 1 C 1 u 1 (1-u) 1-1 = p0 . 1 . 1. (1-u) + p1 . 1 . u . 1 p(u)= p (1-u) + p 1 u Parametric equation of line
Quadratic Bézier Curve Three control points: p , p 1, p 2 Represents a parabolic segment P(u) = p BEZ 0,n (u) + p 1 BEZ 1,n (u) + … + p n BEZ n,n (u) Here n =2, k= 0, 1, 2 p(u) = p BEZ 0,2 ( u) + p 1 BEZ 1,2 ( u ) + p 2 BEZ 2,2 ( u) = p 2 C u (1-u ) 2-0 + p 1 2 C 1 u 1 (1-u ) 2-1 + p 2 2 C 2 u 2 (1-u) 2 -2 = p . 1 . 1. (1-u ) 2 + p 1 . 2 . u . (1-u) + p 2 . 1 . u 2 . 1 p (u)= p (1-u ) 2 + 2 p 1 u(1-u) + p 2 u 2 Where, 0 ≤ u ≤ 1
Cubic Bézier Curve Most popular Bézier curve is the cubic Bézier curve. Basis function is a cubic polynomial. Four control points: p , p 1, p 2, p 3 Here, n = 3, k= 0, 1, 2, 3. P(u) = p BEZ 0,3 (u) + p 1 BEZ 1,3 (u) + p 2 BEZ 2 ,3 (u) + p 3 BEZ 3, 3 (u) = p 3 C u (1-u) 3 -0 + p 1 3 C 1 u 1 (1-u) 3 -1 + p 2 3 C 2 u 2 (1-u) 3 -2 +p 3 3 C 3 u 3 (1-u) 3-3 = p . (1-u) 3 + 3 . P 1 . u . (1-u) 2 + 3 . P 2 . u 2 . (1-u) + p 3 . u 3 = p (1 – u 3 – 3u + 3u 2 ) + 3p 1 u(1 + u 2 - 2u) + 3p 2 u 2 (1 - u) + p 3 u 3
Cubic Bézier Curve P(u) = p BEZ 0,3 (u) + p 1 BEZ 1,3 (u) + p 2 BEZ 2 ,3 (u) + p 3 BEZ 3, 3 (u) = p 3 C u (1-u) 3 -0 + p 1 3 C 1 u 1 (1-u) 3 -1 + p 2 3 C 2 u 2 (1-u) 3 -2 +p 3 3 C 3 u 3 (1-u) 3-3 = p . (1-u) 3 + 3 . P 1 . u . (1-u) 2 + 3 . P 2 . u 2 . (1-u) + p 3 . u 3 = p (1 – u 3 – 3u + 3u 2 ) + 3p 1 u(1 + u 2 - 2u) + 3p 2 u 2 (1 - u) + p 3 u 3 = p – p u 3 – 3p u + 3p u 2 + 3p 1 u + 3p 1 u 3 – 6p 1 u 2 + 3p 2 u 2 – 3p 2 u 3 + p 3 u 3 p(u) = u3 (- p0 + 3p1 - 3p2 + p3) + u2 (3p0 – 6p1 + 3p2) + u (-3p0 + 3p1) + p0
Cubic Bézier Curve p(u) = u3 (- p0 + 3p1 - 3p2 + p3) + u2 (3p0 – 6p1 + 3p2) + u (-3p0 + 3p1) + p0 M BEZ
Blending functions with 4 control points (n=3) BEZ 0,3 (u)
Blending functions with 4 control points (n=3) BEZ 0,3 (u) BEZ 1,3 (u)
Blending functions with 4 control points (n=3) BEZ 1,3 (u) BEZ 0,3 (u) BEZ 2,3 (u)
Blending functions with 4 control points (n=3) BEZ 1,3 (u) BEZ 0,3 (u) BEZ 2,3 (u) BEZ 3,3 (u)
Properties of Bézier Curve It always passes through the two end points i.e. first and last control point. The Bézier curve is a straight line iff the control points are collinear. The slope (tangent) at the beginning of the curve is along the line joining the first two control points and the slope at the end of the curve is along the line joining the last two end points.
Properties of Bézier Curve The degree of the polynomial defining the curve segment is one less than the number of control points. All basis functions are non-negative and their sum is always 1 i.e. The curve generally follows the shape of the defining polygon. The Bézier curves always lie within the convex hull.