2

Given a 2D cubic Bezier segment defined by $P_0, P_1, P_2, P_3$, here's what I want:

A function that takes the segment and outputs the maximum curvature without using an iterative approach.

I have a function that finds the maximum curvature at the moment, but does this using Brent's Method to search a range of $t$ on $[0, 1]$. It fails to find the maximum curvature $5\%$ of the time. In addition, I really need the Jacobian of the method to help my optimization algorithms. Brent's Method (or any kind of iterative search) makes this impossible.

I recognize that this is a difficult function to deal with by hand, but perhaps someone with access to some nice software and a fancy machine could crank out a function to find the maximum curvature of a cubic Bezier? Something that symbolically returns the roots of solving the derivative of the curvature? Thanks for your time.

Widawensen
  • 8,172
Brannon
  • 177
  • 1
  • 12

2 Answers2

1

I computed the curvature and its derivative symbolically. The numerator of the derivative expression is a polynomial of degree 5. So, unless there is some way to factor it or simplify it (which I don't see), there's no hope of finding formulae for its roots.

I'm surprised that Brent's method fails so often. I would have expected it to succeed almost always. Maybe you should do some more testing your root finder, before proceeding.

If the end goal is to minimise maximum curvature, the only option I see is to use a minimization algorithm that doesn't require derivatives. Actually, the ones that claim they don't need derivatives often have internal procedures that estimate derivatives numerically. But, no matter -- at least you don't have to provide derivatives.

bubba
  • 43,483
  • 3
  • 61
  • 122
0

I found this while trying to solve similar problem: PDF:Curvature extrema of planar parametric polynomial cubic curves

Start reading from 8. Conclusion, they classify curves based on easy to check features like presence of loops & cusps, giving number and coarse positions of curvature extremes.

Anonymous
  • 41
  • 6