|
![](/i/fill.gif) |
In article <3ca377f3@news.povray.org>,
"Rune" <run### [at] mobilixnet dk> wrote:
> Turbulence returns a vector for each point in space. f_noise3d returns a
> value for each point in space and thus can't simulate turbulence.
Turbulence is based on 3D noise. Just use 3 calls to f_noise3d(), each
with a random offset.
> Besides, turbulence has a level of chaos defined by the number of octaves,
> while the noise function has no level of chaos at all. This is not so
> important in my case though. The important thing is that I need an even
> distribution so that the turbulence is equally strong in all directions.
Use more noise3d() calls at different scales. That is exactly what the
octaves parameter does.
Look up some pages on Perlin noise for more ideas...
This will be slower than a built-in function, of course. You might try
and see if you can get the right result by using the function as a
pattern and turbulating the pattern, then using the pattern as a
function.
function {pattern {function {FUNCTION} turbulence...}}
FUNCTION will get the turbulated versions of the xyz parameters.
You could also do this to use those values in addition to the
unturbulated values in a separate function:
#declare turb_x = function {pattern {function {x} turbulence...}}
#declare turb_y = function {pattern {function {y} turbulence...}}
#declare turb_z = function {pattern {function {z} turbulence...}}
The distance turbulence pushes a point (the output of the vturbulence()
function) would be: < turb_x(x) - x, turb_y(y) - y, turb_z(z) - z>
--
Christopher James Huff <chr### [at] mac com>
POV-Ray TAG e-mail: chr### [at] tag povray org
TAG web site: http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |