Hi all,
for a slide template, I want to draw colored arrows in a randomized
color (from a list of colors). This works (and the code is far too
clever for me, I must have copied it somewhere):
save mycolor ; color mycolor[] ;
mycolor[1] := (0.2, 0.3, 0.4) ;
mycolor[2] := (0.6, 0.6, 0.4) ;
mycolor[3] := (0.5, 0.8, 0.5) ;
so I can write
drawarrow p withcolor mycolor[round(uniformdeviate(9))] ;
But I also want the direction of the arrow to be random. My first idea
was to define a variable that would expand either to "reverse" or the
empty string right after drawarrow, but that's where I'm stuck. Anyone
has an idea how to achieve this? (It's probably somewhere in the source,
but I can't find it.) And is the method of defining the random color OK,
or could this also be improved.
Thanks, and all best
Thomas
___________________________________________________________________________________
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
___________________________________________________________________________________