---
title: "Curve modeling using splines"
subject: "Computer Graphics"
chapter: 5
key: "semester_5/computer_graphics:curve-modeling-using-splines"
source: https://www.bctengineer.com/q/semester_5/computer_graphics/curve-modeling-using-splines
site: BCT Engineering
---

# Curve modeling using splines

Computer Graphics · Chapter 5: Curve Modeling

- Asked in: 2076 Chaitra, 5 marks; 2078 Kartik, 4 marks; 2078 Bhadra, 5 marks (asked 3 times)
- Video: [Splines in 5 minutes:  Part 1 -- cubic curves](https://www.youtube.com/watch?v=YMl25iCCRew) — Graphics in 5 Minutes
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_graphics/curve-modeling-using-splines
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_graphics/chapter-5

## Question

Explain the process (steps) of performing curve modeling using splines (including the steps for cubic spline interpolation).

## Short answer

Steps: select control points, choose interpolation or approximation, define parametric cubic segments, enforce C0, C1, C2 continuity and end conditions (e.g., natural or clamped), solve for coefficients, evaluate and adjust. Cubic spline interpolation: for n+1 points, set 4n equations from positions, first and second derivative matches, plus two end conditions, solving for C2 smoothness.

## Answer

A **spline** is a flexible piecewise polynomial curve. Originally it was a thin wooden strip held by weights (ducks) at points and used by draftsmen to draw smooth curves.

#### Steps in curve modeling using splines
1. **Select control points:** choose a set of points that give the rough shape of the curve.
2. **Choose the type of fit:** interpolation (curve passes through points) or approximation (curve follows the points but may miss them).
3. **Choose the form of the pieces:** usually a parametric cubic polynomial for each section, x(u) = a u³ + b u² + c u + d (same for y and z).
4. **Apply boundary conditions** to find coefficients: end positions and slopes, and continuity at joins (C⁰, C¹, C²).
5. **Solve for the coefficients** and convert to a matrix form P(u) = U · M · G (basis matrix M and geometry vector G).
6. **Evaluate** the polynomial for u from 0 to 1 in small steps and draw line segments.
7. **Adjust** the control points until the shape is satisfactory.

#### Cubic spline interpolation (n + 1 points)
- There are n cubic sections, so 4n unknown coefficients.
- Each section passes through its two end points: 2n conditions.
- First derivatives match at the n − 1 inner joints: n − 1 conditions.
- Second derivatives match at the inner joints: n − 1 conditions.
- This gives 4n − 2 equations. Two more come from end conditions, for example natural spline (second derivative = 0 at both ends) or clamped spline (given end slopes).
- Solving the 4n linear equations gives the coefficients, producing a curve with C² continuity.

## Related in Computer Graphics

- [Interpolation versus approximation spline](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Ainterpolation-vs-approximation-spline) — Computer Graphics, chapter 5, asked 2×
- [Define spline curve](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Adefine-spline-curve) — Computer Graphics, chapter 5
- [Parametric cubic curves](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aparametric-cubic-curve) — Computer Graphics, chapter 5, asked 6×
- [Derive cubic Bezier equation and properties](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Abezier-cubic-equation-properties) — Computer Graphics, chapter 5
- [Hermite curve and blending functions](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Ahermite-curve-blending-functions) — Computer Graphics, chapter 5, asked 2×

## Related in other subjects

- [Natural cubic spline: y(6.5)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aspline-5-7-9-11) — Numerical Method, chapter 4, asked 3×
- [Natural cubic spline: y(4.5)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aspline-4-5) — Numerical Method, chapter 4, asked 3×
- [Natural cubic spline: y(0.5)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aspline-y-0-5) — Numerical Method, chapter 4, asked 3×
- [Natural cubic spline: y(8)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Aspline-find-y-8) — Numerical Method, chapter 4
