Geometry – How to Offset a Bezier Curve

bezier-curvegeometry

I searched this site and I read that in general it is not possible to calculate offset of a Bezier curve.

But is it possible to calculate the offset in some special cases? Obviously, if the Bezier looks like straight line, it is possible – but what about other special cases?

I'm asking because this article claims that it is possible to always exactly calculate the offset iff the bezier has "at most one directional change in its curvature".

Is it true?

And more importantly, the article claims that the rule for deciding whether it is possible or not is "as long as the lines perpendicular to the start and end of the curve do not intersect the curve, and the angle the two lines is no greater than 90°".

Why 90°? Why no intersection with the original curve? Does it work for Beziers of any degree?

Best Answer

The article you cited is wrong (or, at best, misleading). In general, the offset of a Bezier curve can not be represented exactly as another Bezier curve (of any degree). But, on the other hand, there are many situations where you don't need an exact offset, you only need a decent approximation. In my view, the definitive works in this area are the following two papers:

Farouki and Neff: Analytic properties of plane offset curves, CAGD 7 (1990), 83-99

Farouki and Neff: Algebraic properties of plane offset curves, CAGD 7 (1990), 101-127

For a good comparison of available approximation techniques, look at this paper: http://www.cs.technion.ac.il/~gershon/papers/offset-compare.pdf

Regarding special cases: Bezier curves that happen to be straight lines can obviously be offset exactly, as you observed. Also, so-called Pythagorean Hodograph curves have offsets that are rational Bezier curves, at least, but not polynomial ones. Ask again if you're interested in these.

The 90 degree idea is not very useful, even as an approximation guideline. As an example, consider the curve that has control points (0,0), (2,1), (0,1), (2,0). It satisfies the given conditions, but it's very difficult to offset accurately.

Related Question