split irregular line in equal parts I have this irregular line and I want to split it in, for example, ten equal parts. How can I do that?

Thank you!
 A: Your line appears to be a polygonal chain. If that is the case, you can compute the length of each segment as the distance between its endpoints. Summing all lengths gives you the overall length of the chain. Dividing it by the desired number of parts will give you the length of each part. Start at the beginning of the chain and collect whole segments until the combined length of these exceeds the desired part length. Then you'll have to split the last segment, based on the desired length. Iterate for all parts.
A: The curve can be written as the parametric functions $x\left(t\right)$
and $y\left(t\right)$. A sensible parameterization to use to subdivide your curve would be arc-length.
For example, let's say that you have a line segment from $\left(0,0\right)$
to $\left(1,1\right)$ and then a line segment from $\left(1,1\right)$
to $\left(2,3\right)$.
Note that $\left\Vert \left(1,1\right)-\left(0,0\right)\right\Vert _{2}^{2}=1^{2}+1^{2}=2$,
and that $\left\Vert \left(2,3\right)-\left(1,1\right)\right\Vert _{2}^{2}=1^{2}+2^{2}=5$.
Then, we could take
$$\left(x\left(0\right),y\left(0\right)\right)=\left(0,0\right),
\hspace{1em}\left(x\left(2\right),y\left(2\right)\right)=\left(1,1\right),\hspace{1em}\text{and}\hspace{1em}
\left(x\left(5\right),y\left(5\right)\right)=\left(2,3\right).$$
Between values of $t=0,2,5$, we can use the equation for a line to connect
the segments. This gets us to
$$
x\left(t\right)=\begin{cases}
\frac{1}{2}t & t\leq2\\
\frac{1}{3}t+\frac{1}{3} & 2<t\leq5
\end{cases}
$$
and
$$
y\left(t\right)=\begin{cases}
\frac{1}{2}t & t\leq2\\
\frac{2}{3}t-\frac{1}{3} & 2<t\leq5
\end{cases}
$$
Now, all you need to do is split up the interval $\left[0,5\right]$
into ten "pieces": $\left[0,0.5\right]\cup\left[0.5,1\right]\cup\ldots\cup\left[4.5,5\right]$.
Now you can use the above functions to get the coordinates of whatever
"piece" you are interested in! For example, the second piece is
parameterized over $t\in\left[0.5,1\right]$, so I can look at its
starting point by calculating
$$
\left(x\left(0.5\right),y\left(0.5\right)\right)
$$
and its end point by calculating
$$
\left(x\left(1\right),y\left(1\right)\right)
$$
using the above functions. Hope that was easy enough to understand!
