POV-Ray : Newsgroups : povray.advanced-users : Need a script to randomly scatter objects vertically : Re: Need a script to randomly scatter objects vertically Server Time
25 Apr 2024 00:50:15 EDT (-0400)
  Re: Need a script to randomly scatter objects vertically  
From: Mike Horvath
Date: 12 May 2021 18:20:58
Message: <609c54ca$1@news.povray.org>
On 5/12/2021 10:19 AM, Alain Martel wrote:
> For the spikes. You just need to ignore the normal returned by the trace 
> function when placing them.
> So, remove any vrotate or vorient.

There is actually a macro setting for this, I found out. But it is for 
*all* the objects, not for each object individually.


> 
> For the rounding... I would try using the modulo function.
> Something like this :
> #declare LEGO_Position = <Position.x-mod(Position.x, 10), 
> Position.y-mod(Position.y, 8), Position.z-mod(Position.z, 10)>

Thanks!


Mike


Post a reply to this message

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