|
![](/i/fill.gif) |
In article <web.3da91f6d351cc2ee398d8dbb0@news.povray.org>,
"Pyry" <fro### [at] suomi24 fi> wrote:
> I've been experimenting with POV's f_noise3d.
> It can be used to simulate POV's turbulence in patterns but it cannot
> simulate lambda because the function is 3-dimensional.
> I think f_noise4d should do the trick. If you try to get the next turbulence
> value from the 4th dimension instead of x,y or z. Lambda is the distance
> travelled along the t-axel on each octave (Is it not?).
>
> f_noise4d(x,y,z,t) could also be used in animating 3d-clouds. If you take
> the next value from x,y or z the clouds seem to be moving instead of
> changing. And if you want the clouds to move along x and change just move
> the function along the vector<1,0,0,1>.
> Would f_noise5d be needed if you want clouds with lambda?
>
> Do we need a patch to add f_noise4d to POV or does anybody know how to do
> 4d-interpolation? (the f_noise3d uses 3d-interpolation, right?).
4D noise would be useful, but not for this. You misunderstood the way
lambda works, it affects the scaling of the amplitude of each octave of
noise. No additional dimensions necessary.
Octaves: number of noise samples taken.
Omega: the size scaling applied to the size scaling factor for each
sample.
Lambda: the amplitude scaling applied to the amplitude scaling factor
for each sample.
Pseudo-code for a turbulence function:
vector total = < 0, 0, 0>;
vector pt = point;
float lm = 1;
for(int n = 0; n < octaves; n++)
{
total += vnoise(pt)*lm;
pt *= omega;
lm *= lambda;
}
The main thing you need is a vector noise function...POV has one that it
uses for turbulence, but it hasn't been made available to functions for
the simple reason that functions can't handle vectors.
And besides, if you just want different noise functions, separate noise
generators with different seeds would be better...4D noise is more
expensive to compute than 3D noise.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |