TExcelTAD
Home › Calculus in Depth › Parametric Surfaces and Their Areas

Parametric Surfaces and Their Areas

A parametric surface is a map from a flat parameter rectangle into space, r(u,v)=⟨x(u,v),y(u,v),z(u,v)⟩\mathbf{r}(u, v) = \langle x(u, v), y(u, v), z(u, v) \rangle. It is the two-parameter version of a space curve, and it covers shapes that are not graphs of z=f(x,y)z = f(x, y): spheres, tori, helicoids, the inside of a pipe. This lesson builds the tangent vectors, the normal vector and the surface-area integral that the next three lessons rely on.

From curves to surfaces

A vector function r(t)\mathbf{r}(t) traces a curve; a vector function of two variables traces a surface. Fixing v=v0v = v_0 and letting uu vary gives a grid curve; so does fixing uu. The gentle survey in Surfaces in 3D shows the common shapes; here we do the calculus on them.

Surface Parametrisation r(u,v)\mathbf{r}(u, v) Parameter domain
Graph z=f(x,y)z = f(x, y) ⟨u,v,f(u,v)⟩\langle u, v, f(u, v) \rangle the region DD in the plane
Sphere of radius aa ⟨asin⁡vcos⁡u,asin⁡vsin⁡u,acos⁡v⟩\langle a\sin v \cos u, a\sin v \sin u, a\cos v \rangle 0≤u≤2π0 \le u \le 2\pi, 0≤v≤π0 \le v \le \pi
Cylinder x2+y2=a2x^2 + y^2 = a^2 ⟨acos⁡u,asin⁡u,v⟩\langle a\cos u, a\sin u, v \rangle 0≤u≤2π0 \le u \le 2\pi, vv in an interval
Cone z=x2+y2z = \sqrt{x^2 + y^2} ⟨vcos⁡u,vsin⁡u,v⟩\langle v\cos u, v\sin u, v \rangle 0≤u≤2π0 \le u \le 2\pi, v≥0v \ge 0
Torus (tube radius bb around a circle of radius RR) ⟨(R+bcos⁡v)cos⁡u,(R+bcos⁡v)sin⁡u,bsin⁡v⟩\langle (R + b\cos v)\cos u, (R + b\cos v)\sin u, b\sin v \rangle 0≤u,v≤2π0 \le u, v \le 2\pi
Surface of revolution of y=g(x)y = g(x) about the xx-axis ⟨u,g(u)cos⁡v,g(u)sin⁡v⟩\langle u, g(u)\cos v, g(u)\sin v \rangle a≤u≤ba \le u \le b, 0≤v≤2π0 \le v \le 2\pi

Tangent vectors and the normal

The partial derivatives ru=∂r/∂u\mathbf{r}_u = \partial\mathbf{r}/\partial u and rv=∂r/∂v\mathbf{r}_v = \partial\mathbf{r}/\partial v are tangent to the two grid curves through a point, so both lie in the tangent plane. Their cross product is perpendicular to that plane:

n=ru×rv(normal vector)tangent plane at r(u0,v0):n⋅(⟨x,y,z⟩−r(u0,v0))=0\begin{aligned} &\mathbf{n} = \mathbf{r}_u \times \mathbf{r}_v && \text{(normal vector)} \\ &\text{tangent plane at } \mathbf{r}(u_0, v_0)\text{:} \quad \mathbf{n} \cdot (\langle x, y, z \rangle - \mathbf{r}(u_0, v_0)) = 0 \end{aligned}

The surface is smooth where ru×rv≠0\mathbf{r}_u \times \mathbf{r}_v \ne \mathbf{0}. A sphere's parametrisation fails this at the poles (v=0v = 0 or π\pi) even though the sphere itself is perfectly round there: smoothness is a property of the parametrisation, and a bad point can often be removed by choosing a different one.

Surface area

A small parameter rectangle Δu×Δv\Delta u \times \Delta v is mapped to an almost-flat patch spanned by ru Δu\mathbf{r}_u\,\Delta u and rv Δv\mathbf{r}_v\,\Delta v. A parallelogram's area is the length of the cross product, so the patch has area ≈∣ru×rv∣ Δu Δv\approx \lvert \mathbf{r}_u \times \mathbf{r}_v \rvert\,\Delta u\,\Delta v. Summing and taking the limit:

A(S)=∬D∣ru×rv∣ dAA(S) = \iint_D \lvert \mathbf{r}_u \times \mathbf{r}_v \rvert\,dA

For a graph z=f(x,y)z = f(x, y), rx×ry=⟨−fx,−fy,1⟩\mathbf{r}_x \times \mathbf{r}_y = \langle -f_x, -f_y, 1 \rangle and the formula becomes the one from Surface Area: A=∬1+fx2+fy2 dAA = \iint \sqrt{1 + f_x^2 + f_y^2}\,dA. The factor ∣ru×rv∣\lvert \mathbf{r}_u \times \mathbf{r}_v \rvert plays the same role as the Jacobian in change of variables: it measures how much the map stretches area.

Let SymPy do the cross product for a torus with R=3R = 3 and b=1b = 1:

python · try it yourself
import sympy as sp

u, v = sp.symbols('u v', real=True)
R, b = 3, 1
r = sp.Matrix([(R + b*sp.cos(v))*sp.cos(u), (R + b*sp.cos(v))*sp.sin(u), b*sp.sin(v)])
n = r.diff(u).cross(r.diff(v))
nn = sp.simplify(n.dot(n))
print("|r_u x r_v|^2 =", sp.factor(nn))

mag = R + b*sp.cos(v)                     # positive, so it is the square root
print("check:", sp.simplify(mag**2 - nn) == 0)
area = sp.integrate(mag, (u, 0, 2*sp.pi), (v, 0, 2*sp.pi))
print("area =", area, "≈", round(float(area), 4))
|r_u x r_v|^2 = (cos(v) + 3)**2
check: True
area = 12*pi**2 ≈ 118.4353

The general result is A=4π2RbA = 4\pi^2 Rb: the length of the centre circle (2πR2\pi R) times the tube's circumference (2πb2\pi b). The outer half of the tube (cos⁡v>0\cos v > 0) is stretched more than the inner half, and the two effects average out exactly.

Area from a triangle mesh

A renderer never sees r(u,v)\mathbf{r}(u, v); it sees triangles. Sampling the parameter grid, splitting each cell into two triangles and adding 12∣e1×e2∣\frac{1}{2}\lvert \mathbf{e}_1 \times \mathbf{e}_2 \rvert per triangle is a Riemann sum for the area integral. Here is the helicoid r(u,v)=⟨ucos⁡v,usin⁡v,v⟩\mathbf{r}(u, v) = \langle u\cos v, u\sin v, v \rangle, 0≤u≤10 \le u \le 1, 0≤v≤2π0 \le v \le 2\pi, a spiral ramp. Its normal has length 1+u2\sqrt{1 + u^2}, so the exact area is 2π∫011+u2 du=π(2+ln⁡(1+2))2\pi \int_0^1 \sqrt{1 + u^2}\,du = \pi(\sqrt{2} + \ln(1 + \sqrt{2})).

python · try it yourself
import numpy as np

def helicoid(u, v):
    return np.stack([u * np.cos(v), u * np.sin(v), v], axis=-1)

def mesh_area(nu, nv):
    u, v = np.meshgrid(np.linspace(0, 1, nu + 1), np.linspace(0, 2 * np.pi, nv + 1), indexing="ij")
    P = helicoid(u, v)
    a, b, c, d = P[:-1, :-1], P[1:, :-1], P[1:, 1:], P[:-1, 1:]
    t1 = 0.5 * np.linalg.norm(np.cross(b - a, c - a), axis=-1)
    t2 = 0.5 * np.linalg.norm(np.cross(c - a, d - a), axis=-1)
    return float(t1.sum() + t2.sum())

exact = np.pi * (np.sqrt(2) + np.log(1 + np.sqrt(2)))
for n in (4, 16, 64, 256):
    print(f"{n:>3} x {n:<3} grid: {mesh_area(n, n):.6f}")
print(f"exact        : {exact:.6f}")
  4 x 4   grid: 6.696128
 16 x 16  grid: 7.170856
 64 x 64  grid: 7.209204
256 x 256 grid: 7.211637
exact        : 7.211800

The mesh area always comes out a little low: each flat triangle cuts a chord across the curved surface.

python · try it yourself
import numpy as np
import matplotlib.pyplot as plt

u, v = np.meshgrid(np.linspace(0, 1, 12), np.linspace(0, 2 * np.pi, 40))
x, y, z = u * np.cos(v), u * np.sin(v), v
fig = plt.figure(figsize=(6, 4))
ax = fig.add_subplot(projection="3d")
ax.plot_wireframe(x, y, z, linewidth=0.6)
ax.set_title("helicoid: grid curves u = const and v = const")
print("grid curves drawn:", x.shape[0] + x.shape[1])
grid curves drawn: 52

In software

  • Mesh normals. A vertex normal in a triangle mesh is a discrete ru×rv\mathbf{r}_u \times \mathbf{r}_v. Summing un-normalised face cross products around a vertex weights each face by its area, which is why many engines do exactly that before normalising.
  • Procedural geometry. Generators for spheres, tori, tubes along a path (cables, roads) and surfaces of revolution (vases, wheels) loop over (u,v)(u, v), emit vertices r(u,v)\mathbf{r}(u, v), and emit normals from the analytic cross product instead of from the triangles, which gives smoother shading.
  • Texture mapping. (u,v)(u, v) are literally the texture coordinates. ∣ru×rv∣\lvert \mathbf{r}_u \times \mathbf{r}_v \rvert tells you how much a texel is stretched on screen; UV unwrapping tools try to keep it nearly constant.
  • Physics and printing. Cloth simulation, paint coverage and 3D-printing cost estimates all use the triangle-sum area above.

Exercises

Exercise 1: A tilted plane

For r(u,v)=⟨u,v,3−2u+v⟩\mathbf{r}(u, v) = \langle u, v, 3 - 2u + v \rangle on the unit square 0≤u,v≤10 \le u, v \le 1, find ru×rv\mathbf{r}_u \times \mathbf{r}_v and the area of the piece.

Answer

ru×rv=⟨2,−1,1⟩\mathbf{r}_u \times \mathbf{r}_v = \langle 2, -1, 1 \rangle, area 6≈2.449\sqrt{6} \approx 2.449.

Solution
ru=⟨1,0,−2⟩,rv=⟨0,1,1⟩ru×rv=⟨0⋅1−(−2)⋅1,(−2)⋅0−1⋅1,1⋅1−0⋅0⟩=⟨2,−1,1⟩∣ru×rv∣=4+1+1=6, constantA=6⋅(area of unit square)=6\begin{aligned} &\mathbf{r}_u = \langle 1, 0, -2 \rangle, \quad \mathbf{r}_v = \langle 0, 1, 1 \rangle \\ \mathbf{r}_u \times \mathbf{r}_v &= \langle 0 \cdot 1 - (-2) \cdot 1, (-2) \cdot 0 - 1 \cdot 1, 1 \cdot 1 - 0 \cdot 0 \rangle = \langle 2, -1, 1 \rangle \\ \lvert \mathbf{r}_u \times \mathbf{r}_v \rvert &= \sqrt{4 + 1 + 1} = \sqrt{6}, \text{ constant} \\ A &= \sqrt{6} \cdot (\text{area of unit square}) = \sqrt{6} \end{aligned}

Exercise 2: Sphere area

Using the sphere parametrisation in the table, show ∣ru×rv∣=a2sin⁡v\lvert \mathbf{r}_u \times \mathbf{r}_v \rvert = a^2 \sin v and deduce the area of a sphere of radius aa.

Answer

4πa24\pi a^2.

Solution
ru=⟨−asin⁡vsin⁡u,asin⁡vcos⁡u,0⟩rv=⟨acos⁡vcos⁡u,acos⁡vsin⁡u,−asin⁡v⟩ru×rv=⟨−a2sin⁡2vcos⁡u,−a2sin⁡2vsin⁡u,−a2sin⁡vcos⁡v⟩∣ru×rv∣2=a4sin⁡4v+a4sin⁡2vcos⁡2v=a4sin⁡2v∣ru×rv∣=a2sin⁡v(sin⁡v≥0 on [0,π])A=∫0π∫02πa2sin⁡v du dv=2πa2⋅[−cos⁡v]0π=4πa2\begin{aligned} \mathbf{r}_u &= \langle -a\sin v \sin u, a\sin v \cos u, 0 \rangle \\ \mathbf{r}_v &= \langle a\cos v \cos u, a\cos v \sin u, -a\sin v \rangle \\ \mathbf{r}_u \times \mathbf{r}_v &= \langle -a^2 \sin^2 v \cos u, -a^2 \sin^2 v \sin u, -a^2 \sin v \cos v \rangle \\ \lvert \mathbf{r}_u \times \mathbf{r}_v \rvert^2 &= a^4 \sin^4 v + a^4 \sin^2 v \cos^2 v = a^4 \sin^2 v \\ \lvert \mathbf{r}_u \times \mathbf{r}_v \rvert &= a^2 \sin v && (\sin v \ge 0 \text{ on } [0, \pi]) \\ A &= \int_0^\pi \int_0^{2\pi} a^2 \sin v\,du\,dv = 2\pi a^2 \cdot [-\cos v]_0^\pi = 4\pi a^2 \end{aligned}

(This order of uu, vv gives an inward-pointing normal; swapping them gives the outward one. The area does not care.)

Exercise 3: Tangent plane

Find the tangent plane to the cone r(u,v)=⟨vcos⁡u,vsin⁡u,v⟩\mathbf{r}(u, v) = \langle v\cos u, v\sin u, v \rangle at u=π/2u = \pi/2, v=2v = 2.

Answer

y−z=0y - z = 0 (the plane y=zy = z).

Solution
point: r(π/2,2)=⟨0,2,2⟩ru=⟨−vsin⁡u,vcos⁡u,0⟩=⟨−2,0,0⟩rv=⟨cos⁡u,sin⁡u,1⟩=⟨0,1,1⟩n=ru×rv=⟨0⋅1−0⋅1,0⋅0−(−2)⋅1,−2⋅1−0⋅0⟩=⟨0,2,−2⟩plane: 0(x−0)+2(y−2)−2(z−2)=0  →  y−z=0\begin{aligned} &\text{point: } \mathbf{r}(\pi/2, 2) = \langle 0, 2, 2 \rangle \\ \mathbf{r}_u &= \langle -v\sin u, v\cos u, 0 \rangle = \langle -2, 0, 0 \rangle \\ \mathbf{r}_v &= \langle \cos u, \sin u, 1 \rangle = \langle 0, 1, 1 \rangle \\ \mathbf{n} &= \mathbf{r}_u \times \mathbf{r}_v = \langle 0 \cdot 1 - 0 \cdot 1, 0 \cdot 0 - (-2) \cdot 1, -2 \cdot 1 - 0 \cdot 0 \rangle = \langle 0, 2, -2 \rangle \\ &\text{plane: } 0(x - 0) + 2(y - 2) - 2(z - 2) = 0 \;\to\; y - z = 0 \end{aligned}

The tangent plane to a cone contains the whole line from the apex through the point, which is why it passes through the origin.

Exercise 4: A cone's side (code)

Compute the area of the cone z=x2+y2z = \sqrt{x^2 + y^2}, 0≤z≤20 \le z \le 2, by hand with the table's parametrisation, then confirm with mesh_area-style triangles.

Answer

42⋅π≈17.77154\sqrt{2} \cdot \pi \approx 17.7715.

Solution

With r=⟨vcos⁡u,vsin⁡u,v⟩\mathbf{r} = \langle v\cos u, v\sin u, v \rangle: ru×rv=⟨vcos⁡u,vsin⁡u,−v⟩\mathbf{r}_u \times \mathbf{r}_v = \langle v\cos u, v\sin u, -v \rangle, length 2⋅v\sqrt{2} \cdot v. A=∫02π∫022⋅v dv du=2π⋅2⋅2=42πA = \int_0^{2\pi} \int_0^2 \sqrt{2} \cdot v\,dv\,du = 2\pi \cdot \sqrt{2} \cdot 2 = 4\sqrt{2}\pi. The cone is flat in one direction (along vv), so the only error in a mesh comes from the circular direction.

python · try it yourself
import numpy as np

u, v = np.meshgrid(np.linspace(0, 2 * np.pi, 401), np.linspace(0, 2, 41), indexing="ij")
P = np.stack([v * np.cos(u), v * np.sin(u), v], axis=-1)
a, b, c, d = P[:-1, :-1], P[1:, :-1], P[1:, 1:], P[:-1, 1:]
area = 0.5 * (np.linalg.norm(np.cross(b - a, c - a), axis=-1) + np.linalg.norm(np.cross(c - a, d - a), axis=-1)).sum()
print(round(float(area), 4), round(4 * np.sqrt(2) * np.pi, 4))
17.7711 17.7715

Test yourself

For a parametric surface r(u,v)\mathbf{r}(u, v), what does ∣ru×rv∣ du dv\lvert \mathbf{r}_u \times \mathbf{r}_v \rvert\,du\,dv represent?

  1. The volume under the surface
  2. The area of a tiny patch of the surface
  3. The curvature of the surface
  4. The length of a grid curve

The sphere parametrisation has ru×rv=0\mathbf{r}_u \times \mathbf{r}_v = \mathbf{0} at the poles. What does that mean?

  1. The sphere has a corner there
  2. The sphere has no tangent plane there
  3. Only that this parametrisation is not smooth there; the sphere itself is fine
  4. The area integral diverges

A torus has centre-circle radius R=5R = 5 and tube radius b=2b = 2. What is its area?

  1. 40π240\pi^2
  2. 20π220\pi^2
  3. 10π10\pi
  4. 100π100\pi