summaryrefslogtreecommitdiff
path: root/source/know/concept/curvature/index.md
blob: 40bd1067b10dbebd719e913cb764564abfb6dd3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
---
title: "Curvature"
date: 2021-03-07
categories:
- Mathematics
layout: "concept"
---

Given a curve or surface, its **curvature** $\kappa$
describes how sharply it is bending at a given point.
It is defined as the inverse of the **radius of curvature** $R$,
which is the radius of the tangent circle
that **osculates** (i.e. best approximates)
the curve/surface at that point:

$$\begin{aligned}
    \kappa = \frac{1}{R}
\end{aligned}$$

Typically, $\kappa$ is positive for convex curves/surfaces,
and negative for concave ones, although this distinction is somewhat arbitrary.
Below, we calculate the curvature in several general cases.


## 2D height functions

We start with a specialized case: height functions,
where one coordinate is a function of the other one (2D) or two (3D).
In this case, we can use the
[calculus of variations](/know/concept/calculus-of-variations/)
to find the curvature.

This approach relies on the fact that a circle
has the highest area-perimeter ratio of any 2D shape,
and a sphere has the highest volume-surface ratio of any 3D body.
By the definition of curvature, these shapes have constant $\kappa$.

We will thus minimize the perimeter/surface while keeping the area/volume fixed,
which will give us a shape with constant curvature,
and from that we can extrapolate an expression for $\kappa$.

In 2D, for a single-variable height function $h(x)$,
the length of a small segment of the curve is:

$$\begin{aligned}
    \sqrt{\dd{x}^2 + \dd{h}^2}
    = \dd{x} \sqrt{\Big( \dv{x}{x} \Big)^2 + \Big( \dv{h}{x} \Big)^2}
    = \dd{x} \sqrt{1 + h_x^2}
\end{aligned}$$

Which leads us to define the following Lagrangian $\mathcal{L}$
describing the "energy cost" of the curve:

$$\begin{aligned}
    \mathcal{L}
    = \sqrt{1 + h_x^2}
\end{aligned}$$

Furthermore,
we demand that the area under the curve (i.e. the "volume") is constant:

$$\begin{aligned}
    V
    = \int_{x_0}^{x_1} h(x) \dd{x}
\end{aligned}$$

By putting these things together,
we arrive at the following energy functional $E[h]$,
where $\kappa$ is an ominously-named [Lagrange multiplier](/know/concept/lagrange-multiplier/):

$$\begin{aligned}
    E[h]
    = \int (\mathcal{L} + \kappa h) \dd{x}
\end{aligned}$$

Minimizing this functional leads to the following
Lagrange equation of the first kind:

$$\begin{aligned}
    0
    = \pdv{\mathcal{L}}{h} - \dv{}{x}\Big( \pdv{\mathcal{L}}{h_x} \Big) + \kappa
\end{aligned}$$

We evaluate the terms of this equation
to arrive at an expression for the curvature $\kappa$:

$$\begin{aligned}
    \boxed{
        \kappa
        = \frac{h_{xx}}{\big(1 + h_x^2\big)^{3/2}}
    }
\end{aligned}$$

In this optimization problem, $\kappa$ is a constant,
but in fact the statement above is valid for variable curvatures too,
in which case $\kappa$ is a function of $x$.


## 2D in general

We can parametrically describe an arbitrary plane curve
as a function of the arc length $s$:

$$\begin{aligned}
    \big( x(s), y(s) \big)
    \qquad \mathrm{where} \qquad
    \dd{s}^2 = \dd{x}^2 + \dd{y}^2
\end{aligned}$$

If we choose the horizontal $x$-axis as a reference,
we can furthermore define the **elevation angle** $\theta(s)$
as the angle between the reference and the curve's tangent vector $\vu{t}$:

$$\begin{aligned}
    \vu{t}
    = \big( x_s(s), y_s(s) \big)
    = \big( \cos\theta(s), \sin\theta(s) \big)
\end{aligned}$$

Where $x_s(s) = \idv{x}{s}$.
The curvature $\kappa$ is defined as
the $s$-derivative of this elevation angle:

$$\begin{aligned}
    \kappa
    = \dv{\theta}{s}
    = \theta_s(s)
\end{aligned}$$

We have two ways of writing $\vu{t}$:
using the derivatives $x_s$ and $y_s$,
or the elevation angle $\theta$.
Now, let us take the $s$-derivative of both expressions,
and equate them:

$$\begin{aligned}
    \big( x_{ss}, y_{ss} \big)
    = \dv{\vu{t}}{s}
    = \theta_s \: \big( \!-\!\sin\theta, \cos\theta \big)
    = \kappa \big( \!-\!y_s, x_s \big)
\end{aligned}$$

$$\begin{aligned}
    x_{ss} = - \kappa y_s
    \qquad
    y_{ss} = \kappa x_s
\end{aligned}$$

We multiply these equation by $y_s$ and $x_s$, respectively,
and subtract the first from the last:

$$\begin{aligned}
    y_{ss} x_s - x_{ss} y_s = \kappa x_s^2 + \kappa y_s^2
\end{aligned}$$

Isolating this for $\kappa$ and using the fact that $x_s^2 + y_s^2 = 1$
thanks to $s$ being the arc length:

$$\begin{aligned}
    \kappa
    = \frac{y_{ss} x_s - x_{ss} y_s}{x_s^2 + y_s^2}
    = y_{ss} x_s - x_{ss} y_s
\end{aligned}$$

While this result is correct,
we would like to generalize it to cases where the curve
is parametrized by some other $t$, not necessarily the arc length.
Let prime denote the $t$-derivative:

$$\begin{aligned}
    x_s
    = x' t_s
    \qquad
    x_{ss}
    = x'' t_s^2 + x' t_{ss}
    \\
    y_s
    = y' t_s
    \qquad \:
    y_{ss}
    = y'' t_s^2 + x' t_{ss}
\end{aligned}$$

By inserting these expression into the earlier formula for $\kappa$, we find:

$$\begin{aligned}
    \kappa
    = y_{ss} x_s - x_{ss} y_s
    &= x' t_s (y'' t_s^2 + y' t_{ss}) - y' t_s (x'' t_s^2 + x' t_{ss})
    \\
    &= t_s t_{ss} (x' y' - y' x') + t_s^3 (x' y'' - y' x'')
    \\
    &= t_s^3 (x' y'' - y' x'')
\end{aligned}$$

Since $x_s^2 + y_s^2 = 1$, we know that $(x')^2 + (y')^2 = 1 / t_s^2$,
which leads us to the following general expression for
the curvature $\kappa$ of a plane curve:

$$\begin{aligned}
    \boxed{
        \kappa
        = \frac{y'' x' - x'' y'}{\big((x')^2 + (y')^2\big)^{3/2}}
    }
\end{aligned}$$

If the curve happens to be a height function, i.e. $y(x)$,
then $x' = 1$ and $x'' = 0$, and we arrive at our previous result again.


## 3D height functions

The generalization to a 3D height function $h(x, y)$ is straightforward:
the cost of an infinitesimal portion of the surface is as follows,
using the same reasoning as before:

$$\begin{aligned}
    \mathcal{L}
    = \sqrt{1 + h_x^2 + h_y^2}
\end{aligned}$$

Keeping the volume $V$ constant,
we get the following energy functional $E$ to minimize:

$$\begin{aligned}
    E[h]
    = \iint (\mathcal{L} + \lambda h) \dd{x} \dd{y}
\end{aligned}$$

Which gives us an Euler-Lagrange equation
involving the Lagrange multiplier $\lambda$:

$$\begin{aligned}
    0
    = \pdv{\mathcal{L}}{h} - \dv{}{x}\Big( \pdv{\mathcal{L}}{h_x} \Big) - \dv{}{y}\Big( \pdv{\mathcal{L}}{h_y} \Big) + \lambda
\end{aligned}$$

Inserting $\mathcal{L}$ into this and evaluating all the derivatives
yields a result for the (variable) curvature:

$$\begin{aligned}
    \boxed{
        \lambda
        = \kappa_1 + \kappa_2
        = \frac{(1 + h_y^2) h_{xx} - 2 h_x h_y h_{xy} + (1 + h_x^2) h_{yy}}{\big(1 + h_x^2 + h_y^2\big)^{3/2}}
    }
\end{aligned}$$

What are $\kappa_1$ and $\kappa_2$?
Well, the problem in 3D is that the curvature of an osculating circle
depends on the orientation of that circle.
The **principal curvatures** $\kappa_1$ and $\kappa_2$
are the largest and smallest curvatures at a given point,
but finding their values and the corresponding **principal directions** is not so easy.
Fortunately, in practice, we are often only interested in their sum:

$$\begin{aligned}
    \lambda
    = \kappa_1 + \kappa_2
    = \frac{1}{R_1} + \frac{1}{R_2}
\end{aligned}$$

These **principal radii** $R_1$ and $R_2$ are important
for e.g. the [Young-Laplace law](/know/concept/young-laplace-law/).


## 3D in general

To find a general expression for the mean curvature of an arbitrary surface,
we "cut off" a small part of the surface that we can regard as a height function.
We call the "cutting" reference plane $(x, y)$,
and the surface it describes $h(x, y)$.
We then define the unit tangent vectors $\vu{t}_x$ and $\vu{t}_y$
to be parallel to the $x$-axis and $y$-axis, respectively:

$$\begin{aligned}
    \vu{t}_x
    = \frac{1}{\sqrt{1 + (h_x)^2}}
    \begin{bmatrix}
        1 \\ 0 \\ h_x
    \end{bmatrix}
    \qquad
    \vu{t}_y
    = \frac{1}{\sqrt{1 + (h_y)^2}}
    \begin{bmatrix}
        0 \\ 1 \\ h_y
    \end{bmatrix}
\end{aligned}$$

Since they were chosen to lie along the axes,
these vectors are not necessarily orthogonal,
so we need to normalize the resulting normal vector $\vu{n}$:

$$\begin{aligned}
    \vu{n}
    = \vu{t}_x \cross \vu{t}_y
    = \frac{1}{\sqrt{1 + (h_x)^2 + (h_y)^2}}
    \begin{bmatrix}
        - h_x \\ - h_y \\ 1
    \end{bmatrix}
\end{aligned}$$

Let us take a look at the divergence of $\vu{n}$,
or to be precise, its *projection* onto the reference plane
(although this distinction is not really important for our purposes):

$$\begin{aligned}
    \nabla \cdot \vu{n}
    = - \dv{}{x}\bigg( \frac{h_x}{\sqrt{1 + (h_x)^2 + (h_y)^2}} \bigg) - \dv{}{y}\bigg( \frac{h_y}{\sqrt{1 + (h_x)^2 + (h_y)^2}} \bigg)
\end{aligned}$$

Compare this with the expression for $\lambda$ we found earlier,
with the help of variational calculus:

$$\begin{aligned}
    \lambda
    &= \dv{}{x}\Big( \pdv{\mathcal{L}}{h_x} \Big) + \dv{}{y}\Big( \pdv{\mathcal{L}}{h_y} \Big)
    \\
    &= \dv{}{x}\bigg( \frac{h_x}{\sqrt{1 + (h_x)^2 + (h_y)^2}} \bigg) + \dv{}{y}\bigg( \frac{h_y}{\sqrt{1 + (h_x)^2 + (h_y)^2}} \bigg)
\end{aligned}$$

The similarity is clearly visible.
This leads us to the following general expression:

$$\begin{aligned}
    \boxed{
        \kappa_1 + \kappa_2
        = - \nabla \cdot \vu{n}
    }
\end{aligned}$$

A useful property is that
the principal directions of curvature are always orthogonal.
To show this, consider the most general second-order approximating surface,
in polar coordinates:

$$\begin{aligned}
    h(x, y)
    &= \frac{1}{2} a x^2 + \frac{1}{2} b y^2 + c x y
    \\
    &= \frac{1}{2} a r^2 \cos^2\varphi + \frac{1}{2} b r^2 \sin^2\varphi + c r^2 \cos\varphi \sin\varphi
\end{aligned}$$

Sufficiently close to the extremum, where $h_x$ and $h_y$ are negligible,
the curvature along a certain direction $\varphi$ is given by
our earlier formula for a 2D height function:

$$\begin{aligned}
    \kappa(\varphi)
    \approx \pdvn{2}{h}{r}
    = a \cos^2\varphi + b \sin^2\varphi + c \sin(2 \varphi)
\end{aligned}$$

To find the extremes of $\kappa$,
we differentiate with respect to $\varphi$ and demand that it is zero:

$$\begin{aligned}
    0
    &= - 2 a \cos\varphi \sin\varphi + 2 b \sin\varphi \cos\varphi + 2 c \cos(2 \varphi)
    \\
    &= - a \sin(2 \varphi) + b \sin(2 \varphi) + 2 c \cos(2 \varphi)
\end{aligned}$$

After rearranging this a bit, we arrive at the following transcendental equation:

$$\begin{aligned}
    \frac{2 c}{a - b}
    = \frac{\sin(2 \varphi)}{\cos(2 \varphi)}
    = \tan(2 \varphi)
\end{aligned}$$

Since the $\tan$ function is $\pi$-periodic,
this has two solutions, $\varphi_0$ and $\varphi_0 + \pi/2$,
which are clearly orthogonal,
hence the principal directions are at an angle of $\pi/2$.

Finally, it is also worth mentioning that
the principal directions always lie in planes
containing the normal of the surface.



## References
1.  T. Bohr,
    *Curvature of plane curves and surfaces*,
    2020, unpublished.
2.  B. Lautrup,
    *Physics of continuous matter: exotic and everyday phenomena in the macroscopic world*, 2nd edition,
    CRC Press.