[metapost] Feature Request: Get envelope of path stroked with arbitrary pen

Hans Hagen pragma at wxs.nl
Fri Feb 9 10:00:21 CET 2018


On 2/9/2018 4:36 AM, Kevin Keith wrote:
>  > Among other issues, the envelope of a path defined by cubic splines 
> is not
>> itself a cubic spline, so you need to do some approximation, and coming up
>> with rules for how close the approximation needs to be, that cover all cases,
>> is difficult.
> 
> Of course, but how does Metapost output pen strokes to eps or svg as it 
> is? Surely
> it must already have a mechanism to approximate these higher-order 
> splines with
> cubic bezier curves?

it doesn't ... for a more complex pen (think of pencircles scaled in two 
directions and rotated) it outputs the path two times of which one with 
a transform and let the postscript rendering machinery do the work (in 
pdf that transform has to be done beforehand but still we get two paths)
  Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the metapost mailing list