At 10:47 10.09.2001 +0200, Frans Goddijn wrote:
>But where in the graphics should I put the "randomseed" info?

It is not used as a parameter for draw, make it a separate assignment. All 
subsequently generated random numbers will be identical for future mp runs.
This might me a problem if you want it to affect only a single draw (do 
you?), then it would have to be a local assignment. Or you would have to 
assign it a new value after this single draw, randomly generated from 
another source, maybe passed from TeX. But I'm not that experienced with 
mp/context to present you a solution to this problem on the fly. Ah, 
however, except putting the randomseed assignment and the commands to be 
affected at the very end of your graphic. But if you need something like 
this, Hans will surely have a good idea.

For this graphic,

\startreusableMPgraphic{omcirkeld}
    randomseed:=2022;
    draw fulldiamond xyscaled (OverlayWidth,OverlayHeight)
      randomized (30*OverlayLineWidth)
      withpen pencircle scaled OverlayLineWidth
      withcolor OverlayLineColor ;
   path b ; b := boundingbox currentpicture ;
   setbounds currentpicture to b enlarged 10pt ;
\stopreusableMPgraphic

should do it.

Eckhart

Reply via email to