1. Gyanastra
  2. Computer Graphics
  3. 3D Representation and Viewing
  4. Polygon Quadric Surfaces and Splines
Free lesson, no account needed 11 min read 25 practice questions after it
Asked in past papers5 times
  • ISRO2008
  • UGC NET2023202120202016

Computer Graphics · 3D Representation and Viewing

Polygon Quadric Surfaces and Splines

Overview

Three-dimensional objects in computer graphics are either modelled (given a mathematical description) or approximated (built from simple pieces).
This lesson covers the two standard modelling families used in the syllabus: polygon surfaces and quadric surfaces for solid/analytic shapes, and spline curves (Bézier and B-spline) for free-form shapes such as car bodies, fonts and camera paths.
It sits inside the 3D Representation and Viewing area, immediately after 3D transformations and before visible-surface methods.
You should already be comfortable with parametric representation of a line and with vector arithmetic (dot and cross products), because every curve and every face normal in this lesson is written in vector form.

Key concepts

  • Polygon surface (polygon mesh): a 3D object represented as a collection of flat polygon faces; each face is a closed sequence of edges, and each edge joins two vertices. Faces supply the visible boundary and the surface normal needed for shading.
  • Polygon tables (three-table mesh): the vertex table stores the (x,y,z)(x,y,z) coordinates of each vertex; the edge table stores, for each edge, pointers (indices) to its two end vertices; the face table stores pointers to the edges (or vertices) bounding each face.
    Tables remove duplicate coordinate data and make traversal fast.
  • Face normal: for a planar face with vertices V1,V2,V3V_1,V_2,V_3 taken counter-clockwise when viewed from outside, n=(V2−V1)×(V3−V1)\mathbf{n}= (V_2-V_1)\times(V_3-V_1), normalized. Orientation (winding order) decides which side is "front".
  • Quadric surface: any surface whose implicit equation is of second degree in x,y,zx,y,z: Ax2+By2+Cz2+Dxy+Exz+Fyz+Gx+Hy+Iz+J=0Ax^2+By^2+Cz^2+Dxy+Exz+Fyz+Gx+Hy+Iz+J=0.
    Standard quadrics: sphere, ellipsoid, elliptic cone, elliptic cylinder, elliptic paraboloid, hyperbolic paraboloid, hyperboloid of one sheet, hyperboloid of two sheets. Quadrics are smooth and compact to store; a sphere cannot be represented exactly by any finite planar polygon mesh — it can only be approximated.
  • Explicit / implicit / parametric forms: a quadric is usually stored implicitly (quadratic equation) and rendered by subdividing it into a polygon mesh.
  • Bézier curve: a polynomial curve defined by control points P0,…,PnP_0,\dots,P_n; it approximates the control polygon (it does not pass through interior control points) but interpolates P0P_0 and PnP_n.
  • Bernstein basis: the blending functions of a Bézier curve are Bi,n(t)=(ni)ti(1−t)n−iB_{i,n}(t)=\binom{n}{i}t^{i}(1-t)^{n-i}, all non-negative and summing to 1 on 0≤t≤10\le t\le 1.
  • Degree rule: n+1n+1 control points give degree nn (4 control points → cubic, 5 → quartic). The degree is not independent of the number of control points for a Bézier curve.
  • Convex-hull property: the entire Bézier curve lies inside the convex hull of its control points; it can never leave that hull.
  • Endpoint tangent property: B′(0)=n(P1−P0)\mathbf{B}'(0)=n(P_1-P_0) and B′(1)=n(Pn−Pn−1)\mathbf{B}'(1)=n(P_n-P_{n-1}); the curve is tangent to the first and last edges of the control polygon.
  • de Casteljau algorithm: a numerically stable recursive linear interpolation procedure that evaluates and subdivides a Bézier curve.
  • B-spline curve: a piecewise polynomial curve of degree dd defined by control points and a knot vector; unlike Bézier, the degree is chosen independently of the number of control points, and local control holds — moving one control point changes only a local part of the curve.
  • Continuity at knots: at an interior knot of multiplicity ss, a B-spline of degree dd is C d−sC^{\,d-s} continuous. Simple knot (s=1s=1): Cd−1C^{d-1}; multiplicity s=ds=d: C0C^{0} (only positional); multiplicity d+1d+1: the curve breaks apart there.
  • Rational Bézier / NURBS: assigning a weight wiw_i to each control point gives a rational curve, which can represent a circle exactly (a polynomial Bézier cannot).
  • Beta-spline: a B-spline variant with extra shape parameters bias and tension; the plain B-spline is the special case bias =1=1, tension =0=0.

How it works

A. Building a polygon mesh

  1. Collect all distinct vertices; list their coordinates once in the vertex table.
  2. For every face, record the ordered list of its vertices (or edges). Store the ordering consistently, e.g. counter-clockwise seen from outside, so that the cross-product normal always points outward.
  3. Build the edge table by listing each undirected vertex pair once and pointing back into the vertex table.
  4. During rendering, each face's normal is computed once and reused for lighting; back faces are back-face culled using that normal.

B. Modelling with quadrics

  1. Store the shape implicitly (a few coefficients) plus its position and orientation.
  2. When display is needed, tessellate (subdivide) it into a polygon mesh — a sphere becomes a latitude–longitude grid of quads.
  3. Continuity of the normals across the tessellation improves as the subdivision is refined; the polygonal surface is only an approximation.

C. Evaluating a Bézier curve

  1. Write B(t)=∑i=0nPi Bi,n(t)\mathbf{B}(t)=\sum_{i=0}^{n}P_i\,B_{i,n}(t) with Bi,n(t)=(ni)ti(1−t)n−iB_{i,n}(t)=\binom{n}{i}t^i(1-t)^{n-i}.
  2. Substitute the four Bernstein weights for a cubic: (1−t)3,  3t(1−t)2,  3t2(1−t),  t3(1-t)^3,\;3t(1-t)^2,\;3t^2(1-t),\;t^3 (they sum to 1).
  3. Evaluate each coordinate separately with those scalar weights.
  4. Alternatively, use de Casteljau: repeatedly take points at fraction tt along each control-polygon edge, halving the number of points each level until a single point remains — this is the curve point, and the intermediate points are the control points of the two split pieces.

D. Understanding knot multiplicity in B-splines

  1. Choose degree dd and a non-decreasing knot vector; the number of knots equals (number of control points) + d+ 1+\,d+\,1.
  2. On each span between successive knots, only d+1d+1 control points influence the curve.
  3. Repeating a knot reduces the smoothness there: multiplicity ss gives C d−sC^{\,d-s}.
  4. Repeating it d+1d+1 times forces the curve to pass through the corresponding control point and splits the curve.
Figure. Quadrics and free-form shapes both lead to tessellation; B-splines may first be swept or revolved into surfaces. The resulting mesh supplies vertex, edge and face tables used for normals and rendering.

Formulas

  • Bézier curve: B(t)=∑i=0nPi(ni)ti(1−t)n−i,0≤t≤1\mathbf{B}(t)=\sum_{i=0}^{n}P_i\binom{n}{i}t^{i}(1-t)^{n-i},\quad 0\le t\le 1 (PiP_i control points, nn degree, n+1n+1 control points).
  • Bernstein basis: Bi,n(t)=(ni)ti(1−t)n−iB_{i,n}(t)=\binom{n}{i}t^{i}(1-t)^{n-i}; ∑iBi,n(t)=1\sum_i B_{i,n}(t)=1 and Bi,n(t)≥0B_{i,n}(t)\ge 0 on [0,1][0,1].
  • Quadratic Bézier: B(t)=(1−t)2P0+2t(1−t)P1+t2P2\mathbf{B}(t)=(1-t)^2P_0+2t(1-t)P_1+t^2P_2.
  • Cubic Bézier: B(t)=(1−t)3P0+3t(1−t)2P1+3t2(1−t)P2+t3P3\mathbf{B}(t)=(1-t)^3P_0+3t(1-t)^2P_1+3t^2(1-t)P_2+t^3P_3.
  • Endpoint tangents: B′(0)=n(P1−P0)\mathbf{B}'(0)=n(P_1-P_0), B′(1)=n(Pn−Pn−1)\mathbf{B}'(1)=n(P_n-P_{n-1}).
  • Quadratic derivative: B′(t)=2(1−t)(P1−P0)+2t(P2−P1)\mathbf{B}'(t)=2(1-t)(P_1-P_0)+2t(P_2-P_1).
  • Cubic derivative: B′(t)=3(1−t)2(P1−P0)+6t(1−t)(P2−P1)+3t2(P3−P2)\mathbf{B}'(t)=3(1-t)^2(P_1-P_0)+6t(1-t)(P_2-P_1)+3t^2(P_3-P_2).
  • de Casteljau step: Pi(r)=(1−t)Pi(r−1)+t Pi+1(r−1)P_i^{(r)}=(1-t)P_i^{(r-1)}+t\,P_{i+1}^{(r-1)}.
  • B-spline curve: P(t)=∑i=0nPiNi,d(t)\mathbf{P}(t)=\sum_{i=0}^{n}P_iN_{i,d}(t), degree dd, knots u0≤u1≤⋯≤umu_0\le u_1\le\dots\le u_{m}, with m=n+d+1m=n+d+1.
  • Cox–de Boor recursion: Ni,0(t)=1N_{i,0}(t)=1 if ui≤t<ui+1u_i\le t<u_{i+1} else 00; Ni,d(t)=t−uiui+d−uiNi,d−1(t)+ui+d+1−tui+d+1−ui+1Ni+1,d−1(t)N_{i,d}(t)=\dfrac{t-u_i}{u_{i+d}-u_i}N_{i,d-1}(t)+\dfrac{u_{i+d+1}-t}{u_{i+d+1}-u_{i+1}}N_{i+1,d-1}(t).
  • Continuity at a knot of multiplicity ss for degree dd: C d−sC^{\,d-s}.
  • Rational Bézier: B(t)=∑iwiPiBi,n(t)∑iwiBi,n(t)\mathbf{B}(t)=\dfrac{\sum_i w_iP_iB_{i,n}(t)}{\sum_i w_iB_{i,n}(t)}.
  • Quadrics: sphere x2+y2+z2=r2x^2+y^2+z^2=r^2; ellipsoid x2a2+y2b2+z2c2=1\frac{x^2}{a^2}+\frac{y^2}{b^2}+\frac{z^2}{c^2}=1; hyperboloid of one sheet x2a2+y2b2−z2c2=1\frac{x^2}{a^2}+\frac{y^2}{b^2}-\frac{z^2}{c^2}=1; hyperboloid of two sheets x2a2−y2b2−z2c2=1\frac{x^2}{a^2}-\frac{y^2}{b^2}-\frac{z^2}{c^2}=1; elliptic cone x2a2+y2b2−z2c2=0\frac{x^2}{a^2}+\frac{y^2}{b^2}-\frac{z^2}{c^2}=0; elliptic paraboloid x2a2+y2b2=z\frac{x^2}{a^2}+\frac{y^2}{b^2}=z; hyperbolic paraboloid x2a2−y2b2=z\frac{x^2}{a^2}-\frac{y^2}{b^2}=z; elliptic cylinder x2a2+y2b2=1\frac{x^2}{a^2}+\frac{y^2}{b^2}=1.

Worked examples

Example 1 (direct). A Bézier curve has five control points. Degree?
Degree =(number of control points)−1=5−1=4=(\text{number of control points})-1=5-1=4. Answer: quartic, degree 4.

Example 2 (numeric). Cubic Bézier with P0=(0,0)P_0=(0,0), P1=(1,3)P_1=(1,3), P2=(3,3)P_2=(3,3), P3=(4,0)P_3=(4,0). Find the yy-coordinate at t=0.5t=0.5.
Weights at t=0.5t=0.5: (1−t)3=0.125(1-t)^3=0.125, 3t(1−t)2=3(0.5)(0.25)=0.3753t(1-t)^2=3(0.5)(0.25)=0.375, 3t2(1−t)=0.3753t^2(1-t)=0.375, t3=0.125t^3=0.125.
y=0.125(0)+0.375(3)+0.375(3)+0.125(0)=1.125+1.125=2.25y=0.125(0)+0.375(3)+0.375(3)+0.125(0)=1.125+1.125=2.25. Answer: y=2.25y=2.25.

Example 3 (numeric, two-step). Same curve. Find the slope dy/dx\mathrm{d}y/\mathrm{d}x of the tangent at t=0t=0.
Tangent =3(P1−P0)=3(1,3)=(3,9)=3(P_1-P_0)=3(1,3)=(3,9). Slope =93=3=\dfrac{9}{3}=3. The tangent at t=0t=0 points along P0P1P_0P_1, i.e. in the direction (1,3)(1,3), which has the same slope 33. Answer: slope =3=3.

Example 4 (hard, de Casteljau). Cubic Bézier P0=(0,0)P_0=(0,0), P1=(1,2)P_1=(1,2), P2=(3,2)P_2=(3,2), P3=(4,0)P_3=(4,0). Evaluate at t=0.5t=0.5 and give the two split curves.
Level 1: Q0=P0+P12=(0.5,1)Q_0=\frac{P_0+P_1}{2}=(0.5,1), Q1=P1+P22=(2,2)Q_1=\frac{P_1+P_2}{2}=(2,2), Q2=P2+P32=(3.5,1)Q_2=\frac{P_2+P_3}{2}=(3.5,1).
Level 2: R0=Q0+Q12=(1.25,1.5)R_0=\frac{Q_0+Q_1}{2}=(1.25,1.5), R1=Q1+Q22=(2.75,1.5)R_1=\frac{Q_1+Q_2}{2}=(2.75,1.5).
Level 3: S=R0+R12=(2,1.5)S=\frac{R_0+R_1}{2}=(2,1.5).
Left piece control points: P0,Q0,R0,SP_0,Q_0,R_0,S; right piece: S,R1,Q2,P3S,R_1,Q_2,P_3. Answer: curve point (2,1.5)(2,1.5).

Example 5 (statement/match type). Assertion: in a cubic B-spline, repeating an interior knot three times makes the curve only positionally continuous there. True or false?
For degree d=3d=3, multiplicity s=3s=3 gives continuity C d−s=C0C^{\,d-s}=C^{0} — the curve is continuous in position only, and its tangent and curvature jump. Answer: true. (Had multiplicity been 1, continuity would be C2C^{2}, the usual smoothness of a uniform cubic B-spline; multiplicity 4 would break the curve.)

Example 6 (numeric, quadratic extremum). Quadratic Bézier P0=(0,0)P_0=(0,0), P1=(2,2)P_1=(2,2), P2=(4,0)P_2=(4,0). Where is yy maximum?
y(t)=2t(1−t)⋅2=4t−4t2y(t)=2t(1-t)\cdot 2=4t-4t^2; y′(t)=4−8t=0⇒t=0.5y'(t)=4-8t=0 \Rightarrow t=0.5, y=4(0.5)−4(0.25)=1y=4(0.5)-4(0.25)=1. Answer: t=0.5t=0.5, maximum y=1y=1. Note the curve is a parabola, hence the single extremum.

Comparison

AspectBézier curveB-spline curve
BasisBernstein polynomials (global)Cox–de Boor basis (local)
Degreefixed by control-point count, n+1n+1 points → degree nnchosen independently of control-point count
Interpolationpasses through P0P_0 and PnP_n onlypasses through endpoints only with repeated (clamped) knots
Effect of moving one control pointwhole curve changesonly a local portion changes
Convex hullinside hull of all control pointsinside the hull of d+1d+1 local control points
Continuityinfinite inside the intervalC d−sC^{\,d-s} at a knot of multiplicity ss
Exact circlenot possible with polynomial formnot possible without rational form
SurfaceStandard equationShape cue
Spherex2+y2+z2=r2x^2+y^2+z^2=r^2all sections are circles
Ellipsoidx2a2+y2b2+z2c2=1\frac{x^2}{a^2}+\frac{y^2}{b^2}+\frac{z^2}{c^2}=1three semi-axes a,b,ca,b,c
Hyperboloid, one sheetx2a2+y2b2−z2c2=1\frac{x^2}{a^2}+\frac{y^2}{b^2}-\frac{z^2}{c^2}=1connected saddle-like tube
Hyperboloid, two sheetsx2a2−y2b2−z2c2=1\frac{x^2}{a^2}-\frac{y^2}{b^2}-\frac{z^2}{c^2}=1two separate bowls
Elliptic conex2a2+y2b2−z2c2=0\frac{x^2}{a^2}+\frac{y^2}{b^2}-\frac{z^2}{c^2}=0double cone
Elliptic paraboloidx2a2+y2b2=z\frac{x^2}{a^2}+\frac{y^2}{b^2}=zcup opening upward
Hyperbolic paraboloidx2a2−y2b2=z\frac{x^2}{a^2}-\frac{y^2}{b^2}=zsaddle with straight rulings
Elliptic cylinderx2a2+y2b2=1\frac{x^2}{a^2}+\frac{y^2}{b^2}=1no zz term
TermMeaning
Interpolationcurve passes through the given points (Hermite, natural spline)
Approximationcurve is pulled towards but need not pass through the points (Bézier, B-spline)

Revision summary

  • n+1n+1 control points → Bézier degree nn; 4 points is always the cubic case.
  • Bézier touches only the first and last control points, and is tangent to the first and last control-polygon edges.
  • Bézier stays inside the convex hull — a statement that it can go outside is always wrong.
  • Tangent at start =n(P1−P0)=n(P_1-P_0); at end =n(Pn−Pn−1)=n(P_n-P_{n-1}); do not forget the factor nn.
  • de Casteljau = repeated linear interpolation at fraction tt; it evaluates and subdivides.
  • B-spline degree is set by you, not by the number of control points — that is the biggest exam difference from Bézier.
  • B-spline knot multiplicity ss: continuity C d−sC^{\,d-s}; cubic with simple knot is C2C^2, with triple knot only C0C^0.
  • A finite polygon mesh can never represent a sphere exactly; quadrics store smoothly and are tessellated for display.
  • Quadric = =\,second-degree implicit equation; the sign pattern of the three squared terms decides which quadric it is.
  • Rational (weighted) Bézier/NURBS can draw a circle exactly; pure polynomial Bézier cannot.
  • Beta-splines use bias and tension; Bézier and B-spline are the tools of painting, drawing and CAD systems.

Previous-year exam insights

  • Direct concept questions ask the degree from the control-point count, the degree of a Bézier formed from four points, or the basis-polynomial expression — memorise Bi,n(t)=(ni)ti(1−t)n−iB_{i,n}(t)=\binom{n}{i}t^i(1-t)^{n-i}.
  • Statement I / Statement II pairs typically oppose "Bézier interpolates all control points" (false) with a true numerical fact such as "a cubic Bézier has four control points"; check each half separately, never jointly.
  • Which statements are correct items often mix interpolation/approximation labels: Hermite interpolates, Bézier and B-spline approximate, and "degree independent of control points" is true only for B-splines.
  • Numerical Bézier questions give four control points and ask for a point at t=1/2t=1/2, a slope, or an extremum; compute the four weights first, they must sum to 1.
  • Convex-hull and outside-the-hull options are the commonest trap; the correct answer is always that the curve remains inside.
  • Match List-I with List-II pairs curve/surface names with their properties (Bézier ↔ painting/drawing/CAD, B-spline ↔ bias and tension / knot continuity, quadric ↔ second-degree equation).
  • Knot multiplicity and continuity appear as assertion–reason or single-statement items; apply C d−sC^{\,d-s} mechanically.
  • Watch the wording "degree" versus "order": order =n+1=n+1 in many textbooks, so a cubic Bézier is degree 3 but order 4 — read which one is asked.

Practice at PARIKSHA

You are ready for the PARIKSHA tests of this sub-topic when you can:

  1. State the degree of a Bézier curve for any number of control points and write the Bernstein basis formula from memory.
  2. Evaluate a cubic Bézier at t=1/2t=1/2 and at a symbolic tt, and verify the weights sum to 1.
  3. Compute the tangent vector and slope at both endpoints of a cubic Bézier.
  4. Derive the maximum of a quadratic Bézier analytically by differentiating.
  5. Run de Casteljau for one or two levels and produce the control points of both split pieces.
  6. Decide whether a given statement about interpolation, approximation or the convex hull is true.
  7. Identify each standard quadric from its implicit equation and name its shape.
  8. Explain the vertex/edge/face tables of a polygon mesh and how a face normal is computed.
  9. Apply the continuity rule C d−sC^{\,d-s} for any degree and knot multiplicity, including break-apart at multiplicity d+1d+1.
  10. Distinguish Bézier from B-spline on degree, local control, hull and endpoint interpolation.

Attempt the sub-topic test first, then the full subject test.

Pages 1–2 of 2