# Offseting a Bezier curve

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?

• As additional information, I just rewrote that article, because one of the issues with it was that that information is, in fact, incorrect. The new version explains why it's mathematically impossible to do a proper Bezier offset curve with another Bezier curve, so the post is no longer quite correct wrt what's in the article. – Mike 'Pomax' Kamermans Apr 10 '13 at 17:09
• @Mike'Pomax'Kamermans - thanks a lot for the information! – Ecir Hana Apr 10 '13 at 22:49

## 2 Answers

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.

• Your paper ftp.cs.technion.ac.il/pub/misc/gershon/papers/… requires login/password. – tower120 Sep 8 '14 at 20:41
• Please try the new link – bubba Sep 14 '14 at 2:54
• The link is broken. It works if you remove the ".gz" suffix. I don't have enough reputation on this site to make a three-character edit. – SSteve Feb 12 at 17:55
• @SSteve: fixed the link. Thanks. – bubba Feb 13 at 4:13

On a quick glance, it looks like the article you link to is concerned with finding a visually acceptable approximation to the offset curve rather than a mathematically exact offset curve.

If the exact offset from a Bézier curve is smooth (that is, if the curvature of the original does not get so large that the offset curve begins self-intersecting), it is not possible for the offset curve to be representable as a Bézier curve only part of the way. This is because Bézier curves are analytic, and therefore so is the orthogonal distance between one curve and the other. If this distance is constant over an entire parameter interval, it would stay constant if we simply extended the offset curve with the same polynomials until it covered the entire length of the original curve.

Since we must be talking about approximations anyway, the 90° threshold would be more a rule of thumb than a condition with an exact significance.