Limit randomizations of boxes by the minimum dimension.
authorMatthijs Kooijman <matthijs@stdin.nl>
Mon, 5 Oct 2009 10:17:54 +0000 (12:17 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Mon, 5 Oct 2009 10:17:54 +0000 (12:17 +0200)
Previously, the amount of randomizations was determined by the width only,
causing full width but low boxes to be heavily randomized.

Utils/Lambda.tex

index 2172bbc38d0c1c42a1b01c255fe5b2a4c0d82146..5efe1df0f0ad9aaeed8a510709e6ab490b212eeb 100644 (file)
@@ -27,7 +27,7 @@ path a, b;
 % Create a rectangle of the full size
 a := unitsquare xyscaled(\overlaywidth,\overlayheight);
 % Randomize it a bit
 % Create a rectangle of the full size
 a := unitsquare xyscaled(\overlaywidth,\overlayheight);
 % Randomize it a bit
-b := a randomized (\overlaywidth / 25) ;
+b := a randomized (min(\overlayheight, \overlaywidth) / 25) ;
 % And draw it
 drawoptions (withpen pencircle scaled .75mm withcolor black) ;
 draw b; 
 % And draw it
 drawoptions (withpen pencircle scaled .75mm withcolor black) ;
 draw b; 
@@ -77,4 +77,3 @@ draw b;
   \useMPgraphic{#1}
   \stopboxed
 }
   \useMPgraphic{#1}
   \stopboxed
 }
-