[metapost] non-deviant "deviates"

h h extern pragma at wxs.nl
Sun Feb 27 12:41:58 CET 2005


L. Nobre G. wrote:
> On Sat, 26 Feb 2005, Larry Siebenmann wrote:
> 
> 
>>The pseudo random number generating functions
>>"uniformdeviate" and "normaldeviate" are, when unseeded,
>>*intended* to begin preudo randomly with a seed number that
>>depends on time. See the metafont book.  It would
>>obviously be appropriate that successive launches of a job
>>have different seeds.
>>[...] What is essential is that the seeds at
>>successive launches be different -- and even an ancient
>>computer could manage that; so this misfeature was,  I
>>suspect, *never* necessary.
> 
> 
> No. What is essential is is that seeds at successive launches be different
> by default and the same when needed. When producing animations from
> metapost figures it is sometimes appropriate to have the same fixed random
> situation in several frames.

this inaccuracy is a known fact (also tex suffers from it when implementing 
random number generators); (at least on windows) a different time function is used;

[in context i simply generate a random seed using perl]

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------



More information about the metapost mailing list