Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

3.5 B-Spline Curves

Lesson 23 of 32 in the free Computer Graphics notes on Siksha Sarovar, written by Rohit Jangra.

Why B-Splines

Bezier curves of degree n are global: moving one control point changes the entire curve. B-Splines decouple degree from number of control points and provide local control - moving one control point only affects a few segments. This is why CAD systems and animation packages standardize on B-Splines (and their rational extension, NURBS).

Definition

P(u) = sum over i=0..n of N_(i,p)(u) * P_i, where N_(i,p)(u) is the B-Spline basis of degree p = k - 1, defined recursively (Cox-de Boor):

  • N_(i,0)(u) = 1 if t_i <= u < t_(i+1), else 0.
  • N_(i,p)(u) = (u - t_i)/(t_(i+p) - t_i) N_(i,p-1)(u) + (t_(i+p+1) - u)/(t_(i+p+1) - t_(i+1)) N_(i+1,p-1)(u).

Knot Vector

A non-decreasing sequence t = (t_0, t_1, ..., t_(n+k)) of length n + k + 1.

  • Uniform: equally spaced (e.g., 0,1,2,3,...).
  • Non-uniform: spacing varies for tension control.
  • Clamped (open uniform): first and last knots have multiplicity k -> curve interpolates the first and last control points (like Bezier endpoints).

Properties

  • Local support: changing one P_i affects only the part of the curve where N_(i,p)(u) > 0, i.e., the interval [t_i, t_(i+p+1)].
  • Convex hull within each span: the curve in [t_j, t_(j+1)] lies inside the convex hull of P_(j-p), ..., P_j.
  • Continuity at simple knots: C^(p-1).
  • Reduces to Bezier when knot multiplicity equals degree at the ends and there are no interior knots.

Cubic B-Spline (p=3, uniform)

With four control points P0..P3 the segment is P(u) = ((1-u)^3/6) P0 + ((3u^3 - 6u^2 + 4)/6) P1 + ((-3u^3 + 3u^2 + 3u + 1)/6) P2 + (u^3/6) P3, which does not interpolate P0 or P3 (clamped knot vectors restore endpoint interpolation).

Comparison: Bezier vs B-Spline

FeatureBezier (deg n)B-Spline (deg p)
Control pointsn+1any n+1 (independent of degree)
Degree vs DOFtiedindependent
Local controlNoYes
Interpolates endpointsAlwaysOnly if clamped
Continuity at joinsneeds careC^(p-1) automatic at simple knots

NURBS - Brief

Non-Uniform Rational B-Splines add weights w_i to each control point and evaluate P(u) = (sum w_i N_i,p P_i) / (sum w_i N_i,p). This lets B-Splines exactly represent conic sections (circles, ellipses, parabolas) which polynomial splines cannot. NURBS is the standard for industrial CAD and STEP file exchange.

Practical Tips

  • To pull a B-Spline closer to a particular point, increase that point's weight (NURBS) or insert a knot near that location (knot insertion).
  • Knot multiplicity p reduces continuity by p, so designers use repeated knots to introduce sharp corners deliberately.