[metapost] Texture brushes

Daniel Grady d.c.grady at gmail.com
Sat Nov 20 21:47:05 CET 2010


Hello all, I was wondering if it's possible in MetaPost to use a textured brush to draw a path, as in a program like LineForm or Adobe Illustrator. I see that you can use a convex polygon to define the pen that's used for drawing, but this seems different from the feature present in those other programs, which is more like stretching a predefined shape along a path. Are there any MetaPost macros available for accomplishing this? What about being able to stretch and repeat a shape along a path?

I'm interested in finding a way to get this effect in a vector graphics language like MetaPost; I looked into SVG as well but it doesn't seem straightforward there either. If anyone knows of a MP-like alternative that would be great too. I was hoping to be able to draw graphs that looked like they had been produced using a pen and ruler, like what you see in Exploratory Data Analysis by Tukey. I think it would be a neat effect to have, for example, plots of Bessel functions with a somewhat hand-drawn appearance.

Apologies if this topic has been covered before. I did look around on Google and in the mailing list archives, but I'm still learning MetaPost and am new to this list so I may have been searching for the wrong thing. Thanks for any help!

-Daniel




More information about the metapost mailing list