|
|
On Tue, 18 Dec 2001 02:35:29 +0100, Tor Olav Kristensen <tor### [at] hotmailcom>
wrote:
> It would be interesting to see
> the function for those.
it wasn't real recursive function but unrolled one. Just set of identical
functions called according to condition.
> Source please ?
#declare L1=.3;
#declare L2=.3;
#declare L3=.3;
#declare L4=.3;
#declare R=.4;
#declare f_level_4=function{
select(
f_noise3d(19*floor(x),20*floor(y),21*floor(z))-L4,
f_sphere(x-(floor(x)+.5),y-(floor(y)+.5),z-(floor(z)+.5),R),
1
)
}
#declare f_level_3=function{
select(
f_noise3d(16*floor(x),17*floor(y),18*floor(z))-L3,
f_sphere(x-(floor(x)+.5),y-(floor(y)+.5),z-(floor(z)+.5),R),
f_level_4(x*2,y*2,z*2)
)
}
#declare f_level_2=function{
select(
f_noise3d(13*floor(x),14*floor(y),15*floor(z))-L2,
f_sphere(x-(floor(x)+.5),y-(floor(y)+.5),z-(floor(z)+.5),R),
f_level_3(x*2,y*2,z*2)
)
}
#declare f_level_1=function{
select(
f_noise3d(10*floor(x),11*floor(y),12*floor(z))-L1,
f_sphere(x-(floor(x)+.5),y-(floor(y)+.5),z-(floor(z)+.5),R),
f_level_2(x*2,y*2,z*2)
)
}
#local N=2;
isosurface{
function{f_level_1(x,y,z)}
contained_by{box{-N,N}}
max_gradient 5
evaluate 1, 10, 0.99
scale 1.1/N
rotate 30*y
rotate -10*x
texture { T_Glass1 } interior { I_Glass1 }
no_shadow
}
ABX
Post a reply to this message
|
|