1
$\begingroup$

I have a set of ten points that much be used to compute a bezier curve. As you are probably aware, computing a bezier curve of order 9 is a very strenuous activity. I need it in polynomial form. I found this section in the wikipedia article on Bezier curves, but it cautioned against using this polynomial formula for higher order curves:

\begin{align} \begin{split} B(t) =& \sum \limits_{j=0}^{n}t^{j}C_{j} \\ \text{where} \\ C_j =& \frac{n!}{(n - j)!} \sum \limits_{i=0}^{j} \frac{(-1)^{i+j}P_{i}}{i!(j - i)!} \end{split} \end{align}

This could be practical if $C_j$ can be computed prior to many evaluations of $B(t)$; however one should use caution as high order curves may lack numeric stability (de Casteljau's algorithm should be used if this occurs).

My question is therefore, what is the standard way to compute a higher order bezier curve in polynomial form and if so, how?

$\endgroup$
  • $\begingroup$ This post suggests I use De Casteljau's algorithm to compute Bezier curves $\endgroup$ – Richard Slabbert Apr 9 '16 at 8:42
  • $\begingroup$ The de Casteljau algorithm is for calculating a point on a Bezier curve, assuming you know its control points. Your problem (if I understand it correctly) is to compute the control points, given some points that it must pass through. The de Casteljau algorithm won't help with this latter problem. $\endgroup$ – bubba Apr 10 '16 at 4:07
1
$\begingroup$

I found the method to construct a set of Bezier curves in my numerical methods textbook, Numerical Analysis by Burden, Faires, and Burden (10E).

I split the points to create three connected cubic Bezier curves $C_0$, $C_1$, and $C_2$ in parametric form, where $C_i$ is represented by

\begin{align} (x_{i}(t), y_{i}(t)) &= (a_{0}^{(i)} + a_{1}^{(i)}t + a_{2}^{(i)}t^{2} + a_{3}^{(i)}t^{3}, b_{0}^{(i)} + b_{1}^{(i)}t + b_{2}^{(i)}t^{2} + b_{3}^{(i)}t^{3}) \end{align}

for $0 \leq t \leq 1$, as determined by the left endpoint $(x_i, y_i)$, left guidepoint $(x_{i}^{+}, y_{i}^{+})$, right endpoint $(x_{i+1}, y_{i+1})$, and right guidepoint $(x_{i+1}^{-}, y_{i+1}^{-})$ for each $i = 0, 1, 2$. \begin{align} a_{0}^{(i)} &= x_i \\ a_{1}^{(i)} &= 3(x_{i}^{+} - x_i) \\ a_{2}^{(i)} &= 3(x_i + x_{i+1}^{-} - 2x_{i}^{+}) \\ a_{3}^{(i)} &=x_{i+1} - x_i + 3x_{i}^{+} - 3x_{i+1}^{-} \end{align}

$\endgroup$
1
$\begingroup$

Your algorithm constructs a cubic spline, which is a string of three cubic Bezier curves joined end-to-end. If you care about the smoothness of the joins, you will need some conditions to ensure this.

In your original question, it's not clear which computation you're worried about. Is it

  1. Calculating the control points of the Bezier curve from the given data points, or
  2. Converting from Bezier form to "power basis" form, or
  3. Calculating points on the curve, once it has been constructed

The de Casteljau algorithm's purpose is #3.

All of these have some danger of numerical stability problems, but I wouldn't expect the problems to be very significant when the curve degree is only around 10.

If you want a polynomial curve (expressed using the power basis), then you don't need to use Bezier curves at all. Just compute the power basis coefficients by directly interpolating the given data points. This involves solving a linear system of equations, which might lead to numerical instabilities. But, again, in a $10 \times 10$ system, I wouldn't expect very big problems.

$\endgroup$
  • 1
    $\begingroup$ ...depends on the configuration of the ten points of course. OP unfortunately did not show even a picture. $\endgroup$ – J. M. is a poor mathematician Apr 10 '16 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.