POV-Ray : Newsgroups : povray.advanced-users : How to turbulate a function? : Re: How to turbulate a function? Server Time
29 Jul 2024 06:17:50 EDT (-0400)
  Re: How to turbulate a function?  
From: Christopher James Huff
Date: 4 Oct 2002 13:19:09
Message: <chrishuff-038CFC.13155004102002@netplex.aussie.org>
In article <web.3d9da5479a9543f6398d8dbb0@news.povray.org>,
 "Pyry" <fro### [at] suomi24fi> wrote:

> Is turbulence so internal in POV-Ray that I cannot create a mathematical
> function for it?

Not at all, but it would be slower.

Try something like this:
#declare turbedFn =
function {
    pattern {
        function {originalFn(x, y, z)}
        warp {turbulence ...}
    }
}
A turbulated function pattern in a pattern function. ;-)


> I think i can do what I need to do with f_noise3d, but how do I "simulate"
> lambda, octaves and omega with it?

Turbulence is a fractal, it is computed by computing the sum of several 
samples of vector noise, each with different scales and different 
amplitudes. The octaves parameter controls the number of noise samples, 
the lambda and omega parameters control the size and strength of each 
one compared to the previous one. The point the pattern is evaluated at 
is then offset by the sum of these noise samples (actually, the sum 
scaled by the noise amount parameter).
You could hard-code your own turbulence functions, and it would be more 
flexible, but a lot slower. The biggest problem: user-defined vector 
functions don't exist yet, so you would have to define x, y, and z 
functions, and manually add them to the xyz coordinates given to the 
function being turbulated.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.