FastLED  3.1
Noise functions

Simplex noise function definitions. More...

scaled 16 bit noise functions

16 bit, fixed point implementation of perlin's Simplex Noise.

Coordinates are 16.16 fixed point values, 32 bit integers with integral coordinates in the high 16 bits and fractional in the low 16 bits, and the function takes 1d, 2d, and 3d coordinate values. These functions are scaled to return 0-65535

uint16_t inoise16 (uint32_t x, uint32_t y, uint32_t z)
 
uint16_t inoise16 (uint32_t x, uint32_t y)
 
uint16_t inoise16 (uint32_t x)
 

raw 16 bit noise functions

int16_t inoise16_raw (uint32_t x, uint32_t y, uint32_t z)
 16 bit raw versions of the noise functions. More...
 
int16_t inoise16_raw (uint32_t x, uint32_t y)
 
int16_t inoise16_raw (uint32_t x)
 

8 bit scaled noise functions

8 bit, fixed point implementation of perlin's Simplex Noise.

Coordinates are 8.8 fixed point values, 16 bit integers with integral coordinates in the high 8 bits and fractional in the low 8 bits, and the function takes 1d, 2d, and 3d coordinate values. These functions are scaled to return 0-255

uint8_t inoise8 (uint16_t x, uint16_t y, uint16_t z)
 
uint8_t inoise8 (uint16_t x, uint16_t y)
 
uint8_t inoise8 (uint16_t x)
 

8 bit raw noise functions

8 bit raw versions of the noise functions.

These values are not scaled/altered and have output values roughly in the range (-70,70)

int8_t inoise8_raw (uint16_t x, uint16_t y, uint16_t z)
 
int8_t inoise8_raw (uint16_t x, uint16_t y)
 
int8_t inoise8_raw (uint16_t x)
 

raw fill functions

Raw noise fill functions - fill into a 1d or 2d array of 8-bit values using either 8-bit noise or 16-bit noise functions.

Parameters
pDatathe array of data to write into
num_pointsthe number of points of noise to compute
octavesthe number of octaves to use for noise
xthe x position in the noise field
ythe y position in the noise field for 2d functions
scalexthe scale (distance) between x points when filling in noise
scaleythe scale (distance) between y points when filling in noise
timethe time position for the noise field
void fill_raw_noise8 (uint8_t *pData, uint8_t num_points, uint8_t octaves, uint16_t x, int scalex, uint16_t time)
 
void fill_raw_noise16into8 (uint8_t *pData, uint8_t num_points, uint8_t octaves, uint32_t x, int scalex, uint32_t time)
 
void fill_raw_2dnoise8 (uint8_t *pData, int width, int height, uint8_t octaves, uint16_t x, int scalex, uint16_t y, int scaley, uint16_t time)
 
void fill_raw_2dnoise16into8 (uint8_t *pData, int width, int height, uint8_t octaves, uint32_t x, int scalex, uint32_t y, int scaley, uint32_t time)
 
void fill_raw_2dnoise16 (uint16_t *pData, int width, int height, uint8_t octaves, q88 freq88, fract16 amplitude, int skip, uint32_t x, int scalex, uint32_t y, int scaley, uint32_t time)
 
void fill_raw_2dnoise16into8 (uint8_t *pData, int width, int height, uint8_t octaves, q44 freq44, fract8 amplitude, int skip, uint32_t x, int scalex, uint32_t y, int scaley, uint32_t time)
 

fill functions

fill functions to fill leds with values based on noise functions.

These functions use the fill_raw_* functions as appropriate.

void fill_noise8 (CRGB *leds, int num_leds, uint8_t octaves, uint16_t x, int scale, uint8_t hue_octaves, uint16_t hue_x, int hue_scale, uint16_t time)
 
void fill_noise16 (CRGB *leds, int num_leds, uint8_t octaves, uint16_t x, int scale, uint8_t hue_octaves, uint16_t hue_x, int hue_scale, uint16_t time, uint8_t hue_shift=0)
 
void fill_2dnoise8 (CRGB *leds, int width, int height, bool serpentine, uint8_t octaves, uint16_t x, int xscale, uint16_t y, int yscale, uint16_t time, uint8_t hue_octaves, uint16_t hue_x, int hue_xscale, uint16_t hue_y, uint16_t hue_yscale, uint16_t hue_time, bool blend)
 
void fill_2dnoise16 (CRGB *leds, int width, int height, bool serpentine, uint8_t octaves, uint32_t x, int xscale, uint32_t y, int yscale, uint32_t time, uint8_t hue_octaves, uint16_t hue_x, int hue_xscale, uint16_t hue_y, uint16_t hue_yscale, uint16_t hue_time, bool blend, uint16_t hue_shift=0)
 

Detailed Description

Simplex noise function definitions.

Function Documentation

int16_t inoise16_raw ( uint32_t  x,
uint32_t  y,
uint32_t  z 
)

16 bit raw versions of the noise functions.

These values are not scaled/altered and have output values roughly in the range (-18k,18k)

Definition at line 276 of file noise.cpp.