|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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.
The code is posted to p.t.s
Comments and help welcome.
Nekar
Post a reply to this message
Attachments:
Download 'Lightning.jpg' (6 KB)
Preview of image 'Lightning.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
in <3aea8c3a@news.povray.org> Nekar Xenos wrote:
> I can't seem to get it to show on any other background though.
Add absorbing media, with complement colour to the emitting media.
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I've got it working now.
Thanks
Nekar
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I don't know about the rest, but I would like to see the code.
Gail Shaw wrote:
>
> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I while ago I wrote a macro for lightnings .. I'll see, if I can find it again ...
here is a pic I did with it ...
--
background{rgb 1}camera{location<1,5,-2>look_at 0}#macro m(a,b,i)#local d=(b-a)
/8;#local e=vcross(d,y);#if(i)m(a-e,a+e+2*d,i-1)m(a+e,a+2*d-e,i-1)m(a+3*d-e,a+e
+3*d,i-1)m(a+3*d-e,a+5*d-e,i-1)m(a+6*d-e,a+e+6*d,i-1)m(a+8*d-e,a+e+8*d,i-1)#else
cylinder{a,b,vlength(d)/3 pigment{rgb 0}}#end#end m(-4*x,2*x,4) // Jan Walzer
Post a reply to this message
Attachments:
Download 'img1.png' (65 KB)
Preview of image 'img1.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
We're off today at work but I came in just to upload my modifications and
now it seems the stiffy I put it on is messed up. Will bring it in tomorrow.
I first tried making branches at random intervals, but I couldn't get it to
be infrequently enough. I've just thought of something - maybe if I tried
#declare ChanceToBranch = 0.01
#if (ChanceToBranch > rand(md))
lighningbranch...
I think this is basically the same as your example below except I haven't
tried a macro yet.
At the moment I've got it to make three branches but I'd like to be able to
specify x amount of branches and y amount of sub-branches for instance.
Something like a modified tree macro.I first tried making branches at random
intervals, but I couldn't get it to be infrequently enough. I've just
thought of something - maybe if I tried
#declare ChanceToBranch = 0.01
#if (ChanceToBranch > rand(md))
lighningbranch...
> 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.
>
Thanks. I'm not sure what that 'md' is you've got in the rand statement, can
you explain a little more - unless md is the seed of course.
> I've got some lightning code that I never finished. If you like
> I'll post it.
That would be wonderfull - thank you.
Nekar
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Not exactly what I was looking for, but can you remember how you did the
branching? (This is more like sparks than lightning)
Nekar
"Jan Walzer" <jan### [at] lzernet> wrote in message
news:3aeb2fcc@news.povray.org...
> I while ago I wrote a macro for lightnings .. I'll see, if I can find it
again ...
>
> here is a pic I did with it ...
>
> --
> background{rgb 1}camera{location<1,5,-2>look_at 0}#macro m(a,b,i)#local
d=(b-a)
> /8;#local
e=vcross(d,y);#if(i)m(a-e,a+e+2*d,i-1)m(a+e,a+2*d-e,i-1)m(a+3*d-e,a+e
>
+3*d,i-1)m(a+3*d-e,a+5*d-e,i-1)m(a+6*d-e,a+e+6*d,i-1)m(a+8*d-e,a+e+8*d,i-1)#
else
> cylinder{a,b,vlength(d)/3 pigment{rgb 0}}#end#end m(-4*x,2*x,4) // Jan
Walzer
>
>
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nekar Xenos <j-p### [at] citywalkcoza> wrote in message
news:3aed3842@news.povray.org...
>
> Thanks. I'm not sure what that 'md' is you've got in the rand statement,
can
> you explain a little more - unless md is the seed of course.
Sorry, I always have a random stream called rnd, makes it easier
to remember variable names.
so
#declare rnd=seed(8393);
>
> > I've got some lightning code that I never finished. If you like
> > I'll post it.
>
> That would be wonderfull - thank you.
If I've got a copy with me I'll post it, otherwise on
wednesday. Look in p.t.s-f
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Gail Shaw" <gsh### [at] monotixcoza> wrote in message
news:3aed4bc4@news.povray.org...
>
> Nekar Xenos <j-p### [at] citywalkcoza> wrote in message
> news:3aed3842@news.povray.org...
> >
> > Thanks. I'm not sure what that 'md' is you've got in the rand statement,
> can
> > you explain a little more - unless md is the seed of course.
>
> Sorry, I always have a random stream called rnd, makes it easier
> to remember variable names.
>
> so
>
> #declare rnd=seed(8393);
Oops! When I looked at the post at home I saw it's rnd. Here at work it
looks like md... ;o)
I'm still trying to figure out you're code... but I'm new to macros, so it
will probably take a while...
Nekar
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |