POV-Ray : Newsgroups : povray.unofficial.patches : Bug in ridgedmf and heteromf : Re: Bug in ridgedmf and heteromf Server Time
2 Sep 2024 06:18:57 EDT (-0400)
  Re: Bug in ridgedmf and heteromf  
From: Hans-Detlev Fink
Date: 26 Apr 2000 08:55:00
Message: <3906E6F7.D37BAA81@pecos.nospam.de>
Thanks again, David.

When I first implemented these functions in i_fract (way back
when we had no megapatch yet) I set y=0 explicitly
in the code. The nice function{...} syntax was not fully
available those days. Now I see the combination of a more
generic function with megapov's new syntax is much more
versatile.

david sharp wrote:
> 
> 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.