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.2 Parametric Cubic Curves and Continuity

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

Cubic Form

A parametric cubic curve segment is P(u) = a + bu + cu^2 + d*u^3, u in [0, 1], where a, b, c, d are 3D vectors. With four vector coefficients we have 12 scalar degrees of freedom - enough to control endpoint position, endpoint tangent, and curvature.

Why Cubic?

  • Linear: just a line.
  • Quadratic: cannot have an inflection point; cannot represent S-curves naturally.
  • Cubic: minimum degree allowing one inflection; smallest derivatives for C2 continuity.
  • Higher: oscillates (Runge phenomenon), expensive to evaluate.

Parametric Continuity (C-class)

Two curve segments P1(u) and P2(u) joined at u=1 of P1 and u=0 of P2.

  • C0: P1(1) = P2(0) - positions match (no gap).
  • C1: also P1'(1) = P2'(0) - tangent vectors equal in magnitude and direction.
  • C2: also P1''(1) = P2''(0) - same curvature direction and rate.

Geometric Continuity (G-class)

Looser - direction matches but magnitude can differ.

  • G0: same as C0.
  • G1: P1'(1) = k * P2'(0) for some k > 0 - tangent direction continuous, magnitudes may differ. Visually smooth, animations may have varying speed.
  • G2: matching curvature direction (osculating circle).

Practical Distinction

  • For shape, G-continuity is usually enough (the curve looks smooth).
  • For animation along a path, you often want C1 or higher so a constant-u sweep produces smooth motion (no velocity discontinuity).

Matrix Form

For any cubic curve family we can write P(u) = U M G, where U = [u^3, u^2, u, 1], M is the 4x4 basis matrix (Hermite, Bezier, B-Spline differ here), and G is the geometry vector of control data (4 points / tangents). This unification is why graphics libraries can render any of these with the same evaluator just by swapping M and G.

Numerical Quick Sanity Check

For Hermite with endpoints P0, P1 and tangents R0, R1: P(0)=P0, P(1)=P1, P'(0)=R0, P'(1)=R1. Verify by plugging u=0,1 into the basis - we will derive this in the next lesson.

Effect on Modeling

Spline editors expose handles to enforce the desired continuity. Pixar's animation pipeline famously prefers G-continuity for character motion paths because animators care about path shape, not parameter speed.