|
![](/i/fill.gif) |
Ron Parker wrote:
> Anyway, the result is that if you want to do bevels or rounds you need
> an algorithm for finding the parallels to quadratic curves (not
> cubics... guess that article won't help much.) Ideally, the algorithm
> would be fast and cheap, because it's likely to get called a lot for
> testing insideness in the beveled region, and probably for doing
> intersection testing as well. I suspect rounded edges would have to
> be approximated by multiple bevels with some normal modification to
> conceal the facets, but if you manage to handle that you could
> produce just about any sort of bevel you might desire (though the code
> would be simplified if you limited the bevel profile to bijective
> mappings from R to R.)
I asked about this on comp.graphics.algorithms and the only reply I recieved
did not sound to encouraging -
Ken <tyl### [at] pacbell net> wrote:
> If someone knows of some existing code that
> I could look at or a research paper or two on finding parallels to
> quadratic curves I would appreciate the help.
I've posted details of my methods for approximating parallel Bezier curves
in earlier threads this past year. Summary: since you know the locations of
the parallel endpoints and midpoint, as well as the slope at start and finish,
you can compute the locations of the control point(s). This is a closed form
solution that works well in "easy cases".
The general problem is much more difficult: (1) If the parallel distance
exceeds the radius of curvature of the parent curve, the parallel curve will
kink. This is going to happen *often* in parallels to glyph shapes.
(2) Parallels to glyphs shapes will often self-cross, elevating the problem
into constructive planar geometry of curved regions. (3) Etc. I have
extended solutions for these cases but they're too involved to describe here.
You may want to consider polygon approximations rather than the native curves.
The computation is slower but it is already solved.
--
Ken Tyler - 1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
![](/i/fill.gif) |