POV-Ray : Newsgroups : povray.advanced-users : Random placement of objects : Re: Random placement of objects Server Time
12 Jun 2024 22:09:29 EDT (-0400)
  Re: Random placement of objects  
From: MichaelJF
Date: 29 Aug 2013 11:30:00
Message: <web.521f67fc9c8700262507f0530@news.povray.org>
scott <sco### [at] scottcom> wrote:
> > 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")));

I would be careful with that, since you can never reproduce a picture using
system time as seed. Better try hand coded seeds until you have the placement as
you like it. The last one you keep. A given seed will ever produce the same
"random" sequence.

Collision detection is not implemented in POV as all I know. If you are content
to use spheres surrounding your objects you can test the distance of their
centers againt the sum of their radii. But you can not come closer with this
approximation.

Best regards,
Michael


Post a reply to this message

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