Previous:Waveforms Main Index Next:Octaves

#### Turbulence

The keyword `turbulence` followed by a float or vector may be used to stir up any `pigment`, `normal`, `texture`, `irid` or `density`. A number of optional parameters may be used with turbulence to control how it is computed. The syntax is:

TURBULENCE_ITEM:

`
  turbulence
` <Amount> | `octaves` Count | `omega` Amount | `lambda` Amount

Typical turbulence values range from the default 0.0, which is no turbulence, to 1.0 or more, which is very turbulent. If a vector is specified different amounts of turbulence are applied in the x-, y- and z-direction. For example

      turbulence <1.0, 0.6, 0.1>

has much turbulence in the x-direction, a moderate amount in the y-direction and a small amount in the z-direction.

Turbulence uses a random noise function called DNoise. This is similar to the noise used in the `bozo` pattern except that instead of giving a single value it gives a direction. You can think of it as the direction that the wind is blowing at that spot. Points close together generate almost the same value but points far apart are randomly different.

In general the order of turbulence parameters relative to other pattern modifiers such as transformations, color maps and other maps is not important. For example scaling before or after turbulence makes no difference. The turbulence is done first, then the scaling regardless of which is specified first. See section "" for a way to work around this behavior.

In general, the order of turbulence parameters relative to each other and to other pattern modifiers such as transformations or `color_map` and other maps is not important. For example scaling before or after turbulence makes no difference. The turbulence is done first, then the scaling regardless of which is specified first. However the order in which transformations are performed relative to `warp` statements is important. You can also specify turbulence inside `warp` and in this way you can force turbulence to be applied after transformations. See "Warps" for details.

Turbulence uses DNoise to push a point around in several steps called `octaves`. We locate the point we want to evaluate, then push it around a bit using turbulence to get to a different point then look up the color or pattern of the new point.

It says in effect "Don't give me the color at this spot... take a few random steps in different directions and give me that color". Each step is typically half as long as the one before. For example:

Turbulence random walk.

The magnitude of these steps is controlled by the turbulence value. There are three additional parameters which control how turbulence is computed. They are `octaves`, `lambda` and `omega`. Each is optional. Each is followed by a single float value. Each has no effect when there is no turbulence.

Previous:Waveforms Main Index Next:Octaves