Hi Aditya,
thanks for the code (that also Mikael pointed to)!

> Am 11.05.2021 um 18:02 schrieb Aditya Mahajan <adit...@umich.edu>:
> 
> Look at this old code on how hide such code behind a macro to have a clean 
> interface:
> 
> https://github.com/adityam/mp-sketch/blob/master/mp-sketch.mp

I came up with this simple cover layout:


input mp-sketch;

beginfig(1)
  color darkblue ; darkblue := (40/255,67/255,117/255) ;

  pen pillpen ; pillpen := makepen 
((-1bp,-0.5bp)--(1bp,-0.5bp)..(1bp,0.5bp)--(-1bp,0.5bp)..cycle) ;
  pickup pillpen xyscaled 3bp ;

  sketchypaths;
  sketch_amount := 5bp;

  % insert some extra points to add fuzzyness - automate?
  % path one ; one := (-3mm,249mm) -- (185mm,249mm) -- (185mm,300mm) ; % 
links-oben
  path onep ; onep := (-3mm,249mm) .. (25.5mm,249mm) .. (150mm,249mm) -- 
(185mm,249mm) -- (185mm,300mm) ; % links-oben
  % path two ; two := (25.5mm,-3mm) -- (25.5mm,167mm) -- (213mm,167mm) ; % 
unten-rechts
  path twop ; twop := (25.5mm,-3mm) .. (25.5mm,25.5mm) .. (25.5mm,120mm) -- 
(25.5mm,167mm) .. (120mm,167mm) -- (213mm,167mm) ; % unten-rechts

  % draw paths several times - automate?
  numeric max ; max := 5;
  for i=0 upto max :
    draw onep withcolor darkblue withtransparency ("multiply", 1/max) ;
    draw twop withcolor darkblue withtransparency ("multiply", 1/max) ;
  endfor

  naturalizepaths;

  % draw crop box (paper size)
  pickup pencircle xyscaled 0.5bp;
  draw (0,0)--(0,297mm)--(210mm,297mm)--(210mm,0)--cycle withcolor magenta;

endfig


This begins to look like I imagined, even if I’d like to add some noise 
(pattern, shading).
Jairo’s suggestion looks too regular.
(Finally, I’ll overlay the whole page with a transparent image for structure.)

As you see, both paths use only three points, but I added some more to add 
fuzzyness.
Also they get drawn several times with transparency to get a irregular width 
and some blur.

I’m quite sure this could be added to your macro, but I’m still too 
inexperienced with Metapost.

Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to