POV-Ray : Newsgroups : povray.binaries.images : Lightning WIP : Re: Lightning WIP Server Time
18 Aug 2024 12:19:05 EDT (-0400)
  Re: Lightning WIP  
From: Gail Shaw
Date: 28 Apr 2001 07:11:47
Message: <3aeaa573@news.povray.org>
Nekar Xenos <j-p### [at] citywalkcoza> wrote in message
news:3aea8c3a@news.povray.org...
> My first try at lightning.
> I can't seem to get it to show on any other background though. I also
still
> need to figure out how to do the branches.
>

Make it recursive.

#macro lightning(......)
 ................
 #if (ChanceToBranch < rand(rnd))
    lightning(.......)
 #end
#end

ChanceToBranch should decrease each time
it recurses so that the macro will finish at some time.

I've got some lightning code that I never finished. If you like
I'll post it.

Gail
*************************************************************************
* gsh### [at] monotixcoza                *   Step into the abyss,           *
* http://www.rucus.ru.ac.za/~gail/   *   and let go.        Babylon 5   *
*************************************************************************
* The difficult we do immediately, the impossible takes a little longer *
*************************************************************************


Post a reply to this message

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