Hello Dave, thank you. This is a good starting point.
Roger Am 18.04.2014 18:13, schrieb Dave Clucas: > Try this as a starting point. You should be able to introduce some > randomization and rounded corners. > > def a_tiless (expr p) = > T:=identity; > pickup PenC; > path q, qq; q = bbox p; > picture tmp_pic; > uu := max(u, (xpart urcorner q - xpart llcorner q)/100, (ypart urcorner q - > ypart llcorner q)/100); > tmp_pic := image( > for i = xpart llcorner q step 2uu until xpart urcorner q: > for j = ypart llcorner q step 2uu until ypart urcorner q: > qq := punked > (((-.5uu,-.5uu)--(.5uu,-.5uu)--(.5uu,.5uu)--(-.5uu,.5uu)--cycle) > ) > shifted ((.6i,.6j) ); > if xpart (p intersectiontimes qq) < 0: > thclean qq; > thdraw qq; > fi; > endfor; > endfor; > ); > clip tmp_pic to p; > drawoptions(); > draw tmp_pic; > enddef;
