POV-Ray : Newsgroups : povray.unofficial.patches : Bug in ridgedmf and heteromf Server Time
2 Sep 2024 04:16:19 EDT (-0400)
  Bug in ridgedmf and heteromf (Message 1 to 6 of 6)  
From: Hans-Detlev Fink
Subject: Bug in ridgedmf and heteromf
Date: 25 Apr 2000 06:53:26
Message: <390578FB.7E3943C0@pecos.nospam.de>
I'm not sure whether this was mentioned before:

If those two fractals are intended to work as described in
the mega docs there are two bugs in each of them:

The docs say they are f(x,0,z). Consequently the y component
should be set to zero: V1[X]=x;V1[Y]=0;V1[Z]=z; at the beginning
of the functions. And they should return (y-result) and (y-signal)
instead of just (result) and (signal), respectively.

Or did I miss something?

-Hans-


Post a reply to this message

From: david sharp
Subject: Re: Bug in ridgedmf and heteromf
Date: 25 Apr 2000 13:40:44
Message: <3905d89c@news.povray.org>
Hans-Detlev Fink <hdf### [at] pecosnospamde> wrote
[ ... ]

Those  multifractal functions  are not intrinsically  'height fields'.
Doing
    function{y-f(x,0,z)}
is just a way to force them to act like height fields over the x,z plane.

Are these comments relevant to your question?


Post a reply to this message

From: david sharp
Subject: Re: Bug in ridgedmf and heteromf
Date: 25 Apr 2000 16:57:21
Message: <390606b1@news.povray.org>
Hans-Detlev Fink <hdf### [at] pecosnospamde> wrote

> If those two fractals are intended to work as described in
> the mega docs there are two bugs in each of them:
>
> The docs say they are f(x,0,z). Consequently the y component
> should be set to zero: V1[X]=x;V1[Y]=0;V1[Z]=z; at the beginning
> of the functions. And they should return (y-result) and (y-signal)
> instead of just (result) and (signal), respectively.
>
> Or did I miss something?

After looking at the ridgedmf and heteromf  sections (I guess I never
actually looked at them in 'published form' before), there are at least
a couple of errors. It should not give the impression that the
correct syntax is f(x,0,z). That syntax can be used  to enforce
a height field like surface, but the multifractals can be used nicely
for many other types of surfaces (clouds, planets, thingamablobs, etc)
Another error in the docs is where the -H is supposed to
be an exponent on f, not subtracted from f. (probably html superscript
got lost somewhere)


Post a reply to this message

From: Hans-Detlev Fink
Subject: Re: Bug in ridgedmf and heteromf
Date: 26 Apr 2000 03:51:55
Message: <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?

TIA

-Hans-

david sharp wrote:
> 
> Hans-Detlev Fink <hdf### [at] pecosnospamde> wrote
> 
> > If those two fractals are intended to work as described in
> > the mega docs there are two bugs in each of them:
> >
> > The docs say they are f(x,0,z). Consequently the y component
> > should be set to zero: V1[X]=x;V1[Y]=0;V1[Z]=z; at the beginning
> > of the functions. And they should return (y-result) and (y-signal)
> > instead of just (result) and (signal), respectively.
> >
> > Or did I miss something?
> 
> After looking at the ridgedmf and heteromf  sections (I guess I never
> actually looked at them in 'published form' before), there are at least
> a couple of errors. It should not give the impression that the
> correct syntax is f(x,0,z). That syntax can be used  to enforce
> a height field like surface, but the multifractals can be used nicely
> for many other types of surfaces (clouds, planets, thingamablobs, etc)
> Another error in the docs is where the -H is supposed to
> be an exponent on f, not subtracted from f. (probably html superscript
> got lost somewhere)


Post a reply to this message

From: david sharp
Subject: Re: Bug in ridgedmf and heteromf
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

From: Hans-Detlev Fink
Subject: Re: Bug in ridgedmf and heteromf
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.