POV-Ray : Newsgroups : povray.advanced-users : Randomly timed events : Randomly timed events Server Time
29 Jun 2024 00:09:14 EDT (-0400)
  Randomly timed events  
From: Bald Eagle
Date: 29 Aug 2013 08:25:00
Message: <web.521f3cdb71b5bb97dd2ebc560@news.povray.org>
I'm trying to do a quick and dirty simulation of lightning flashes with
momentarily appearing point light_sources in a scene, and it appears that I
don't get any flashes except coincidentally and suspiciously in what appears to
be the very last frame.

All I'm doing right now is

#if (Flash = clock)
light_source { < rand(FlashX), rand(FlashY), rand(FlashZ) > color rgb <1,1,1> *
rand(Brightness) }
#end

I'm thinking that I need to "open the window" of where the random value and the
clock coincide to increase the probability of a flash - although I'm concerned
that my lack of insight into pseudo-random numbers in POV-Ray might doom me to
pre-destined failure here...  (See other thread on random placement of objects)

Has anyone worked with this type of thing before?
Helpful suggestions?


Post a reply to this message

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