0
votes

I have a quadratic Bezier curve and I'm trying to work out the length of it or convert it to a polyline to then work out the length. I can find plenty of algorithms to do this, for example:

http://www.lemoda.net/maths/bezier-length/index.html

or

convert bezier curve to polygonal chain?

But none of these seem to take into account the weighting of the control points, I think this is a feature exclusive to NURBS lines, but there's basically no mention of any of these techniques using NURBS.

Does anyone have any advice for how to approach this problem? Will the Bezier techniques work or is there a way to adapt them? Thanks.

1
plain Bezier curves don't have weighted control points, the values plug straight into the Bezier functions, so you may be searching for the wrong thing if you want an algorithm to flatten a NURBS segment.Mike 'Pomax' Kamermans

1 Answers

1
votes

When converting the Bezier curve into a polyline, two different techniques are often used:

1) create polyline out of the points sampled on the Bezier curve.
2) create polyline out of the control points obtained by refining the original Bezier curve's control polygon via de Casteljau algorithm or knot insertion.

The weighted control points should have been taken account for when sampling points or when applying de Casteljau algortithm (onto the homogenous coordinates).