On 9/1/2021 12:48 PM, Henning Hraban Ramm via ntg-context wrote:
Hi, since Jacob started the pony mode, here’s one I’d like to ride:
MetaPost pens are constant, i.e. they never change over the length of a path.
Commercial vector graphics apps have “vector brushes”, e.g. Adobe Fresco: https://helpx.adobe.com/fresco/using/vector-brushes.html The page nicely shows the necessary variables.
In Inkscape you can combine “brush images” like https://publicdomainvectors.org/en/free-clipart/Paintbrushes-for-Inkscape/86... with pen shapes: https://logosbynick.com/custom-brushes-in-inkscape/
This stretches the whole shape over the path – not perfect but good enough (and the same what e.g. “my” Affinity Designer does). (https://affinity.serif.com/designer/)
Is this possible with MetaFun, i.e. use a closed path and distort/stretch it along an open path? If, how? you can try to 'reverse engineer the result' and see what is done by looking at the output
anyway, i guess it some mix of existing basics, as in \starttext \startMPcode path p ; p := fullcircle scaled 4cm ; for i=1 upto 10 : nodraw p xscaled (1 randomized .1) yscaled (1 randomized .1) ; endfor ; dodraw p xscaled (1 randomized .1) yscaled (1 randomized .1) withtransparency (1,.5) ; \stopMPcode \startMPcode path p ; p := fullcircle scaled 4cm ; for i=1 upto 10 : draw p xscaled (1 randomized .1) yscaled (1 randomized .1) withtransparency (1,.5) ; endfor ; draw p xscaled (1 randomized .1) yscaled (1 randomized .1) withtransparency (1,.5) ; \stopMPcode \startMPcode path p ; p := ( unitcircle xscaled (5cm randomized 5mm) yscaled (4cm randomized 3mm)) -- (reverse (unitcircle xscaled (5cm randomized 3mm) yscaled (4cm randomized 5mm))) -- cycle; draw (p) % withpattern image (fill fullcircle scaled 2mm withcolor "darkyellow" ;) % withpattern image (draw figure "mill.png" ;) withpattern image (draw figure "hacker.jpg" ;) withpatternscale (1/40,1/80) ; \stopMPcode \stoptext so, fills, eofills, patterns and such 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 -----------------------------------------------------------------