Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Public Member Functions | Static Public Member Functions | List of all members
SimplexNoise Class Reference

A Perlin Simplex Noise C++ Implementation (1D, 2D, 3D, 4D). More...

#include <SimplexNoise.h>

Public Member Functions

float fractal (size_t octaves, float x) const
 
float fractal (size_t octaves, float x, float y) const
 
 SimplexNoise (float frequency=1.0f, float amplitude=1.0f, float lacunarity=2.0f, float persistence=0.5f)
 

Static Public Member Functions

static float simplex1 (float x)
 
static float noise (float x)
 
static float noise (float x, float y)
 

Detailed Description

A Perlin Simplex Noise C++ Implementation (1D, 2D, 3D, 4D).

Constructor & Destructor Documentation

SimplexNoise::SimplexNoise ( float  frequency = 1.0f,
float  amplitude = 1.0f,
float  lacunarity = 2.0f,
float  persistence = 0.5f 
)
inlineexplicit

Constructor of to initialize a fractal noise summation

Parameters
[in]frequencyFrequency ("width") of the first octave of noise (default to 1.0)
[in]amplitudeAmplitude ("height") of the first octave of noise (default to 1.0)
[in]lacunarityLacunarity specifies the frequency multiplier between successive octaves (default to 2.0).
[in]persistencePersistence is the loss of amplitude between successive octaves (usually 1/lacunarity)

Member Function Documentation

float SimplexNoise::noise ( float  x)
static

1D Perlin simplex noise

Takes around 74ns on an AMD APU.

Parameters
[in]xfloat coordinate
Returns
Noise value in the range[-1; 1], value of 0 on all integer coordinates.
float SimplexNoise::noise ( float  x,
float  y 
)
static

2D Perlin simplex noise

Takes around 150ns on an AMD APU.

Parameters
[in]xfloat coordinate
[in]yfloat coordinate
Returns
Noise value in the range[-1; 1], value of 0 on all integer coordinates.
float SimplexNoise::fractal ( size_t  octaves,
float  x 
) const

Fractal/Fractional Brownian Motion (fBm) summation of 1D Perlin Simplex noise

Parameters
[in]octavesnumber of fraction of noise to sum
[in]xfloat coordinate
Returns
Noise value in the range[-1; 1], value of 0 on all integer coordinates.
float SimplexNoise::fractal ( size_t  octaves,
float  x,
float  y 
) const

Fractal/Fractional Brownian Motion (fBm) summation of 2D Perlin Simplex noise

Parameters
[in]octavesnumber of fraction of noise to sum
[in]xx float coordinate
[in]yy float coordinate
Returns
Noise value in the range[-1; 1], value of 0 on all integer coordinates.

The documentation for this class was generated from the following files: