Hi all I'm having some problems compiling a project which includes debris area fills. Depending on the exact symbol fill that I use, I am getting strange scale-dependant errors which seem to cause the compiler to loop endlessly until I force it to stop.
I originally noticed the problem when using a custom area fill that I made by modifying the standard a_debris_AUT symbol fill. I've attached my modified metapost definition in the attached text file 'a_debris_WUG.txt'. The error occurs for any scale between 1:2000 and 1:4483 (outside of this range the project compiles fine). See attached output log 'Output log - a_debris_WUG.txt'. As you can see, the file seems to loop over and over again. Initially I thought this problem was specific to my custom fill, but then I noticed that I also get a similar error when using the standard a_debris_AUT fill, however this time the error only occurs when the scale is set to exactly 1:2000 (any other scale seems to be fine). See attached output log 'Output log - a_debris_AUT.txt'. Can anyone help with this problem? Thanks Tom
def a_debris_WUG (expr p) =
T:=identity;
symbol_distance:=0.8;
scale_factor:= 0.08;
pickup PenC;
path q, qq; q = bbox p;
pair outside;
outside:= ulcorner q + up;
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
symbol_distance*uu until xpart urcorner q:
for j = ypart llcorner q step
symbol_distance*uu until ypart urcorner q:
qq := punked
(((-.5uu,-.5uu)--(.5uu,-.5uu)--(1.05uu,0.01uu)--(.5uu,.5uu)--(-.5uu,.5uu)--cycle)
randomized (uu/2))
scaled
(uniformdeviate(0.4)+scale_factor )
rotated uniformdeviate(360)
shifted ((i,j) randomized
0.5uu);
if xpart (p intersectiontimes
qq) < 0:
if
pointinside((i,j),p,outside):
thclean qq;
thdraw qq;
fi;
else:
qq:= qq scaled
(uniformdeviate(.2)+.5 )
if xpart (p
intersectiontimes qq) < 0:
if
pointinside((i,j),p,outside):
thclean
qq;
thdraw
qq;
fi;
fi;
fi;
endfor;
endfor;
);
clip tmp_pic to p;
drawoptions();
draw tmp_pic;
enddef;
Output log - a_debris_WUG.log
Description: Binary data
Output log - a_debris_AUT.log
Description: Binary data
_______________________________________________ Therion mailing list [email protected] https://mailman.speleo.sk/listinfo/therion
