Given a curve $C$ with parameter $t$ and origin $0$ and an arc length $s$, I am trying to find the point $P$ so that the length from $C(0)$ to $P$ along $C$ is equal to $s$.

In this case, $C$ is a jointed curve of $n+1$ cubic Bézier curves in $\mathbb{R}^2$; with $(a_i), (b_i), (c_i), (d_i)$ denoting vectors of $\mathbb{R}^2$:

$\forall t\in [0,n+1], C(t) = \sum_{i=0}^n(a_i(t - i)^3 + b_i(t - i)^2 + c_i(t - i) + d_i)\chi_{[i,i+1[}(t)$

Given that I can make sure that the curve is not self-intersecting, the curve length function is bijective from $[0,n+1]$ into $C$ ; thus I have thought of reversing the length formula, but that seems a bit extreme to me :

$P = C(u), u \in \mathbb{R} / \int_0^u||C'(t)||dt = s$

This is for application in a computer program, so ideally this would be applicable in real time. In the end, I want to sample the curve with a constant step in length.

Does anything come to mind ? Thanks by advance.



You must log in to answer this question.

Browse other questions tagged .