[pstricks] Fwd: Create a random path

Herbert Voss Herbert.Voss at FU-Berlin.DE
Tue Jan 26 10:15:39 CET 2010


Am 25.01.2010 23:23, schrieb Marco Daniel:

> Ok now I want to understand the code. So here are my questions:
> 
>>    usertime srand
>>    0 0
>>    30 {
>>      Rand 20 mul Rand 20 mul
> <    } repeat
>> }
> The operation Rand is like rand but Rand need a parameter. What does
> Rand do with the parameter?

Rand  returns a real random number which is then multiplied by 20.
It is defined in pstricks.pro

> The command usertime srand ->  srand gives me an integer. What does
> usertime do with this integer? I know usertime return time in millisecond.

srand initialias the random generator with the usertime

> Last but not least the numbers:
> 0 0

the starting point, can be omit, then the curve starts at the first
random point

> 30

the number of the repeat loops:  n{ ... } repeat

Herbert


More information about the PSTricks mailing list