|
 |
Hans-Detlev Fink <hdf### [at] pecos nospam de> wrote in message
news:39069FEF.ADBF7469@pecos.nospam.de...
> Thanks David. I suspected something like this already.
> But then, what IS the correct syntax to apply a built-in
> function as f(x,0,z)? I can't find a way to combine
> f(x,y,z) with function{"foobar"...}. Do I have to
> first #declare something?
>
A couple of examples:
/* 'Height field' *************/
#declare H=1.0;
#declare Lac=1.5;
#declare Octs=12;
#declare Offset=0.0;
#declare T=1.0;
#declare F=function {"heteroMF",<H, Lac, Octs,Offset,T> }
isosurface{
function{y-F(x,0,z)}
eval
contained_by{box{<-2,-2,-2>,<2,2,2>}}
scale <2,.8,2>
translate z*2
pigment {Red}
}
/**************/
/* 'planet' *************/
#declare H=1;
#declare Lac=1.6;
#declare Octs=12.0;
#declare Offset=0;
#declare T=1;
#declare F=function {"heteroMF",<H, Lac, Octs,Offset,T> }
#declare Sphere=function{"sphere" <1>}
#declare PlanetSurface=function {Sphere(x,y,z)+.05*F(2*x,2*y,2*z)}
isosurface{
function{PlanetSurface}
eval
contained_by{box{-5,5}}
pigment{Red}
}
Post a reply to this message
|
 |