Circle of Curvature

Numerical Methods

Source inspiration: (Mathew 2000-2019).

Curvature for y = f(x)

NoteDefinition - Curvature and Radius

For a twice-differentiable curve \(y=f(x)\),

\[ \kappa(x)=\frac{f''(x)}{\left(1+\left(f'(x)\right)^2\right)^{3/2}}, \qquad \rho(x)=\frac{\left(1+\left(f'(x)\right)^2\right)^{3/2}}{f''(x)}. ag{1} \]

Geometrically, \(|\rho(x)|\) is the radius of the osculating circle.

Given \(y=f(x)\), the unit tangent and unit normal vectors are

\[ \widehat{\mathbf{u}}(x)=\frac{(1,f'(x))}{\sqrt{1+\left(f'(x)\right)^2}}, \qquad \widehat{\mathbf{n}}(x)=\frac{(-f'(x),1)}{\sqrt{1+\left(f'(x)\right)^2}}. ag{2} \]

TipTheorem - Center of Curvature for y = f(x)

At the point \((x,f(x))\), the center \((a,b)\) of the osculating circle is

\[ a(x)=x-\frac{f'(x)}{f''(x)}-\frac{\left(f'(x)\right)^3}{f''(x)}, ag{3} \]

\[ b(x)=f(x)+\frac{1}{f''(x)}+\frac{\left(f'(x)\right)^2}{f''(x)}. ag{4} \]

ImportantOsculating Circle Equation

Once \((a,b)\) and \(r=|\rho(x)|\) are known, the osculating circle is

\[ (X-a)^2+(Y-b)^2=r^2. ag{5} \]

Example 1 - Parabola at the origin

Use \(y=f(x)=x^2\) at \((0,0)\).

Step 1: Compute derivatives.

\[ f'(x)=2x,\qquad f''(x)=2. \]

Step 2: Curvature and radius.

\[ \kappa(0)=\frac{2}{(1+0)^{3/2}}=2, \qquad \rho(0)=\frac{(1+0)^{3/2}}{2}=\frac{1}{2}. \]

Step 3: Center of curvature.

\[ a(0)=0-0-0=0, \qquad b(0)=0+\frac{1}{2}+0=\frac{1}{2}. \]

The osculating circle is

\[ X^2+\left(Y-\frac{1}{2}\right)^2=\left(\frac{1}{2}\right)^2. \]

Verification:

Check Result
Point on circle \((0,0)\) gives \(0+(-\tfrac{1}{2})^2=\tfrac{1}{4}\)
Radius from center Distance from \((0,\tfrac{1}{2})\) to \((0,0)\) is \(\tfrac{1}{2}\)

Example 2 - Tangent, normal, and osculating circle at (1,1)

For \(y=x^2\) at \((1,1)\):

Step 1: Tangent and normal vectors.

\[ f'(1)=2, \qquad \widehat{\mathbf{u}}(1)=\frac{(1,2)}{\sqrt{5}}, \qquad \widehat{\mathbf{n}}(1)=\frac{(-2,1)}{\sqrt{5}}. \]

Step 2: Radius and center.

\[ \rho(1)=\frac{(1+2^2)^{3/2}}{2}=\frac{5\sqrt{5}}{2}. \]

\[ a(1)=1-\frac{2}{2}-\frac{2^3}{2}=-4, \qquad b(1)=1+\frac{1}{2}+\frac{2^2}{2}=\frac{7}{2}. \]

So the osculating circle is

\[ (X+4)^2+\left(Y-\frac{7}{2}\right)^2=\left(\frac{5\sqrt{5}}{2}\right)^2=\frac{125}{4}. \]

Verification:

Check Computation Status
Unit tangent length \(\|(1,2)/\sqrt{5}\|=1\) \(\checkmark\)
Orthogonality \((1,2)\cdot(-2,1)=-2+2=0\) \(\checkmark\)
Point on circle \((1+4)^2+(1-\tfrac{7}{2})^2=25+\tfrac{25}{4}=\tfrac{125}{4}\) \(\checkmark\)

Example 3 - Collocation circle and limit

For \(y=x^2\) at \((0,0)\), use the three points

\[ (-h,f(-h)),\ (0,f(0)),\ (h,f(h)). \]

Step 1: Write a circle equation.

\[ (X-a)^2+(Y-b)^2=r^2. \]

By symmetry, \(a=0\).

Step 2: Use \((0,0)\) and \((h,h^2)\).

\[ r^2=b^2, \]

\[ h^2+(h^2-b)^2=b^2. \]

Solve for \(b\):

\[ b=\frac{1+h^2}{2}, \qquad r=\frac{1+h^2}{2}. \]

Step 3: Take the limit.

\[ \lim_{h\to 0} b = \frac{1}{2}, \qquad \lim_{h\to 0} r = \frac{1}{2}. \]

So the collocation circle converges to the osculating circle from Example 1.

Verification:

Row Left-hand side Right-hand side
\((0,0)\) \((0-0)^2+(0-b)^2=b^2\) \(r^2=b^2\) \(\checkmark\)
\((h,h^2)\) \(h^2+(h^2-b)^2=\tfrac{(1+h^2)^2}{4}\) \(r^2=\tfrac{(1+h^2)^2}{4}\) \(\checkmark\)
\((-h,h^2)\) same computation by symmetry \(r^2\) \(\checkmark\)

For \(h=1,0.1,0.01\), the radii are \(1\), \(0.505\), and \(0.50005\), approaching \(0.5\).

Generalization to Parametric Curves

For a planar parametric curve

\[ x=f(t),\qquad y=g(t), \]

the radius is

\[ r(t)=\frac{\left(f'(t)^2+g'(t)^2\right)^{3/2}}{\left|f'(t)g''(t)-g'(t)f''(t)\right|}. ag{6} \]

and the center is

\[ \mathbf{c}(t)=\left\{ f(t)-\frac{g'(t)\left(f'(t)^2+g'(t)^2\right)}{f'(t)g''(t)-g'(t)f''(t)}, \ g(t)+\frac{f'(t)\left(f'(t)^2+g'(t)^2\right)}{f'(t)g''(t)-g'(t)f''(t) }\right\}. ag{7} \]

WarningOrientation Caveat

Without absolute values in the radius formula, reversing orientation can produce a negative signed radius. The geometric radius is always nonnegative.

Example 4 - Cardioid with counterclockwise orientation

Use

\[ x(t)=2\cos t-\cos(2t), \qquad y(t)=2\sin t-\sin(2t), \]

at \(t=\tfrac{\pi}{2},\tfrac{2\pi}{3},\pi\).

Using (6)-(7), the points, centers, and radii are:

\(t\) Point \((x,y)\) Center \((a,b)\) Radius \(r\)
\(\pi/2\) \((1,2)\) \((-1/3,2/3)\) \(4\sqrt{2}/3\)
\(2\pi/3\) \((-1/2,3\sqrt{3}/2)\) \((-1/2,\sqrt{3}/6)\) \(4\sqrt{3}/3\)
\(\pi\) \((-3,0)\) \((-1/3,0)\) \(8/3\)

Verification:

\(t\) Distance from center to point
\(\pi/2\) \(\sqrt{(1+\tfrac{1}{3})^2+(2-\tfrac{2}{3})^2}=\sqrt{\tfrac{32}{9}}=\tfrac{4\sqrt{2}}{3}\) \(\checkmark\)
\(2\pi/3\) \(\sqrt{0^2+\left(\tfrac{3\sqrt{3}}{2}-\tfrac{\sqrt{3}}{6}\right)^2}=\tfrac{4\sqrt{3}}{3}\) \(\checkmark\)
\(\pi\) \(\sqrt{(-3+\tfrac{1}{3})^2+0^2}=\tfrac{8}{3}\) \(\checkmark\)

Example 5 - Same cardioid with reversed orientation

Now parameterize as

\[ x(t)=2\cos(-t)-\cos(-2t), \qquad y(t)=2\sin(-t)-\sin(-2t), \]

and evaluate at \(t=\pi/3\).

At this point, \((x,y)=\left(\tfrac{3}{2},-\tfrac{\sqrt{3}}{2}\right)\) and the signed denominator \(f'(t)g''(t)-g'(t)f''(t)\) is negative, so:

\[ r_{\text{signed}}=-\frac{4}{3}, \qquad r=\left|r_{\text{signed}}\right|=\frac{4}{3}. \]

Using the center formula gives

\[ (a,b)=\left(\frac{1}{6},-\frac{\sqrt{3}}{2}\right). \]

Verification:

\[ \sqrt{\left(\frac{3}{2}-\frac{1}{6}\right)^2+ \left(-\frac{\sqrt{3}}{2}+\frac{\sqrt{3}}{2}\right)^2} =\frac{4}{3}=r. \]

References

Mathew, John H. 2000-2019. Numerical Analysis - Numerical Methods Modules. https://web.archive.org/web/20190808102217/http://mathfaculty.fullerton.edu/mathews/n2003/NumericalUndergradMod.html.