Periodical Noise/Turbulence/Fbm 函数

详细描述

函数

Float   SNoiseP ( 向量 p, Float t, Int32 t_repeat)
Float   TurbulenceP ( 向量 p, Float t, Float oct, Bool abs, Int32 t_repeat)
Float   FbmP ( Float *table, 向量 p, Float t, Float oct, Int32 t_repeat)
Float   RidgedMultifractalP ( Float *table, 向量 p, Float t, Float oct, Float offset, Float gain, Int32 t_repeat)

变量

static const Int32   NOISE_RESOLUTION

Function Documentation

◆  SNoiseP()

Float SNoiseP ( 向量   p ,
Float   t ,
Int32   t_repeat  
)

Generates a periodic signed noise value.

参数
[in] p The noise coordinate.
[in] t The time.
[in] t_repeat The time repeat. Must be 2^ x - 1 ,其中 x = [ 1 .. 10 ], i.e. one of 1 , 3 , 7 , 15 , 31 , 63 , 127 , 255 , 511 ,和 1023 .
A noise repeats itself in time every 1024 units. Using a smaller t_repeat the noise will repeat at an earlier time.
返回
The signed noise value, between -1.0 and 1.0 .

◆  TurbulenceP()

Float TurbulenceP ( 向量   p ,
Float   t ,
Float   oct ,
Bool   abs ,
Int32   t_repeat  
)

Generates a periodic turbulence value, this is a sum of multiple noises with different frequency.

参数
[in] p The noise coordinate.
[in] t The time.
[in] oct The number of octaves.
[in] abs true for the absolute value.
[in] t_repeat The time repeat. Must be 2^ x - 1 ,其中 x = [ 1 .. 10 ], i.e. one of 1 , 3 , 7 , 15 , 31 , 63 , 127 , 255 , 511 ,和 1023 .
A noise repeats itself in time every 1024 units. Using a smaller t_repeat the noise will repeat at an earlier time.
返回
The turbulence value, between -1.0 and 1.0 unless abs is true , in which case it will be between 0.0 to 1.0 .

◆  FbmP()

Float FbmP ( Float table ,
向量   p ,
Float   t ,
Float   oct ,
Int32   t_repeat  
)

Generates a periodic Fractional Brownian Motion value.

注意
InitFbm() must be called before this function.
参数
[in] table The preallocated and initialized table by InitFbm() . The caller owns the pointed array.
[in] p The evaluation point.
[in] t The time.
[in] oct The number of octaves. Must not exceed the max_octaves value passed to InitFbm() , but can be lower.
[in] t_repeat The time repeat. Must be 2^ x - 1 ,其中 x = [ 1 .. 10 ], i.e. one of 1 , 3 , 7 , 15 , 31 , 63 , 127 , 255 , 511 ,和 1023 .
A noise repeats itself in time every 1024 units. Using a smaller t_repeat the noise will repeat at an earlier time.
返回
The fBm value.

◆  RidgedMultifractalP()

Float RidgedMultifractalP ( Float table ,
向量   p ,
Float   t ,
Float   oct ,
Float   offset ,
Float   gain ,
Int32   t_repeat  
)

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

注意
InitFbm() must be called before this function.
参数
[in] table The preallocated and initialized table by InitFbm() . The caller owns the pointed array.
[in] p The evaluation point.
[in] t The time.
[in] oct The number of octaves. Must not exceed the max_octaves value passed to InitFbm() , but can be lower.
[in] offset The zero offset, this controls the multi-fractal.
[in] gain The amplification of the fractal value.
[in] t_repeat The time repeat. Must be 2^ x - 1 ,其中 x = [ 1 .. 10 ], i.e. one of 1 , 3 , 7 , 15 , 31 , 63 , 127 , 255 , 511 ,和 1023 .
A noise repeats itself in time every 1024 units. Using a smaller t_repeat the noise will repeat at an earlier time.
返回
The fractal value.

Variable Documentation

◆  NOISE_RESOLUTION

const Int32 NOISE_RESOLUTION static

Noise resolution.