POV-Ray : Newsgroups : povray.unofficial.patches : Bug in ridgedmf and heteromf : Re: Bug in ridgedmf and heteromf Server Time
2 Sep 2024 06:13:57 EDT (-0400)
  Re: Bug in ridgedmf and heteromf  
From: david sharp
Date: 26 Apr 2000 06:31:32
Message: <3906c584$1@news.povray.org>
Hans-Detlev Fink <hdf### [at] pecosnospamde> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.