POV-Ray : Newsgroups : povray.advanced-users : How to turbulate a function? Server Time
29 Jul 2024 08:13:31 EDT (-0400)
  How to turbulate a function? (Message 1 to 6 of 6)  
From: Pyry
Subject: How to turbulate a function?
Date: 4 Oct 2002 05:10:04
Message: <web.3d9d5a426999568011b82ee40@news.povray.org>
(I couldn't find this searching to news-group)
I'd like to add turbulence on my isosurface-functions.

Of course I could do it with a turbulated pigment and convert it to a
function, but converting a function pattern to a isosurface function is
quite slow to render.

So how do I add turbulence to a regular function?
How does turbulence work in a mathematical way?


Post a reply to this message

From: Hugo
Subject: Re: How to turbulate a function?
Date: 4 Oct 2002 07:30:25
Message: <3d9d7bd1$2@news.povray.org>
As far as I know, "f_noise3d"  from "functions.inc" relies on the same
formula as turbulence. I could be wrong though.

Regards,
Hugo


Post a reply to this message

From: Pyry
Subject: Re: How to turbulate a function?
Date: 4 Oct 2002 10:30:08
Message: <web.3d9da5479a9543f6398d8dbb0@news.povray.org>
Hugo wrote:
>As far as I know, "f_noise3d"  from "functions.inc" relies on the same
>formula as turbulence. I could be wrong though.
>
>Regards,
>Hugo
>

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

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


Post a reply to this message

From: Hugo
Subject: Re: How to turbulate a function?
Date: 4 Oct 2002 11:04:37
Message: <3d9dae05@news.povray.org>
> Is turbulence so internal in POV-Ray that I cannot
> create a mathematical function for it?
>
> I think i can do what I need to do with f_noise3d, but how
> do I "simulate" lambda, octaves and omega with it?

Until a more specific answer comes up, maybe with a formula for you, you
could read about perlin noise this way:

http://www.google.com/search?hl=da&ie=ISO-8859-1&q=perlin+noise&lr=

There is a lot of interesting stuff and different kind of explanations.

Regards,
Hugo


Post a reply to this message

From: Christopher James Huff
Subject: Re: How to turbulate a function?
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

From: Mike Williams
Subject: Re: How to turbulate a function?
Date: 4 Oct 2002 15:04:12
Message: <8f006AAJwdn9EwjB@econym.demon.co.uk>
Wasn't it Hugo who wrote:
>As far as I know, "f_noise3d"  from "functions.inc" relies on the same
>formula as turbulence. I could be wrong though.

You can apply turbulence to a function pattern with "warp" (see
<http://www.econym.demon.co.uk/isotut/patterns.htm> but I don't know if
you can do it to non-pattern functions.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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