Given a collection of consecutive points, can I find a graph equation that goes through all of them?

852 Views Asked by At

As said in the title I have a collection consecutive of points on R²(x0, x1, x2, etc.), and I am trying to find one continuous function, that defines a graph that passes through all of them.

I've thought that I can always define a function by the collection of the distances between each consecutive point for their respective intervals(eg, x0=1,x1=2,any point between them could be described by y²=x²+x²), but that does not help me since I am trying to reduce the amount of data necessary to describe that given collection of points.

Is there a known method to solve this problem?

P.S.: I am not mathematician, just a Comp Sci grad student, so please bear with me. P.S.²: I am also not sure my tags are correct, if you guys could help me with them that would be great.

2

There are 2 best solutions below

2
On

Look up Interpolation.

This is what you need.

8
On

You can join consecutive points by line segments, for example. Given two points $x_1,x_2\in\mathbb R^2$, a line segment from $x_1$ to $x_2$ can be defined via $\gamma:[0,1]\to\mathbb R^2,\ t\mapsto (1-t)x_1+tx_2$. If you have more than two points you can add these line segments together.

Example: Assume that $x_1,x_2,x_3,x_4$ are given. Joining $x_1,x_2$ and $x_2,x_3$ and $x_3,x_4$ will give us three line segments $\gamma_1(t)=(1-t)x_1+tx_2$ and $\gamma_2(t)=(1-t)x_2+tx_3$ and $\gamma_3(t)=(1-t)x_3+tx_4$. Two get the final function, you need to adjust the domains of the $\gamma's$: \begin{align*} \gamma:[0,3]\to\mathbb R^2,\ \mapsto\begin{cases}\gamma_1(t), & t\in[0,1]\\\gamma_2(t-1),&t\in[1,2]\\\gamma_3(t-2),&t\in[2,3]\end{cases}. \end{align*}

There are many other ways to join two points. You don't have to use line segments. For a more general idea be referred to Jp McCarthy's answer below.