HomePublicationsProjectsBlogAbout

Parameterized Curves

May 21, 2022
Table of Content

Consider a smooth function γ:[a,b]CR2\gamma : [a, b] \rightarrow C \subset \R^2 or a curve. We can compute its length by

L(γ)=abγ(t)dtL(\gamma) = \int_a^b \| \gamma' (t) \| \text d t

where γ(t):=dγ/dt\gamma'(t) := \text d \gamma / \text d t is the velocity vector. We call it regular if its velocity never vanishes, i.e.,

t[a,b]:γ(t)0\forall t \in [a, b] : \gamma'(t) \ne \mathbf 0

Consider another curve γ~:[c,d]C\tilde \gamma : [c, d] \rightarrow C that has the same trace as γ\gamma . Said differently, these two curves look the same except we end up at different locations on the curves at same time step.

Circle with different parameterizations

Suppose we have a smooth map φ:[c,d][a,b]\varphi : [c, d] \rightarrow [a, b] with t~[c,d]:φ(t~)0\forall \tilde t \in [c, d] : \varphi'(\tilde t ) \ne \mathbf 0 . The condition of φ(t~)\varphi '(\tilde t) implies that φ\varphi is bijective. We then have γ~=γφ\tilde \gamma = \gamma \circ \varphi , and we call it a reparameterization of the parameterized curve γ\gamma.

With φ,\varphi, we can show that γ~\tilde \gamma is also regular

t~[c,d]:γ~(t~)0\forall \tilde t \in [c, d] : \tilde \gamma'(\tilde t) \ne \boldsymbol 0\quad

Proof: Using the chain rule, we have

γ~(t~)=γ(φ(t~))φ(t~)\begin{aligned} {\tilde \gamma'}(\tilde t) &= \gamma' (\varphi (\tilde t)) \cdot \varphi'(\tilde t) \end{aligned}

Because γ(t)\gamma(t) is regular, i.e., t[a,b]:γ(t)0\forall t \in [a, b]: \gamma' (t) \ne \mathbf 0 and φ(t~)>0\varphi'(\tilde t) > 0 by construction, we can conclude that

t~[c,b]:γ~(t~)0\forall \tilde t \in [c, b] : {\tilde\gamma'} (\tilde t) \ne \mathbf 0

and the length of the curve is invariant to parameterization; that is

L(γ)=L(γ~)L(\gamma) = L(\tilde \gamma)

Proof: Using the chain rule, we have

γ~(t~)=dγ~(t~)dt~=dγ(t)dtdtdt~=γ(t)φ(t~)\tilde \gamma' (\tilde t) = \frac{\text d \tilde \gamma (\tilde t ) }{\text d \tilde t } = \frac{\text d \gamma (t)} {\text d t} \frac{\text d t}{\text d \tilde t} = \gamma '(t) \varphi'(\tilde t)

and the

dt=φ(t~)dt~\text d t = \varphi'(\tilde t) \text d\tilde t

Therefore, we can show that

L(γ)=abγ(t)dt=φ1(a)φ1(b)γ(φ(t~))φ(t~)dt~=cdγ(φ(t~))φ(t~)dt~=cdγ(t~)dt~=L(γ~).\begin{aligned} L( \gamma) &= \int_a^b \| {\gamma'}(t) \| \text d t \\ &= \int_{\varphi^{-1}(a)}^{\varphi^{-1}(b)} \| \gamma'( \varphi (\tilde t)) \| \varphi'(\tilde t) \text d \tilde t \\ &= \int_c^d \| \gamma'( \varphi (\tilde t)) \varphi'(\tilde t) \| \text d \tilde t \\ &= \int_c^d \| {\gamma'}(\tilde t)\| \text d\tilde t \\ &= L(\tilde \gamma). \end{aligned}

The invariant property implies that there seems to be infinitely many parameterizations of a curve, and this could be problematic in practices. In following, we impose a constraint of the speed of the curve.

Unit Speed and Arc-length

Suppose γ\gamma has the unit speed that is

t[a,b]:γ(t)=1.\forall t \in [a, b] : \| \gamma'(t) \| = 1.

We first can show that the velocity vector is orthogonal to the acceleration vector

γ(t)γ(t)=0\gamma'(t)^\top \gamma''(t) = 0

Proof: With the assumption, we have

γ(t)γ(t)=1\gamma' (t) ^\top \gamma'(t) = 1

Differentiating w.r.t. tt yields

γ(t)γ(t)+γ(t)γ(t)=0    γ(t)γ(t)=0\gamma'(t)^\top \gamma''(t) + \gamma''(t)^\top \gamma'(t) = 0 \implies \gamma'(t)^\top \gamma''(t) = 0

We define the arc-length of a curve γ:[a,b]R2\gamma : [a, b] \rightarrow \R^2 at tt to be

sγ(t):=atγ(τ)dτ.s_\gamma(t) := \int_a^t \| {\gamma}' (\tau) \|\text d\tau.

Then the unit speed assumption leads to

sγ(t)=atdτ=ta.s_\gamma(t) = \int_a^t \text d \tau = |t - a| .

Arc-length Re-parameterization

Suppose lγl_\gamma is the length of a regular curve γ:[a,b]R2\gamma : [a, b ] \in \R^2. We can use the arc-length function sγ:[a,b][0,lγ]s_\gamma : [a, b] \rightarrow [ 0, l_\gamma ] to re-parameterize γ\gamma such

γ~=γφ,\tilde \gamma = \gamma \circ \varphi,

where φ=sγ1\varphi = s_\gamma^{-1}. Two conditions needed to be checked are 1) the bijectivity and 2) smoothness of φ\varphi .

Condition 1: Bijectivity

Because γ\gamma is a regular curve, we have

t:γ(t)>0    sγ(t)>0.\forall t : \| \gamma'(t) \| > 0 \implies s'_\gamma(t) > 0.

That is sγ(t)s_\gamma (t) is strictly monotonic increasing. Therefore, sγs_\gamma is bijective and φ\varphi exists.

Condition 2 : Smoothness

Taking the derivative of sγ(t)s_\gamma(t) w.r.t tt at some τ[a,b]\tau \in [a, b] yields

ddtsγ(τ)=ddtaτγ(t)dt=γ(τ),\begin{aligned} \frac{\text d }{\text d t} s_\gamma(\tau) &= \frac{\text d }{\text d t} \int_a^\tau \| \gamma'(t) \| \text d t \\ &= \| \gamma '(\tau) \|, \end{aligned}

where we use the fundamental of calculus in the second step. Let’s write at the coordinate functions of γ\gamma explicitly

γ(t)=[γ1(t)γd(t)].\gamma(t) = \begin{bmatrix} \gamma_1(t) \\ \vdots \\ \gamma_d(t) \end{bmatrix}.

Because we assume that γ\gamma is a smooth function (equivalently, each coordinate function γi\gamma_i is smooth), that means

γ(t)=i=1dγi(t)2\| \gamma'(t) \| = \sqrt{ \sum_{i=1}^d \gamma_i(t)^2}

is smooth if iγi(t)2\sum_i \gamma_i(t)^2 \in (0,)(0, \infty); that is the function γ(t)\| \gamma'(t) \| is infinitely many differentiable if the condition satisfies. Indeed, we have the condition because γ\gamma is a regular curve, and this implies that

i=1dγi(t)2(0,).\sum_{i=1}^d \gamma_i (t)^2 \in (0, \infty).

Because ddtsγ(t)=γ(t)\frac{ \text d }{\text d t} s_\gamma(t) = \| \gamma'(t)\| is smooth, we can then conclude that sγ(t)s_\gamma(t) is also smooth. Therefore, φ=sγ1(t)\varphi = s^{-1}_\gamma(t) is also smooth.

Consequence: Unit Speed

Suppose we have a curve γ:[a,b]Rd\gamma : [a, b] \rightarrow \R^d and its arc-length re-parameterization γ~=γφ\tilde \gamma = \gamma \circ \varphi . We can see that

γ~(τ)=γ(φ(τ))φ(τ)=(1)γ(φ(τ))1sγ(φ(τ))=γ(φ(τ))1γ(φ(τ))=γ(φ(τ))1γ(φ(τ))=1,\begin{aligned} \| \tilde \gamma'(\tau)\| &= \| \gamma'(\varphi(\tau)) \cdot\varphi'(\tau) \| \\ &\overset{(1)}{=} \bigg \| \gamma'(\varphi(\tau)) \cdot \frac{ 1 }{ s_\gamma'(\varphi(\tau))} \bigg \| \\ &= \bigg \| \gamma'(\varphi(\tau)) \cdot \frac{ 1 }{ \|\gamma'(\varphi(\tau))\|} \bigg \| \\ &= \| \gamma'(\varphi(\tau)) \| \frac{ 1 }{ \|\gamma'(\varphi(\tau))\|}\\ &= 1, \end{aligned}

where (1) uses the inverse function rule.

Curve Energy and Shortest Path on Plane

Suppose we have points a,bRa, b \in \R and represented with x(a),x(b)R2x(a), x(b) \in \R^2 and we would like to find a curve that minimizes the distance (or arc-length) between these two points. That is

γargminγL(γ(a,b))\gamma^\star \leftarrow \text{argmin}_\gamma L(\gamma_{(a, b)})

It turns out that the minimizer of the length functional is also minimizes what so-called the energy

E(γ(a,b))=abγ(t)γ(t)dt.E(\gamma_{(a, b)}) = \int_a^b \gamma'(t)^\top \gamma'(t) \text dt.

See discussion about the proof at https://math.stackexchange.com/a/669330.

We can then find the minimizer (a curve function) via calculus of variations. In particular, the Lagrangian is E:=γ(t)γ(t)\mathcal E := \gamma'(t) ^\top \gamma'(t) and

δEδγ(t)ddtδEδγ(t)=0.\frac{\delta \mathcal E }{\delta \gamma(t)} - \frac{\text d }{\text d t} \frac{\delta \mathcal E }{\delta \gamma'(t)} = 0.

First, we observe that The first time is zero. For the second term, we have

δEδγ(t)=γ(t)R2\frac{\delta \mathcal E}{\delta \gamma'(t)} = \gamma'(t) \in \R^2

and the second term becomes

ddtδEδγ(t)=2γ(t)R2.\frac{\text d }{\text d t} \frac{\delta \mathcal E }{\delta \gamma'(t)} = 2 \gamma''(t) \in \R^2.

Integrating the results above yields

i{1,2}:γi(t)dt=2γi(t)+Ci,0\forall i \in \{1, 2\}: \int \gamma''_i(t) \text dt = 2 \gamma'_i(t) + C_{i,0}

and

γi(t)+Ci,0dt=2γi(t)+Ci,0t+Ci,1,\int \gamma'_i(t) + C_{i,0} \text dt = 2 \gamma_i(t) + C_{i, 0} t + C_{i,1},

where Ci,0,Ci,1RC_{i, 0}, C_{i, 1} \in \R are integration constants. We absorb the minus signs and 1/21/2 in both constants and write

γi(t)=Ci,0t+Ci,1.\gamma_i(t) = C_{i, 0}t + C_{i, 1}.

Therefore, we have a linear function for each coordinate. Finding the constants using the boundary values x(a)x(a) and x(b)x(b) yields

C:,0=1ba(x(b)x(a))C:,1=x(a)C:,0aC_{:,0} = \frac{1}{b-a}( x(b) - x(a) ) \qquad C_{:, 1} = x(a) - C_{:,0}a

Acknowledgement

I find these Khan’s lectures are very helpful and throughout on these concepts.

The toy curves figure is generated with this notebook.