[metapost] Re: pdf output and extensions

Boguslaw Jackowski bop at bop.com.pl
Wed Mar 16 10:06:23 CET 2005

> I am still guessing wildly concerning the envelope proposal
>  envelope <big Omega shaped path> withpen <medium sized circular pen>;
> It seems now that the answer is ERROR.

Don't understand...

> for circular (and elliptic) pens I would be surprised if
> mp has calculated any envellope of any sort.

Everybody would (and should) be. The envelope of a circular
pen is not any longer B\'ezier curve. Therefere, approximation
(not necessarily trivial, I guess) must be employed.

> I have read that *metafont* does secretly convert circular
> pens to polygonal pens of approximately circular shape.

True, although I'd rather use the word `implicitly' than `secretly' ;-)

> But I doubt the same is done in the scalable mp world (which
> polygon?!).

Two remarks:

* METAPOST circular pens are passed on to PostScript as PostScript circular
   pens and PostScript (I presume) does the same as MF does:
   it converts a pen immediately before the drawing of a stroke into
   a polygonal pen and actually the polygonal pen is used to color pixels.

* METAPOST polygonal pens are passed on to PostScript as envelopes to be

I believe that the calculation of an envelope MUST involve
a user-controlled conversion of a circular pen into a polygonal
one. So, it would be a ``mock'' envelope in the case of circular
pens and one should remember about it. Nevertheless, such
a ``mock'' envelope can also be useful.

Cheers -- Jacko

Ps. You can always resort to knotty macros, of the kind we implemented in
     plain_ex.mp (an extension of plain.mp that we use in our METATYPE1
     system), that approximate (somehow and in some tidy cases, of course)
     the envelope of a circular pen.

BOP s. c.
ul. Bora-Komorowskiego 24, 80-377 Gdansk, Poland
tel. (+48 58) 553 46 59,  fax (+48 58) 511 03 81
bop at bop.com.pl, http://www.bop.com.pl

More information about the metapost mailing list