FastLED 3.9.15
Loading...
Searching...
No Matches
noise.cpp File Reference

Detailed Description

Functions to generate and fill arrays with noise.

Definition in file noise.cpp.

#include <string.h>
#include "FastLED.h"
+ Include dependency graph for noise.cpp:

Go to the source code of this file.

Macros

#define FASTLED_INTERNAL
 Disables pragma messages and warnings.
 
#define P(x)
 Reads a single byte from the p array.
 
#define VARIABLE_LENGTH_ARRAY(TYPE, NAME, SIZE)
 
#define VARIABLE_LENGTH_ARRAY_NEEDS_EMULATION   0
 

Functions

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)
 Fill an LED matrix with random colors, using 16-bit noise.
 
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)
 Fill an LED matrix with random colors, using 8-bit noise.
 
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)
 Fill an LED array with random colors, using 16-bit noise.
 
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)
 Fill an LED array with random colors, using 8-bit noise.
 
void fill_raw_2dnoise16 (uint16_t *pData, int width, int height, uint8_t octaves, q88 freq88, fract16 amplitude, int skip, uint32_t x, int32_t scalex, uint32_t y, int32_t scaley, uint32_t time)
 Fill a 2D 16-bit buffer with noise, using inoise16()
 
void fill_raw_2dnoise16into8 (uint8_t *pData, int width, int height, uint8_t octaves, q44 freq44, fract8 amplitude, int skip, uint32_t x, int32_t scalex, uint32_t y, int32_t scaley, uint32_t time)
 Fill a 2D 8-bit buffer with noise, using inoise16()
 
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_2dnoise8 (uint8_t *pData, int width, int height, uint8_t octaves, q44 freq44, fract8 amplitude, int skip, uint16_t x, int16_t scalex, uint16_t y, int16_t scaley, uint16_t time)
 Fill a 2D 8-bit buffer with noise, using inoise8()
 
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_noise16into8 (uint8_t *pData, uint8_t num_points, uint8_t octaves, uint32_t x, int scale, uint32_t time)
 Fill a 1D 8-bit buffer with noise, using inoise16()
 
void fill_raw_noise8 (uint8_t *pData, uint8_t num_points, uint8_t octaves, uint16_t x, int scale, uint16_t time)
 Fill a 1D 8-bit buffer with noise, using inoise8()
 
static int16_t grad16 (uint8_t hash, int16_t x)
 
static int16_t grad16 (uint8_t hash, int16_t x, int16_t y)
 
static int16_t grad16 (uint8_t hash, int16_t x, int16_t y, int16_t z)
 
static int8_t grad8 (uint8_t hash, int8_t x)
 
static int8_t grad8 (uint8_t hash, int8_t x, int8_t y)
 
static int8_t grad8 (uint8_t hash, int8_t x, int8_t y, int8_t z)
 
uint16_t inoise16 (uint32_t x)
 16-bit, fixed point implementation of Perlin's noise.
 
uint16_t inoise16 (uint32_t x, uint32_t y)
 16-bit, fixed point implementation of Perlin's noise.
 
uint16_t inoise16 (uint32_t x, uint32_t y, uint32_t z)
 16-bit, fixed point implementation of Perlin's noise.
 
uint16_t inoise16 (uint32_t x, uint32_t y, uint32_t z, uint32_t t)
 16-bit, fixed point implementation of Perlin's noise.
 
int16_t inoise16_raw (uint32_t x)
 16-bit, fixed point implementation of Perlin's noise without scaling.
 
int16_t inoise16_raw (uint32_t x, uint32_t y)
 16-bit, fixed point implementation of Perlin's noise without scaling.
 
int16_t inoise16_raw (uint32_t x, uint32_t y, uint32_t z)
 16-bit, fixed point implementation of Perlin's noise without scaling.
 
int16_t inoise16_raw (uint32_t x, uint32_t y, uint32_t z, uint32_t t)
 
uint8_t inoise8 (uint16_t x)
 8-Bit, fixed point implementation of Perlin's noise.
 
uint8_t inoise8 (uint16_t x, uint16_t y)
 8-Bit, fixed point implementation of Perlin's noise.
 
uint8_t inoise8 (uint16_t x, uint16_t y, uint16_t z)
 8-Bit, fixed point implementation of Perlin's noise.
 
int8_t inoise8_raw (uint16_t x)
 8-bit, fixed point implementation of Perlin's noise without scaling.
 
int8_t inoise8_raw (uint16_t x, uint16_t y)
 8-bit, fixed point implementation of Perlin's noise without scaling.
 
int8_t inoise8_raw (uint16_t x, uint16_t y, uint16_t z)
 8-bit, fixed point implementation of Perlin's noise without scaling.
 
static int8_t lerp7by8 (int8_t a, int8_t b, fract8 frac)
 
static int8_t selectBasedOnHashBit (uint8_t hash, uint8_t bitnumber, int8_t a, int8_t b)
 

Variables

int32_t nmax =0
 Unused.
 
int32_t nmin =11111110
 Unused.
 
static FASTLED_NAMESPACE_BEGIN uint8_t const p []