2
$\begingroup$

I wish to approximate the length of a Bézier curve in a 2D plane. I could do this iteratively – and may – but I want to experiment using Simpson's rule. I am not sure how to set this up and could use some advice. I am generating the Bézier curve from cubic parametric equations. Currently I am thinking

1) Divide Bézier curve using parameter

2) For each segment, derive quadratric fit equation using start, end and additional point on the curve, $ax^2+bx+c$

3) Here's where I need help – should I try to define the arc length function parametrically using $x(t)$ and $y(t)$, or as a function $f(x)$. Are the two cases equivalent in the 2D quadratic case – as $x(t)=t$ , and $y(t)=f(x)$?

Any advice or links appreciated!

$\endgroup$
2
$\begingroup$

This page gives the formula for arclength calculation. It covers the 3D case, but you can recover the 2D case just by ignoring $z$, of course. The formula involves an integral that can't be represented analytically. You can use any numerical integration technique you like, of course. The same page has a simple implementation of evaluation using Simpson's rule.

You should stick with the parametric form. Converting to $y = f(x)$ form is impossible, in general.

$\endgroup$
  • $\begingroup$ Thanks! This issue is widely discussed in forums without much resolution $\endgroup$ – user2066788 Mar 24 '13 at 18:47

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.