|
|
The simplest way to do this is:
#declare lower_bound = something;
#declare upper_bound = somethingelse;
#declare MySeed = seed(2531); // or some other number, big and prime is nice
object { whatever
translate lower_bound + rand(MySeed)*(upper_bound - lower_bound) }
// end
something and something else can be vectors, but they will distribute within a
straight line, so you will have to do this in triplicate for three different
vectors to fill space.
Reuben Pearse wrote:
> Hi all,
>
> I have created a macro to create an object. I now want to randomly place the
> object in my scene (within specified boundaries!!)
> How do I get POVRay to generate random numbers?
>
> Thanks,
>
> Reuben
--
Josh English -- Lexiphanic Lethomaniac
eng### [at] spiritonecom
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/
"He who hebetates is last."
Post a reply to this message
|
|