in Carlos Icaza

A More Efficient Way of Calculating the Length of a Bezier Curve. Part II

In my previous post “Calculating The Length of a Bezier Curve. Part I” I computed the length of a curve using a brute force method which in reality was really bad. But due to the time constraints I was forced to use it and made the grave error of posting it. It has been bugging me ever since, as I knew I had done a poor job. Here is a more efficient way to compute the length of a Bezier curve.

Recall the Bezier form is as follows:

Which in turn, for a cubic Bezier curve, it expands into

Here is some code that could help you calculate the length of the curve.



<span style="font-family: Georgia, 'Times New Roman', Times, serif; font-size: 18px; line-height: 1.5; background-color: #ffffff;">This is pretty much the same code as my previous post but it allows for just a call to calculate the length of the curve.</span>

Write a Comment