POV-Ray : Newsgroups : povray.newusers : problems with rand : Re: problems with rand Server Time
4 Nov 2024 17:36:30 EST (-0500)
  Re: problems with rand  
From: Mike Williams
Date: 29 Jul 2003 21:04:15
Message: <Z3Q6TCAYlxJ$Ew80@econym.demon.co.uk>
Wasn't it Janne who wrote:
>Hi,
>I want to place tree rows along the z axis. Trees should be rotated
>randomly, but each tree pair (trees that are located in Pos and 0-Pos)
>should have same amount of rotation.
>
>Currently following code doesn't do that; All of the trees are rotated with
>equal values. My guess is that for some reason RdmC isn't updated when it's
>called by RA.
>
>Question: Why this xxxxxxx code doesn't work?
>
>. . .
>
>#declare RA=RdmC;

RdmC is the *seed* of a random number stream. To get a random number
from that stream you should write

#declare RA=rand(RdmC);


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.