|
|
That's still going to suffer the same problem. I'll try to break it down for
you:
The wave function has a hard edge
so the height has a hard edge
so anything modulated by either height or the wave function will have that
hard edge
And, as an aside, my wave function isn't actually a height function, it has
some overlaps.
--
Tek
http://evilsuperbrain.com
"Mike Williams" <nos### [at] econymdemoncouk> wrote in message
news:Iv3RkEA$IYXFFwU$@econym.demon.co.uk...
> Wasn't it Tek who wrote:
>>I had a similar idea, but the trouble is to fade in a different isosurface
>>on the foamy sections you need to know where those foamy sections are,
>>i.e.
>>you need to modulate it by the wave function
>
> It's not quite as complicated as that because your wave function
> modulates the height, so you just need your blending function to be a
> function of height. It doesn't need to know where the height comes from.
>
> I quickly threw together this proof-of-concept. The actual functions I
> use here are pretty naff, they just demonstrate a mechanism.
>
> #version 3.6;
> global_settings {assumed_gamma 1.0}
> camera {location <0,5,-10> look_at <0,0,0> angle 40}
> background {rgb 1}
> light_source {<-30, 100, -30> color rgb 1}
> #include "functions.inc"
>
>
> #declare WAVE = function {f_bozo(x,0,z)*2 +y -0.5}
> #declare FOAM = function {f_bozo(x*10,y*10,z*10)-0.5}
>
> #declare BLEND = function {
> WAVE(x,y,z) -
> FOAM(x,y,z) * (atan(y*20)+pi/2) *0.35
> }
>
> isosurface {
> function { BLEND(x,y,z) }
> max_gradient 12
> contained_by{box{-3,3}}
> pigment { rgb <.1,.3,.6> }
> }
>
>
> (atan(y*20)+pi/2) goes smoothly from 0.05 to pi as y goes from -1 to +1,
> so it adds more FOAM at the top of the WAVE. There are almost certainly
> better functions to use.
>
> --
> Mike Williams
> Gentleman of Leisure
Post a reply to this message
|
|