[NTG-context][metapost] shading in meta[post/play] & PDF
Laurence Finston
lfinsto1 at gwdg.de
Wed Jan 19 11:59:27 CET 2005
On Wed, 19 Jan 2005, Mojca Miklavec wrote:
>
> How can I make shading inside metapost(play) to produce exactly what's
> in the attached picture (smooth shades). Or more generally: how can I
> "hardcode" some PS/PDF code in .mp, not (yet) supported by metapost(play)?
>
This is a very difficult question. For an excellent introduction
to shading and other subjects I recommend:
Jones, Huw.
_Computer Graphics through Key Mathematics_.
Springer-Verlag London Limited 2001.
ISBN 1-85233-422-3.
>
> Here's the corresponding PostScript code:
>
Sorry, I don't know PostScript.
>
> >>The spheres drawn directly in PostScript as in the examples above still
> >>have straight lines (well, I agree that with some mathematics it would
> >>be possible to draw them with proper splines as well).
> >>
To the best of my knowledge, spline curves are drawn by means of
calculating short line segments. You can make the "time" parameter
as small as you like, but you can't make it 0.
I believe plotters can draw genuine curves---and it's a lot more
fun to watch them work (it's like magic).
They're not so great at filling in regions,
though. Much to my regret, the computer center here got rid of
the plotter. They're probably as obsolete as the ENIAC now, except
perhaps for very high-quality work.
> Thank you,
My pleasure.
Laurence
More information about the metapost
mailing list