|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
|
|