Sampling a curve (parametric)

765 Views Asked by At

I am working with parametric curves, I need to find the maximum curvature of these curves. I know the starting point, ending point and length of a curve. I want to use sampling method to know the curvature of the curve at various points. I am unable to figure out how can I proceed. Any help would be appreciated. Cheers

1

There are 1 best solutions below

2
On BEST ANSWER

You cannot do this successfully without further information. Consider the curve given by \begin{align} x(t) &= \begin{cases} 0 & t \le 0\\ t^3 & t \ge 0 \end{cases}\\ y(t) = &= \begin{cases} t^3 & t \le 0\\ 0 & t \ge 0 \end{cases} \end{align}

The graph of this curve is a path coming up the negative $y$ axis, making a sharp turn to the right, and leaving along the postive $x$ axis. The curvature at the origin (which corresponds to $t = 0$) is infinite. For any discrete sampling strategy that happens to not include $t = 0$, you can replace this curve with another that has identical samples, but follows a small circle-arc between the axes, for $t$ in the interval between the last negative sample and the first positive sample. These two curves have identical samples, but one has bounded curvature, the other has unbounded. (And indeed, the bounded curvature one can have arbitrarily high curvature if we take the circe-arc to have a very small radius.)

You may object that these curves are defined piecewise, and your curves are far nicer, etc. But these piecewise curves can be arbitrarily closely approximated by polynomial curves, at least on a finite interval like $-1 \le t \le 1$, so that objection doesn't really rule out this situation.

Basically: finite sampling of parametric curves doesn't allow you to estimate anything unless you know something more about them, such as "the curve is band-limited" or "the curve is given by a polynomial of degree no larger than $n$", etc.

Sorry to be disappointing, but this is a very deep rathole that you're about to head into, and I want to help you avoid it.

Post-comment addition:

The poster has revealed that the curves in question are piecewise cubic. That makes the problem somewhat simpler, as there's a nice formula for the curvature:

$$ \kappa = \frac{\dot{x} \ddot{y} - \dot{y}\ddot{x}}{ \left( \dot{x}^2 + \dot{y}^2 \right)^\frac{3}{2}}. $$

The numerator here turns out to be quadratic; the denominator the $3/2$ power of a quartic. You can simply evaluate this expression at any point at which you want to compute the curvature. (BTW, this is the signed curvature -- it'll be positive for curves like a circle around the origin traversed counterclockwise, and negative for the same curve traversed clockwise.) For general curves, direct evaluation is a pain (or impossible, if you only have samples). For cubics...it's definitely worth doing.