1

I think the question is quite straightforward. Why are Bezier curves with more control points numerically more unstable. Can someone give me clear substantiated reason(s)? And with this the notion of numerical (un)stability? Does it maybe have to do with optimization or interpolation of the control points?

A Bezier curve is a polynomial parametric curve and the shape of the curve is based on the position of the control points.

Math98
  • 85
  • 8
  • Numerical stability is very dependent on implementation. There are many reasons and ways that something like this can be numerically unstable. For example, if you offset all the control points far from the origin, you may encounter some rounding problems. Is the a particular operation that you have in mind? The naive sum over control points times basis, for example? – Alex K Jan 16 '23 at 01:23
  • Yes, there is a specific operation I want to perform on the control points: I am going to use them in a Quadratic Program with the control points as decision variables. – Math98 Jan 16 '23 at 11:16
  • So what you're looking at, then, are the derivatives of the spline wrt the control points, embedded in some cost matrix? And it's the numerical stability/conditioning of that matrix that's at issue? – Alex K Jan 16 '23 at 14:27
  • Well, it has indeed the form pQp with p a vector with the control points and Q the Hessian matrix. However, as I told in my question, the context in the papers is not well described. They just mention that a Bézier curver with many control points is more numerically unstable, but not why. Moreover, could the numerical stability/conditioning of that matrix be an issue and in what way? I don't think 2 control points or 10 control points makes that matrix more unstable? – Math98 Jan 16 '23 at 17:04
  • It might... It depends on the exact optimization. Polynomial least squares fitting is often poorly conditioned. (Edit, submitted by accident): I recall for example that https://en.m.wikipedia.org/wiki/Chebyshev_polynomials are a good basis for fitting, because of their orthogonality. The naive monomial basis is really bad. I suspect the Bezier basis to be ok, but not great. The basis might be better for fitting a mixture of derivative constraints than just many positions – Alex K Jan 16 '23 at 17:44
  • I'm not completely following your reasoning. I just found another topic in which it is said that convex combinations are important for numerical stability: https://math.stackexchange.com/questions/118937/why-is-the-convex-hull-property-e-g-of-b%C3%A9zier-curves-so-important – Math98 Jan 16 '23 at 23:02
  • When evaluating a Bezier curve, you are taking a convex combination. However, if you're trying to solve for a Bezier curve that passes through some points (or gets closest to some points), you're basically doing the inverse of that operation. – Alex K Jan 16 '23 at 23:33
  • Thanks for the clarification. Well, I am not exactly trying to do the latter that I want to exactly represent a pre-knowing curve with a Bezier curve and decide which control points are needed to represent this Bezier curve. However, there are some constraints on some control points of the Bezier curve (for example position constraint on the first and last one). The main goal is to create a path based on connecting Bezier curves and for which some control points should conform to some constraints. So I think it is mainly evaluating a Bezier curve or not? – Math98 Jan 30 '23 at 12:12
  • I think you should use the order you think is right, and examine the conditioning of the cost matrix for your QP. If it appears poorly conditioned (or you get results that indicate that it might be) then there's approaches to improving the situation -- starting with generic ones that don't affect your choice of curves. – Alex K Jan 30 '23 at 14:13
  • Clear. If the cost matrix gets bigger in size, does it have more change to get ill-conditioned? Or does it not work like that. – Math98 Jan 30 '23 at 14:36
  • Loosely speaking, it's about bigger with more off-diagonal terms. I would look at SVD's/Eigen decompositions. – Alex K Jan 30 '23 at 20:37

1 Answers1

2

Well, Bezier curves are just polynomials, and interpolation with high degree polynomials has a bad reputation. It may be that the papers you're reading are just passing along the folklore. Experts whom I trust (Trefethen) say that the folklore is dubious -- the alleged problems are poorly articulated and the bad reputation is not deserved.

As one of the comments said, the numerical stability (or instability) depends on what particular computation you're doing. If you're doing interpolation, then you have to be careful what polynomial basis you use. The power basis is very bad; Bernstein and Chebyshev bases are much better.

The standard references in this area are two papers by Farouki and Rajan:

On the numerical condition of polynomials in Bernstein form
Computer Aided Geometric Design Volume 4, Issue 3, November 1987, Pages 191-216

Algorithms for polynomials in Bernstein form
Computer Aided Geometric Design Volume 5, Issue 1, June 1988, Pages 1-26

I don't see any problem in using Bezier control points as the independent variables in an optimization process. If you displace a control point by some vector $V$, then each point on the Bezier curve will move by $kV$, where $k \le 1$, since the Bernstein polynomials are $\le 1$ on the interval $[0,1]$. Seems like that's the sort of stability you're seeking.

bubba
  • 43,483
  • 3
  • 61
  • 122
  • Indeed, in the papers I have read, the problem of instability is never clearly elaborated nor motivated ''just that Bezier curves are numerical unstable for large number of control points'', see for example in the paper Cooperative Collision Avoidance between Multiple Robots Based on Bézier Curves section Path planning based on Bernstein-Bézier curves. – Math98 Jan 30 '23 at 14:20
  • Furthermore, in the last paragraph I am not seeing the link of since that Bernstein polynomials are $ \leq 1$, each point on the Bezier curve will move with $kV$, where $k \leq 1$. Could you explain that connection? I understand that a Bezier curve is formed with the Bernstein polynomials and the control points. – Math98 Jan 30 '23 at 14:20
  • Take two curves A and B, which have the same control points, except that A’s i-th control points is $P_i$ and B’s i-th control point is $P_i + V$. Look at the difference $A-B$. – bubba Jan 31 '23 at 08:44