|
|
"Chris Friedl" <cfr### [at] bigpondnetau> wrote in message
news:3d0f24c6$1@news.povray.org...
>
> One other question related to pulsating (thought of this whilst watching
> Spider-man at the movies tonight .... awesome movie) - is there a random
> function that I could hook into the clock variable so that the pulsating
> rays randonly got brighter/darker as the animation progressed? The
Columbia
> Pictures Lady with the shining torch who introduces so many movies got me
> thinking because here torch shines variable brightness and variable
> placement beams of light kind of like what I was imagining.
The trick there is going to be getting beams of light to vary in length,
seemingly radiating away slowly. My guess would be using multiple media to
arrange that so each is doing something a little different. Perhaps even in
spherical patterns so the rays eminate into a variable density from out of
the source object.
Here's the example I had to show, added randomness:
// pulser (not pulsar)
camera {
location -9*z
look_at 0
}
#declare Times=1; // number of cycles
#declare Pulse=abs(sin(clock*Times*pi));
#declare S=seed(321*clock); // make input value for random number
#declare R=rand(S); // get random number 0 to 1
union {
light_source {0,<1.5,1,.5>
fade_distance .5+Pulse*2 // ray lengths
fade_power 1+int(Pulse*2) // ray drop-off
}
sphere {0,10 // encapsulation of media "air"
pigment {
checker color rgb .25 color rgb .5 scale 2 // rgbf 1
}
finish {ambient .5}
interior {
media {
scattering {
1, .1 // scatter amount of light (obscuration)
extinction .1 // artificially brightened
}
density {
rgb 1 // air thickness (also obscuration)
}
}
}
hollow
}
sphere {0,1 // the ray object
pigment {
bozo
color_map {
[.33+R*.33 color rgbt Pulse] // alternating opaque and clear over time
[.33+R*.33 color rgbf <.1,.2,.9,1>*Pulse] // more solid, visible parts
}
// phase R*clock // shift pattern
scale .25
turbulence .25+R*.25 // shake up the pattern
}
finish {ambient Pulse}
}
} // union
Post a reply to this message
|
|