TExcelTAD
Home › Calculus in Depth › Arc Length and Curvature

Arc Length and Curvature

How long is a space curve, and how sharply does it bend? This lesson defines arc length, reparametrises curves by arc length so that "parameter" means "distance travelled", and builds the curvature κ\kappa, the normal and binormal vectors and the torsion τ\tau: the Frenet frame, a coordinate system that rides along the curve. Road designers, roller-coaster engineers and camera-rail tools all work in this language.

The plane case of arc length is in Arc Length; a gentle introduction to curves in motion is Curvilinear Motion.

Arc length

For a curve r(t)=⟨f(t),g(t),h(t)⟩\mathbf{r}(t) = \langle f(t), g(t), h(t) \rangle, a≤t≤ba \le t \le b, with r′\mathbf{r}' continuous and the curve traversed exactly once, the length is

L=∫ab∥r′(t)∥ dt=∫abf′(t)2+g′(t)2+h′(t)2 dtL = \int_a^b \lVert \mathbf{r}'(t) \rVert\,dt = \int_a^b \sqrt{f'(t)^2 + g'(t)^2 + h'(t)^2}\,dt

Reason: a small parameter step Δt\Delta t moves the point by r(t+Δt)−r(t)≈r′(t) Δt\mathbf{r}(t + \Delta t) - \mathbf{r}(t) \approx \mathbf{r}'(t)\,\Delta t, a chord of length ≈∥r′(t)∥ Δt\approx \lVert \mathbf{r}'(t) \rVert\,\Delta t. Summing chords of a polygon inscribed in the curve and refining gives the integral. (Officially the length is the supremum of inscribed polygon lengths; for a C1C^1 curve the mean value theorem shows the supremum equals this integral.)

Arc length does not depend on the parametrisation: substituting t=φ(u)t = \varphi(u) with φ′>0\varphi' > 0 changes ∥r′∥ dt\lVert \mathbf{r}' \rVert\,dt into ∥(r∘φ)′(u)∥ du\lVert (\mathbf{r} \circ \varphi)'(u) \rVert\,du by the chain rule, so the integral is unchanged.

Reparametrising by arc length

The arc length function measures distance travelled from t=at = a:

s(t)=∫at∥r′(u)∥ du,sodsdt=∥r′(t)∥s(t) = \int_a^t \lVert \mathbf{r}'(u) \rVert\,du, \qquad \text{so} \quad \frac{ds}{dt} = \lVert \mathbf{r}'(t) \rVert

For a smooth curve ds/dt>0ds/dt > 0, so ss is strictly increasing and has an inverse t=t(s)t = t(s). Then r(t(s))\mathbf{r}(t(s)) is the arc-length parametrisation: by the chain rule ∥dr/ds∥=∥r′(t)∥⋅dt/ds=1\lVert d\mathbf{r}/ds \rVert = \lVert \mathbf{r}'(t) \rVert \cdot dt/ds = 1. The point moves at unit speed and the parameter ss literally is the distance along the curve. It is intrinsic: two people who parametrise the same curve differently (from the same start point and in the same direction) get the same r(s)\mathbf{r}(s).

Curvature

The unit tangent T=r′/∥r′∥\mathbf{T} = \mathbf{r}'/\lVert \mathbf{r}' \rVert has constant length, so it can only turn. Curvature measures how fast it turns per unit of distance:

κ=∥dTds∥\kappa = \left\lVert \frac{d\mathbf{T}}{ds} \right\rVert

Three working formulas:

κ(t)=∥T′(t)∥∥r′(t)∥(chain rule: dT/ds=T′/(ds/dt))κ(t)=∥r′(t)×r′′(t)∥∥r′(t)∥3(no square roots inside T needed)κ(x)=∣f′′(x)∣(1+f′(x)2)3/2(plane graph y=f(x))\begin{aligned} \kappa(t) &= \frac{\lVert \mathbf{T}'(t) \rVert}{\lVert \mathbf{r}'(t) \rVert} && \text{(chain rule: } d\mathbf{T}/ds = \mathbf{T}' / (ds/dt)\text{)} \\ \kappa(t) &= \frac{\lVert \mathbf{r}'(t) \times \mathbf{r}''(t) \rVert}{\lVert \mathbf{r}'(t) \rVert^3} && \text{(no square roots inside } \mathbf{T} \text{ needed)} \\ \kappa(x) &= \frac{\lvert f''(x) \rvert}{(1 + f'(x)^2)^{3/2}} && \text{(plane graph } y = f(x)\text{)} \end{aligned}

Proof of the cross-product formula. Write v=ds/dt=∥r′∥v = ds/dt = \lVert \mathbf{r}' \rVert, so r′=vT\mathbf{r}' = v\mathbf{T}. Differentiate: r′′=v′T+vT′\mathbf{r}'' = v'\mathbf{T} + v\mathbf{T}'. Then

r′×r′′=vT×(v′T+vT′)=vv′(T×T)+v2(T×T′)=v2(T×T′)\mathbf{r}' \times \mathbf{r}'' = v\mathbf{T} \times (v'\mathbf{T} + v\mathbf{T}') = vv'(\mathbf{T} \times \mathbf{T}) + v^2(\mathbf{T} \times \mathbf{T}') = v^2(\mathbf{T} \times \mathbf{T}')

T\mathbf{T} has constant length, so T′⊥T\mathbf{T}' \perp \mathbf{T} (previous lesson), and ∥T×T′∥=∥T∥∥T′∥=∥T′∥\lVert \mathbf{T} \times \mathbf{T}' \rVert = \lVert \mathbf{T} \rVert \lVert \mathbf{T}' \rVert = \lVert \mathbf{T}' \rVert. Hence ∥r′×r′′∥=v2∥T′∥=v2⋅κv=κv3\lVert \mathbf{r}' \times \mathbf{r}'' \rVert = v^2 \lVert \mathbf{T}' \rVert = v^2 \cdot \kappa v = \kappa v^3, which is the formula.

Sanity checks: a line has T\mathbf{T} constant, so κ=0\kappa = 0. A circle of radius aa has κ=1/a\kappa = 1/a: tight circles bend sharply, big ones barely.

The Frenet frame and torsion

Where κ≠0\kappa \ne 0, define

N=T′∥T′∥principal unit normal (points toward the inside of the bend)B=T×Nbinormal\begin{aligned} \mathbf{N} &= \frac{\mathbf{T}'}{\lVert \mathbf{T}' \rVert} && \text{principal unit normal (points toward the inside of the bend)} \\ \mathbf{B} &= \mathbf{T} \times \mathbf{N} && \text{binormal} \end{aligned}

T\mathbf{T}, N\mathbf{N} and B\mathbf{B} are mutually perpendicular unit vectors, a right-handed frame at every point. The osculating plane is spanned by T\mathbf{T} and N\mathbf{N} (the plane the curve "momentarily lies in"); the osculating circle lies in that plane, on the N\mathbf{N} side, with radius 1/κ1/\kappa, and matches the curve's position, tangent and curvature. B\mathbf{B} is perpendicular to the osculating plane, and the rate at which it tips measures how the curve leaves the plane. Since dB/dsd\mathbf{B}/ds is parallel to N\mathbf{N}, one defines the torsion τ\tau by dB/ds=−τNd\mathbf{B}/ds = -\tau\mathbf{N}. The Frenet–Serret formulas describe the whole frame's motion:

dTds=κNdNds=−κT+τBdBds=−τN\begin{aligned} \frac{d\mathbf{T}}{ds} &= \kappa\mathbf{N} \\ \frac{d\mathbf{N}}{ds} &= -\kappa\mathbf{T} + \tau\mathbf{B} \\ \frac{d\mathbf{B}}{ds} &= -\tau\mathbf{N} \end{aligned}
τ=(r′×r′′)⋅r′′′∥r′×r′′∥2\tau = \frac{(\mathbf{r}' \times \mathbf{r}'') \cdot \mathbf{r}'''}{\lVert \mathbf{r}' \times \mathbf{r}'' \rVert^2}

A plane curve has τ=0\tau = 0. By the fundamental theorem of curves, κ(s)\kappa(s) and τ(s)\tau(s) determine a curve up to a rigid motion: they are its "DNA".

python · try it yourself
import sympy as sp

t = sp.symbols("t", real=True)
s = sp.symbols("s", positive=True)
r = sp.Matrix([4 * sp.cos(t), 4 * sp.sin(t), 3 * t])     # helix: radius 4, rise 3 per radian

d1, d2, d3 = r.diff(t), r.diff(t, 2), r.diff(t, 3)
speed = sp.simplify(d1.norm())
print("speed |r'| =", speed, "  length of one turn =", sp.integrate(speed, (t, 0, 2 * sp.pi)))

rs = r.subs(t, s / speed)                                   # s = 5t, so t = s/5
print("r(s) =", list(rs), "  |dr/ds| =", sp.simplify(rs.diff(s).norm()))

c = d1.cross(d2)
kappa = sp.simplify(c.norm() / speed**3)
tau = sp.simplify(c.dot(d3) / c.norm()**2)
print("curvature =", kappa, "  torsion =", tau)
speed |r'| = 5   length of one turn = 10*pi
r(s) = [4*cos(s/5), 4*sin(s/5), 3*s/5]   |dr/ds| = 1
curvature = 4/25   torsion = 3/25

For a helix ⟨acos⁡t,asin⁡t,ct⟩\langle a\cos t, a\sin t, ct \rangle the same computation gives κ=a/(a2+c2)\kappa = a/(a^2 + c^2) and τ=c/(a2+c2)\tau = c/(a^2 + c^2), both constant. Note κ=4/25\kappa = 4/25 is less than the 1/41/4 of the circle it winds around: the climb straightens it out.

Constant-speed motion along a spline

Spline parameters are not distances. A cubic Bézier curve evaluated at evenly spaced tt gives points bunched where the curve is slow. The fix is to tabulate s(t)s(t) numerically and invert it:

python · try it yourself
import numpy as np

P = np.array([[0, 0], [1, 3], [5, 3], [6, 0]], dtype=float)   # control points
def bez(t):
    t = np.asarray(t)[:, None]
    return (1-t)**3*P[0] + 3*(1-t)**2*t*P[1] + 3*(1-t)*t**2*P[2] + t**3*P[3]

ts = np.linspace(0, 1, 2001)
pts = bez(ts)
seg = np.linalg.norm(np.diff(pts, axis=0), axis=1)
s = np.concatenate([[0], np.cumsum(seg)])                     # arc-length table s(t)
print("curve length ≈", round(float(s[-1]), 4))

def gaps(t_values):
    q = bez(t_values)
    return np.round(np.linalg.norm(np.diff(q, axis=0), axis=1), 3)

print("even t  -> step lengths:", gaps(np.linspace(0, 1, 6)))
t_even_s = np.interp(np.linspace(0, s[-1], 6), s, ts)         # invert s(t)
print("even s  -> step lengths:", gaps(t_even_s))
curve length ≈ 8.0303
even t  -> step lengths: [1.705 1.525 1.488 1.525 1.705]
even s  -> step lengths: [1.591 1.588 1.588 1.588 1.591]

With equal tt-steps the chord lengths range from 1.488 to 1.705, about 15% apart. After inverting the table each step covers the same arc, 8.0303/5≈1.6068.0303/5 \approx 1.606, and the chords agree to within 0.003; they are a little shorter than 1.606 because a chord cuts across the bend, most where the curve bends most (the middle).

Clothoids: curvature that grows linearly

Going straight from a road into a circular bend would make κ\kappa jump from 0 to 1/R1/R, so the steering wheel would have to snap instantly. Highways and railways use a transition curve whose curvature grows in proportion to distance, κ(s)=s/A2\kappa(s) = s/A^2, the clothoid (Euler spiral). With heading angle θ(s)=∫κ ds=s2/(2A2)\theta(s) = \int \kappa\,ds = s^2/(2A^2), the curve is

x(s)=∫0scos⁡(u22A2)du,y(s)=∫0ssin⁡(u22A2)dux(s) = \int_0^s \cos\left(\frac{u^2}{2A^2}\right) du, \qquad y(s) = \int_0^s \sin\left(\frac{u^2}{2A^2}\right) du

(Fresnel integrals). Building a curve from its curvature and checking it:

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

A = 1.0
s = np.linspace(0, 2.5, 5001)
theta = s**2 / (2 * A**2)                      # heading = integral of kappa
ds = s[1] - s[0]
x = np.concatenate([[0], np.cumsum((np.cos(theta[1:]) + np.cos(theta[:-1])) / 2 * ds)])
y = np.concatenate([[0], np.cumsum((np.sin(theta[1:]) + np.sin(theta[:-1])) / 2 * ds)])

dx, dy = np.gradient(x, s), np.gradient(y, s)
ddx, ddy = np.gradient(dx, s), np.gradient(dy, s)
kappa = np.abs(dx * ddy - dy * ddx) / (dx**2 + dy**2) ** 1.5
for si in [0.5, 1.0, 2.0]:
    i = int(round(si / ds))
    print(f"s = {si}: measured curvature {kappa[i]:.4f}  (target {si / A**2})")

plt.figure(figsize=(6, 4))
plt.plot(x, y, color="crimson"); plt.axis("equal")
plt.title("Clothoid: curvature grows linearly with distance"); plt.xlabel("x"); plt.ylabel("y")
s = 0.5: measured curvature 0.5000  (target 0.5)
s = 1.0: measured curvature 1.0000  (target 1.0)
s = 2.0: measured curvature 2.0000  (target 2.0)

The plane formula κ=∣x′y′′−y′x′′∣/(x′2+y′2)3/2\kappa = \lvert x'y'' - y'x'' \rvert / (x'^2 + y'^2)^{3/2} (the zz-component of the cross-product formula) recovers the designed curvature.

In software

  • Camera rails and follow cams. A camera on a spline is oriented with a moving frame. The Frenet frame (T\mathbf{T} forward, N\mathbf{N} toward the bend, B\mathbf{B} "up") is the textbook choice, but N\mathbf{N} flips wherever κ\kappa passes through 0 (inflection points) and is undefined on straight parts, so tools often use a rotation-minimising (parallel-transport) frame instead, which follows T\mathbf{T} without twisting.
  • Road and track design. Racing games, railway planners and roller-coaster software specify κ(s)\kappa(s) piecewise (straight, clothoid, arc, clothoid, straight) because lateral acceleration is v2κv^2\kappa. A linear κ(s)\kappa(s) means a linear ramp of sideways force, which riders and drivers find comfortable.
  • Constant-speed animation. Moving an object at a fixed speed along a Catmull-Rom or Bézier path needs the arc-length table above; engines like Unity's Splines package and Unreal's spline components build such lookup tables internally.
  • Path planning. Car-like robots cannot follow corners with κ=∞\kappa = \infty; planners produce paths with bounded and continuous curvature (Dubins and clothoid-based paths).
  • Geometry processing. Curvature of a sampled curve (discrete κ\kappa from three neighbouring points) is used for corner detection in sketches, fonts and GPS track simplification.

Exercises

Exercise 1: An exact length

Find the length of r(t)=⟨2t,t2,ln⁡t⟩\mathbf{r}(t) = \langle 2t, t^2, \ln t \rangle for 1≤t≤e1 \le t \le e.

Answer

L=e2≈7.389L = e^2 \approx 7.389.

Solution
r′(t)=⟨2,2t,1/t⟩∥r′∥2=4+4t2+1/t2=(2t+1/t)2(since (2t+1/t)2=4t2+4+1/t2)L=∫1e(2t+1/t) dt=[t2+ln⁡t]1e=(e2+1)−(1+0)=e2\begin{aligned} \mathbf{r}'(t) &= \langle 2, 2t, 1/t \rangle \\ \lVert \mathbf{r}' \rVert^2 &= 4 + 4t^2 + 1/t^2 = (2t + 1/t)^2 && \text{(since } (2t + 1/t)^2 = 4t^2 + 4 + 1/t^2\text{)} \\ L &= \int_1^e (2t + 1/t)\,dt = \Big[t^2 + \ln t\Big]_1^e = (e^2 + 1) - (1 + 0) = e^2 \end{aligned}

Exercise 2: Curvature of a graph

Find the curvature of y=x3y = x^3 at x=1x = 1 and the radius of the osculating circle there.

Answer

κ=6/103/2≈0.1897\kappa = 6/10^{3/2} \approx 0.1897; radius ≈5.270\approx 5.270.

Solution
f′=3x2=3,f′′=6x=6at x=1κ=6(1+9)3/2=631.623≈0.1897radius=1/κ≈5.270\begin{aligned} f' &= 3x^2 = 3, \quad f'' = 6x = 6 \quad \text{at } x = 1 \\ \kappa &= \frac{6}{(1 + 9)^{3/2}} = \frac{6}{31.623} \approx 0.1897 \\ \text{radius} &= 1/\kappa \approx 5.270 \end{aligned}

Exercise 3: Arc-length parametrisation, κ\kappa and τ\tau

Reparametrise r(t)=⟨5cos⁡t,5sin⁡t,12t⟩\mathbf{r}(t) = \langle 5\cos t, 5\sin t, 12t \rangle by arc length from t=0t = 0, and find κ\kappa and τ\tau.

Answer

r(s)=⟨5cos⁡(s/13),5sin⁡(s/13),12s/13⟩\mathbf{r}(s) = \langle 5\cos(s/13), 5\sin(s/13), 12s/13 \rangle; κ=5/169\kappa = 5/169, τ=12/169\tau = 12/169.

Solution
∥r′∥=25sin⁡2t+25cos⁡2t+144=13,so s=13t,t=s/13helix formulas with a=5, c=12, a2+c2=169:κ=5/169≈0.0296,τ=12/169≈0.0710\begin{aligned} &\lVert \mathbf{r}' \rVert = \sqrt{25\sin^2 t + 25\cos^2 t + 144} = 13, \quad \text{so } s = 13t, \quad t = s/13 \\ &\text{helix formulas with } a = 5,\ c = 12,\ a^2 + c^2 = 169\text{:} \\ &\kappa = 5/169 \approx 0.0296, \qquad \tau = 12/169 \approx 0.0710 \end{aligned}

Exercise 4: Where is an ellipse sharpest? (code)

For the ellipse r(t)=⟨4cos⁡t,2sin⁡t⟩\mathbf{r}(t) = \langle 4\cos t, 2\sin t \rangle, compute κ(t)\kappa(t) and find its largest and smallest values.

Answer

κ(t)=8/(16sin⁡2t+4cos⁡2t)3/2\kappa(t) = 8/(16\sin^2 t + 4\cos^2 t)^{3/2}; maximum 1 at t=0,πt = 0, \pi (ends of the long axis), minimum 0.125 at t=π/2,3π/2t = \pi/2, 3\pi/2.

Solution
x′=−4sin⁡t, y′=2cos⁡t, x′′=−4cos⁡t, y′′=−2sin⁡tx′y′′−y′x′′=8sin⁡2t+8cos⁡2t=8κ=8(16sin⁡2t+4cos⁡2t)3/2t=0:843/2=88=1t=π/2:8163/2=864=0.125\begin{aligned} &x' = -4\sin t,\ y' = 2\cos t,\ x'' = -4\cos t,\ y'' = -2\sin t \\ &x'y'' - y'x'' = 8\sin^2 t + 8\cos^2 t = 8 \\ &\kappa = \frac{8}{(16\sin^2 t + 4\cos^2 t)^{3/2}} \\ &t = 0\text{:} \quad \frac{8}{4^{3/2}} = \frac{8}{8} = 1 \\ &t = \pi/2\text{:} \quad \frac{8}{16^{3/2}} = \frac{8}{64} = 0.125 \end{aligned}
python · try it yourself
import numpy as np
t = np.linspace(0, 2 * np.pi, 100001)
k = 8 / (16 * np.sin(t)**2 + 4 * np.cos(t)**2) ** 1.5
print("max", round(float(k.max()), 4), "at t =", round(float(t[k.argmax()]), 4))
print("min", round(float(k.min()), 4), "at t =", round(float(t[k.argmin()]), 4))
max 1.0 at t = 0.0
min 0.125 at t = 1.5708

Exercise 5: Frenet frame at a point

For r(t)=⟨t,t2/2,t3/3⟩\mathbf{r}(t) = \langle t, t^2/2, t^3/3 \rangle, find T\mathbf{T}, N\mathbf{N}, B\mathbf{B}, κ\kappa and τ\tau at t=0t = 0.

Answer

T=⟨1,0,0⟩\mathbf{T} = \langle 1, 0, 0 \rangle, N=⟨0,1,0⟩\mathbf{N} = \langle 0, 1, 0 \rangle, B=⟨0,0,1⟩\mathbf{B} = \langle 0, 0, 1 \rangle, κ=1\kappa = 1, τ=2\tau = 2.

Solution
r′=⟨1,t,t2⟩→⟨1,0,0⟩r′′=⟨0,1,2t⟩→⟨0,1,0⟩r′′′=⟨0,0,2⟩r′×r′′=⟨0,0,1⟩κ=∥r′×r′′∥∥r′∥3=1τ=(r′×r′′)⋅r′′′∥r′×r′′∥2=21=2\begin{aligned} &\mathbf{r}' = \langle 1, t, t^2 \rangle \to \langle 1, 0, 0 \rangle \qquad \mathbf{r}'' = \langle 0, 1, 2t \rangle \to \langle 0, 1, 0 \rangle \qquad \mathbf{r}''' = \langle 0, 0, 2 \rangle \\ &\mathbf{r}' \times \mathbf{r}'' = \langle 0, 0, 1 \rangle \\ &\kappa = \frac{\lVert \mathbf{r}' \times \mathbf{r}'' \rVert}{\lVert \mathbf{r}' \rVert^3} = 1 \\ &\tau = \frac{(\mathbf{r}' \times \mathbf{r}'') \cdot \mathbf{r}'''}{\lVert \mathbf{r}' \times \mathbf{r}'' \rVert^2} = \frac{2}{1} = 2 \end{aligned}

At t=0t = 0 the speed is momentarily stationary (d∥r′∥/dt=0d\lVert \mathbf{r}' \rVert/dt = 0), so r′′\mathbf{r}'' is perpendicular to r′\mathbf{r}' and N=r′′/∥r′′∥=⟨0,1,0⟩\mathbf{N} = \mathbf{r}''/\lVert \mathbf{r}'' \rVert = \langle 0, 1, 0 \rangle; B=T×N=⟨0,0,1⟩\mathbf{B} = \mathbf{T} \times \mathbf{N} = \langle 0, 0, 1 \rangle.

python · try it yourself
import sympy as sp
t = sp.symbols("t")
r = sp.Matrix([t, t**2/2, t**3/3])
d1, d2, d3 = [r.diff(t, k).subs(t, 0) for k in (1, 2, 3)]
c = d1.cross(d2)
print("kappa =", c.norm() / d1.norm()**3, " tau =", c.dot(d3) / c.norm()**2)
kappa = 1  tau = 2

Test yourself

A curve is parametrised by arc length ss. What is ∥dr/ds∥\lVert d\mathbf{r}/ds \rVert?

  1. It depends on the curve
  2. 1
  3. κ\kappa
  4. The length of the curve

Which formula gives the curvature of r(t)\mathbf{r}(t) for an arbitrary smooth parametrisation?

  1. ∥r′′(t)∥\lVert \mathbf{r}''(t) \rVert
  2. ∥r′(t)×r′′(t)∥/∥r′(t)∥3\lVert \mathbf{r}'(t) \times \mathbf{r}''(t) \rVert / \lVert \mathbf{r}'(t) \rVert^3
  3. ∥r′(t)∥/∥r′′(t)∥\lVert \mathbf{r}'(t) \rVert / \lVert \mathbf{r}''(t) \rVert
  4. r′(t)⋅r′′(t)\mathbf{r}'(t) \cdot \mathbf{r}''(t)

Why do roads and railways use clothoids between a straight section and a circular arc?

  1. They are shorter than arcs
  2. Their torsion is constant
  3. Their curvature grows linearly with distance, so the sideways acceleration v2κv^2\kappa ramps up smoothly
  4. They have zero curvature everywhere