1
$\begingroup$

The question pretty much states it all, but it must also satisfy these conditions:

  1. $x(0) = a$ and $x(1) = b$ where a is the $x$ coordinate of a specified "start point" that is in the set of $(x, y)$ points and b is the x coordinate of a specified "end point" that is in the set of $(x, y)$ points, and similarly, $y(0) = c$ and $y(1) = d$ where c is the y coordinate of a specified "start point" that is in the set of $(x, y)$ points and d is the y coordinate of a specified "end point" that is in the set of $(x, y)$ points. (so basically, plugging in 0 for t gives the start point and plugging in 1 gives the end point)

  2. The parametrization must be continuous (I'm not sure how else to say this. Basically, the parametrization must be a continuous "path" from the start point to the end point that passes through all points in between)

I'm not fluent in the language of mathematics, so I probably could have stated those conditions much better. In fact, some of them probably don't make sense, so I would be happy to clarify them.

$\endgroup$
  • $\begingroup$ I don't know if I understood you rigth. The straight segment $(a+t(b-a),c+t(d-c))$ does not solve your problem? $\endgroup$ – user378947 Dec 13 '16 at 21:01
  • $\begingroup$ @mathbeing It is an interpolation over a set of $(x,y)$ coordinates. The straight segment you proposed would work if the start point and the end point were the only two points in the set, but what if there were any number of points in the set? I want the parametrization to pass through ALL points of the set, not just the start and end point. $\endgroup$ – Sam Dec 13 '16 at 21:04
  • $\begingroup$ Do you want to interpolate a finite set of points $(x_1,y_1),(x_2,y_2),\ldots,(x_n,y_n)$ with a continuous path? $\endgroup$ – user378947 Dec 13 '16 at 21:26
  • $\begingroup$ @mathbeing Exactly. However, one of the points in that set must be the start point (where t=0) and another of those points must be the end point (when t=1). $\endgroup$ – Sam Dec 13 '16 at 21:40
1
$\begingroup$

You want to interpolate a finite number of points $$(x_0,y_0),(x_1,y_1),(x_2,y_2),\ldots,(x_n,y_n)$$ with a continuous curve $(x(t),y(t))$. [I am thinking of $(x_0,y_0)=(a,b)$ as the starting point and of $(x_n,y_n)=(c,d)$ as the ending point. It doesn't matter how you call them.]

A first easy solution would be to glue segments from one point to the next: The straight segment $$ \ell_j(t)=(x_{j-1}+t(x_{j}-x_{j-1}),y_{j-1}+t(y_{j}-y_{j-1})),\,\,0\leq t\leq1 $$ joins the points $(x_{j-1},y_{j-1})$ and $(x_{j},y_{j})$. Choosing times $t_j$ in $(0,1]$ when we want to arrive at $(x_j,y_j)$ we have the solution $$ \ell(t):=\left\{\begin{array}{lc}\ell_1(t)&,0\leq t\leq t_1\\ \ell_2(t)&,t_1\leq t\leq t_2\\ \,\,\,\,\vdots&\,\,\,\vdots\\ \ell_n(t)&,t_{n-1}\leq t\leq t_n=1.\end{array}\right. $$

We actually have a lot of margin here to come up with other solutions. As a start I would have a look at this Wikipedia article. Using Lagrange polynomials you might find polynomials $p(t)$ and $q(t)$ such that $p(t_j)=x_j$ and $q(t_j)=y_j$, and then another solution would be $$ (p(t),q(t)),\,\,0\leq t\leq1. $$

Finally notice that if it is the case that $a=x_0<x_j<c=x_n$ for every $j$ and if you don't mind in which order you visit the points $(x_j,y_j)$ then you might reorder your points so that the first coordinate does not decrease from one point to the next, take a function (e.g. a Lagrange polynomial) such that $f(x_j)=y_j$ and then consider $$ \gamma(t)=(t,f(t)),\,\,x_0\leq t\leq x_n. $$ This strictly is not a solution as the time domain is not $[0,1]$, but that can be quickly fixed considering $\tilde{\gamma}(t)=\gamma(x_0+t(x_n-x_0)),\,0\leq t\leq0$.

[Obviously this last solution can also be used if $b=y_0<y_j<d=y_n$ for every $j$ and if you don't mind in which order you visit the points $(x_j,y_j)$. The same argument applies, only this time we will have something like $\gamma(t)=(f(t),t)$. Or if "the case that $a=x_0<x_j<c=x_n$ for every $j$ and if you don't mind ..." holds with switched inequality signs, for if $\gamma(t),\,0\leq t\leq1$, is a path interpolating $(x_n,y_n),\ldots,(x_1,y_1),(x_0,y_0)$ then $\tilde{\gamma}(t):=\gamma(1-t),\,0\leq t\leq 1$ does the same work backwards.]

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.