Is there a simple interpolation by an arclength-parametrzied curve?

94 Views Asked by At

Let $\mathbf{p}_1,\mathbf{p}_2,\dots \mathbf{p}_n$ be distinct points in $\mathbb{R}^2$. Is there a simple/canonical way to construct a smooth function $$\mathbf{r}:[0,\ell]\to \mathbb{R}^2$$ such that $\forall i\in\{1,2,\dots,n\}$, there is $t_i$ such that $\mathbf{r}(t_i)=\mathbf{p}_i$, and $\mathbf{r}$ satisfies $|\mathbf{r}'(t)|=1$ for all $t\in[0,\ell]$.

It is also desirable (but not necessary) to find a function $\mathbf{r}$ that is injective.

Example 1: If $n=2$, then $\ell=|\mathbf{p}_2-\mathbf{p}_1|$ and $\mathbf{r}(t) =\mathbf{p}_1+\frac{t}{\ell}(\mathbf{p}_2-\mathbf{p}_1)$.

Example 2: If $n=3$: Assume that the points are not collinear, we find $\mathbf{q}$ the center of the circle that touches $\mathbf{p}_1, \mathbf{p}_2,\mathbf{p}_3$ and we write $\mathbf{r}$ in terms of cosine and sine. If the three points are collinear, then we go back to example 1.

Ideas in the literature: Most of the ideas that I have found would start from a non-arclength parametrization $\tilde{\mathbf{r}}$, then you would solve multiple equations (numerically) to find $\mathbf{r}$. This is fine but I am looking for an analytic way to represent $\mathbf{r}$.

1

There are 1 best solutions below

0
On BEST ANSWER

Here's a simple geometric solution, assuming by "smooth" you mean $C^1$ (having continuous first derivative). You already know how to parametrize circles and lines, so let's use that.

Put a straight line segment between $\mathbf p_1$ and $\mathbf p_2$. Then any continuation of the curve from $\mathbf p_2$ needs to have the same direction (tangent line) at that point, and needs to pass through $\mathbf p_3$.

Given a point $\mathbf p_k$ and a direction $\mathbf u_k$ (with $\lVert \mathbf u_k\rVert=1$), we can construct a circle with any curvature $c$, passing through that point with that direction:

$$\mathbf r_k(t)=\mathbf p_k+\frac{\sin(ct)}{c}\,\mathbf u_k+\frac{1-\cos(ct)}{c}\,J\mathbf u_k$$

for $c\neq0$, or the straight line

$$\mathbf r_k(t)=\mathbf p_k+t\mathbf u_k$$

for $c=0$. Here $J$ is the $90^\circ$ rotation operator; $J\mathbf u_k$ is a unit vector perpendicular to $\mathbf u_k$.

There is exactly one value of $c\in\mathbb R$ such that $\mathbf r_k$ passes through another given point $\mathbf p_{k+1}$:

$$c=\frac{2(J\mathbf u_k)\cdot(\mathbf p_{k+1}-\mathbf p_k)}{\lVert\mathbf p_{k+1}-\mathbf p_k\rVert^2}.$$

Find a value of $t$ for which $\mathbf r_k(t)=\mathbf p_{k+1}$, and set the next direction $\mathbf u_{k+1}=\mathbf r_k'(t)$:

$$\mathbf u_{k+1}=\big(1-c(J\mathbf u_k)\cdot(\mathbf p_{k+1}-\mathbf p_k)\big)\mathbf u_k+\big(c\mathbf u_k\cdot(\mathbf p_{k+1}-\mathbf p_k)\big)J\mathbf u_k.$$

(There is a slight problem if $c=0$ and $\mathbf p_{k+1}$ is "behind" $\mathbf p_k$, so $\mathbf r_k(t)=\mathbf p_{k+1}$ only for some $t<0$, where we want $t>0$; but that can be fixed by a stadium.)

Iterate this process, and connect the curves $\mathbf r_1,\mathbf r_2,\cdots,\mathbf r_{n-1}$ to get a piecewise-circular curve $\mathbf r$ passing through the points $\mathbf p_1,\mathbf p_2,\cdots,\mathbf p_n$.


Here's a different formulation of the same kind of curve, with more symmetry, and less dependence of each arc on the previous arcs.

Given two points $\mathbf p_k$ and $\mathbf p_{k+1}$, we can construct a circle with almost any curvature $c$ (the maximum is $2/\lVert\mathbf p_{k+1}-\mathbf p_k\rVert$), passing through both points:

$$\mathbf r_k(t)=\frac{\mathbf p_k+\mathbf p_{k+1}}{2}+\frac{\sin(ct)(\mathbf p_{k+1}-\mathbf p_k)+\left(\sqrt{1-c^2\lVert\mathbf p_{k+1}-\mathbf p_k\rVert^2/4\;}-\cos(ct)\right)J(\mathbf p_{k+1}-\mathbf p_k)}{c\lVert\mathbf p_{k+1}-\mathbf p_k\rVert}$$

for $c\neq0$, or the straight line

$$\mathbf r_k(t)=\frac{\mathbf p_k+\mathbf p_{k+1}}{2}+\frac{t(\mathbf p_{k+1}-\mathbf p_k)}{\lVert\mathbf p_{k+1}-\mathbf p_k\rVert}$$

for $c=0$. Note that $t=0$ is the middle of the arc, not an endpoint. The endpoints (for $c\neq0$) are where the coefficient of $J(\mathbf p_{k+1}-\mathbf p_k)$ vanishes, so $\sin(ct)/c=\pm\lVert\mathbf p_{k+1}-\mathbf p_k\rVert/2$. Thus the derivative $\mathbf r_k'$ at an endpoint is

$$\mathbf u_{k,k+1}=\sqrt{1-c^2\lVert\mathbf p_{k+1}-\mathbf p_k\rVert^2/4\;}\frac{(\mathbf p_{k+1}-\mathbf p_k)}{\lVert\mathbf p_{k+1}-\mathbf p_k\rVert}\pm cJ(\mathbf p_{k+1}-\mathbf p_k)/2.$$

Let's rename $c$ as $c_k$, since each arc has a different curvature. To match the derivatives of $\mathbf r_k$ and the previous arc $\mathbf r_{k-1}$ at the endpoint $\mathbf p_k$, we need

$$\mathbf u_k=\sqrt{1-c_k^2\lVert\mathbf p_{k+1}-\mathbf p_k\rVert^2/4\;}\frac{(\mathbf p_{k+1}-\mathbf p_k)}{\lVert\mathbf p_{k+1}-\mathbf p_k\rVert}-c_kJ(\mathbf p_{k+1}-\mathbf p_k)/2 \\ =\sqrt{1-c_{k-1}^2\lVert\mathbf p_k-\mathbf p_{k-1}\rVert^2/4\;}\frac{(\mathbf p_k-\mathbf p_{k-1})}{\lVert\mathbf p_k-\mathbf p_{k-1}\rVert}+c_{k-1}J(\mathbf p_k-\mathbf p_{k-1})/2.$$

You can take the dot product with $-2J(\mathbf p_{k+1}-\mathbf p_k)/\lVert\mathbf p_{k+1}-\mathbf p_k\rVert^2$ to get an equation for $c_k$ in terms of $c_{k-1}$, or with $2J(\mathbf p_k-\mathbf p_{k-1})/\lVert\mathbf p_k-\mathbf p_{k-1}\rVert^2$ to get an equation for $c_{k-1}$ in terms of $c_k$. (To simplify a bit, you can use the fact that $J\mathbf x\cdot J\mathbf y=\mathbf x\cdot\mathbf y$ for any vectors $\mathbf x$ and $\mathbf y$; rotation preserves lengths and angles.) (Also, the general form of the above equations shows that $\mathbf u_k$ turns clockwise when $c_k$ increases, and anticlockwise when $c_{k-1}$ increases; thus the curvatures must vary oppositely: $\partial c_k/\partial c_{k-1}<0$.)