POV-Ray : Newsgroups : povray.advanced-users : Random placement of objects : Re: Random placement of objects Server Time
12 Jun 2024 16:35:33 EDT (-0400)
  Re: Random placement of objects  
From: Le Forgeron
Date: 29 Aug 2013 11:39:01
Message: <521f6b15$1@news.povray.org>
Le 29/08/2013 17:06, scott nous fit lire :
>> I guess what I need is a _different_, if not truly random value to
>> pass to the
>> seed() generation command.
> 
> It's typical to seed the random number generator based on the system
> time. I'm not sure if POV offers this option, but if not you can hack
> something together using the "datetime" command:
> 
> #declare mySeed = seed(val(datetime(now,"%H%M%S")));
> 
> 
You are doing it the long way.

#declare mySeed = seed(now); /* only in 3.7 */


You might want to multiply now by some constant, as the unit(1) is the day.


Post a reply to this message

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