ecs
2004-07-03 19:59:30 UTC
I'm in a situation where I need an approximation of the offset of
bezier curves (the resulting approximation must also be a bezier, and
must have the same number of control points as the original curve -ie:
no more subdivision-). I've implemented this by offsetting the control
polygon, what I believe is the "Tiller-Hanson" algorithm.
However, I haven't found an "official explanation" on *how* to offset
the bezier control polygon in the Tiller-Hanson algorithm. Even their
original paper doesn't mention how to offset the polygon, they just
tell they offset it, but not *how* (maybe that's because they're
talking of NURBS rather than beziers).
The only method I found comes from Jacques De Schepper here at
comp.graphics.algorithms:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=B861EDFE.AFBB%25jacques.deschepperNOSP%40Martwork-systems.com
That's the procedure I used. However, it can fail: the problem is at
offsetting the middle edge (the p2p3 edge if the bezier is p1p2p3p4),
because the right side for offsetting is not always given by a
rotation of +90 degrees. If the control polygon has a
self-intersection, the right angle is -90. And, unfortunately, the
right angle can also be -90 even if there's no self-intersection.
My bezier curves never self-intersect, but their control polygons can.
Any help greatly appreciated!
bezier curves (the resulting approximation must also be a bezier, and
must have the same number of control points as the original curve -ie:
no more subdivision-). I've implemented this by offsetting the control
polygon, what I believe is the "Tiller-Hanson" algorithm.
However, I haven't found an "official explanation" on *how* to offset
the bezier control polygon in the Tiller-Hanson algorithm. Even their
original paper doesn't mention how to offset the polygon, they just
tell they offset it, but not *how* (maybe that's because they're
talking of NURBS rather than beziers).
The only method I found comes from Jacques De Schepper here at
comp.graphics.algorithms:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=B861EDFE.AFBB%25jacques.deschepperNOSP%40Martwork-systems.com
That's the procedure I used. However, it can fail: the problem is at
offsetting the middle edge (the p2p3 edge if the bezier is p1p2p3p4),
because the right side for offsetting is not always given by a
rotation of +90 degrees. If the control polygon has a
self-intersection, the right angle is -90. And, unfortunately, the
right angle can also be -90 even if there's no self-intersection.
My bezier curves never self-intersect, but their control polygons can.
Any help greatly appreciated!