Detailed Description

Functions

void InitFbm (Float *table, Int32 max_octaves, Float lacunarity, Float h)
 
Float Fbm (Float *table, const Vector &p, Float oct)
 
Float Fbm (Float *table, const Vector &p, Float t, Float oct)
 
Float RidgedMultifractal (Float *table, const Vector &p, Float oct, Float offset, Float gain)
 

Function Documentation

◆ InitFbm()

void InitFbm ( Float table,
Int32  max_octaves,
Float  lacunarity,
Float  h 
)

Initializes the tables needed for the Fractional Brownian Motion.
Example:

Float arr[20];
InitFbm(arr, 10, 2.0, 0.5); // max_octaves must not exceed 18 (as the array can contain 20 values maximum)
maxon::Float Float
Definition: ge_sys_math.h:66
void InitFbm(Float *table, Int32 max_octaves, Float lacunarity, Float h)
Definition: c4d_tools.h:1171
Parameters
[in]tableA preallocated array of size max_octaves+2. The caller owns the pointed array.
[in]max_octavesThe number of octaves for the table.
[in]lacunarityThe gap between successive frequencies.
[in]hThe fractal increment parameter.

◆ Fbm() [1/2]

Float Fbm ( Float table,
const Vector p,
Float  oct 
)

Generates a Fractional Brownian Motion value.

Note
InitFbm() must be called before this function.
Parameters
[in]tableThe preallocated and initialized table by InitFbm(). The caller owns the pointed array.
[in]pThe evaluation point.
[in]octThe number of octaves. Must not exceed the max_octaves value passed to InitFbm(), but can be lower.
Returns
The fBm value.

◆ Fbm() [2/2]

Float Fbm ( Float table,
const Vector p,
Float  t,
Float  oct 
)

Generates a Fractional Brownian Motion value.

Note
InitFbm() must be called before this function.
Parameters
[in]tableThe preallocated and initialized table by InitFbm(). The caller owns the pointed array.
[in]pThe evaluation point.
[in]tThe time.
[in]octThe number of octaves. Must not exceed the max_octaves value passed to InitFbm(), but can be lower.
Returns
The fBm value.

◆ RidgedMultifractal()

Float RidgedMultifractal ( Float table,
const Vector p,
Float  oct,
Float  offset,
Float  gain 
)

Generates a fractal function used for such things as landscapes or mountain ranges.

Note
InitFbm() must be called before this function.
Parameters
[in]tableThe preallocated and initialized table by InitFbm(). The caller owns the pointed array.
[in]pThe evaluation point.
[in]octThe number of octaves. Must not exceed the max_octaves value passed to InitFbm(), but can be lower.
[in]offsetThe zero offset, this controls the multi-fractal.
[in]gainThe amplification of the fractal value.
Returns
The fractal value.