FastLED 3.9.7
Loading...
Searching...
No Matches
noise.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4
5#include "crgb.h"
6#include "fl/namespace.h"
7#include "lib8tion/qfx.h"
8
11
13
19
20
24
27
30extern uint16_t inoise16(uint32_t x, uint32_t y, uint32_t z);
31
34extern uint16_t inoise16(uint32_t x, uint32_t y);
35
40extern uint16_t inoise16(uint32_t x);
41
43
44
47
50extern int16_t inoise16_raw(uint32_t x, uint32_t y, uint32_t z);
51
54extern int16_t inoise16_raw(uint32_t x, uint32_t y);
55
61extern int16_t inoise16_raw(uint32_t x);
62
64
65
68
71extern uint8_t inoise8(uint16_t x, uint16_t y, uint16_t z);
72
75extern uint8_t inoise8(uint16_t x, uint16_t y);
76
81extern uint8_t inoise8(uint16_t x);
82
84
85
88
91extern int8_t inoise8_raw(uint16_t x, uint16_t y, uint16_t z);
92
95extern int8_t inoise8_raw(uint16_t x, uint16_t y);
96
102extern int8_t inoise8_raw(uint16_t x);
103
105
106
109
113uint16_t snoise16(uint32_t x);
114uint16_t snoise16(uint32_t x, uint32_t y);
115uint16_t snoise16(uint32_t x, uint32_t y, uint32_t z);
116uint16_t snoise16(uint32_t x, uint32_t y, uint32_t z, uint32_t w);
117
120
121
122
126
130
138void fill_raw_noise8(uint8_t *pData, uint8_t num_points, uint8_t octaves, uint16_t x, int scalex, uint16_t time);
139
142void fill_raw_noise16into8(uint8_t *pData, uint8_t num_points, uint8_t octaves, uint32_t x, int scalex, uint32_t time);
143
157void 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);
158void 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);
159
160
171void fill_raw_2dnoise8(uint8_t *pData, int width, int height, uint8_t octaves, uint16_t x, int16_t scalex, uint16_t y, int16_t scaley, uint16_t time);
172
175void fill_raw_2dnoise16into8(uint8_t *pData, int width, int height, uint8_t octaves, uint32_t x, int32_t scalex, uint32_t y, int32_t scaley, uint32_t time);
176
182void 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);
183
189void 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);
190
192
193
199
210void fill_noise8(CRGB *leds, int num_leds,
211 uint8_t octaves, uint16_t x, int scale,
212 uint8_t hue_octaves, uint16_t hue_x, int hue_scale,
213 uint16_t time);
214
218void fill_noise16(CRGB *leds, int num_leds,
219 uint8_t octaves, uint16_t x, int scale,
220 uint8_t hue_octaves, uint16_t hue_x, int hue_scale,
221 uint16_t time, uint8_t hue_shift=0);
222
244void fill_2dnoise8(CRGB *leds, int width, int height, bool serpentine,
245 uint8_t octaves, uint16_t x, int xscale, uint16_t y, int yscale, uint16_t time,
246 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);
247
251void fill_2dnoise16(CRGB *leds, int width, int height, bool serpentine,
252 uint8_t octaves, uint32_t x, int xscale, uint32_t y, int yscale, uint32_t time,
253 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);
254
256
259
261
Template class for representing fractional ints.
Definition qfx.h:16
Defines the red, green, and blue (RGB) pixel struct.
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
Computes a new color blended some fraction of the way between two other colors.
uint8_t fract8
ANSI: unsigned short _Fract.
Definition types.h:36
uint16_t fract16
ANSI: unsigned _Fract.
Definition types.h:46
void fill_raw_noise8(uint8_t *pData, uint8_t num_points, uint8_t octaves, uint16_t x, int scalex, uint16_t time)
Fill a 1D 8-bit buffer with noise, using inoise8()
Definition noise.cpp:611
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()
Definition noise.cpp:654
void fill_raw_2dnoise16into8(uint8_t *pData, int width, int height, uint8_t octaves, 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_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.
Definition noise.cpp:820
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)
Fill an LED matrix with random colors, using 16-bit noise.
Definition noise.cpp:860
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.
Definition noise.cpp:767
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)
Fill an LED array with random colors, using 16-bit noise.
Definition noise.cpp:794
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()
Definition noise.cpp:692
void fill_raw_noise16into8(uint8_t *pData, uint8_t num_points, uint8_t octaves, uint32_t x, int scalex, uint32_t time)
Fill a 1D 8-bit buffer with noise, using inoise16()
Definition noise.cpp:624
uint16_t snoise16(uint32_t x)
32 bit, fixed point implementation of simplex noise functions.
Definition simplex.cpp:102
int8_t inoise8_raw(uint16_t x, uint16_t y, uint16_t z)
8-bit, fixed point implementation of Perlin's noise without scaling.
Definition noise.cpp:471
int16_t inoise16_raw(uint32_t x, uint32_t y, uint32_t z)
16-bit, fixed point implementation of Perlin's noise without scaling.
Definition noise.cpp:335
uint16_t inoise16(uint32_t x, uint32_t y, uint32_t z)
16-bit, fixed point implementation of Perlin's noise.
Definition noise.cpp:378
uint8_t inoise8(uint16_t x, uint16_t y, uint16_t z)
8-Bit, fixed point implementation of Perlin's noise.
Definition noise.cpp:512
Implements the FastLED namespace macros.
#define FASTLED_NAMESPACE_END
End of the FastLED namespace.
Definition namespace.h:16
#define FASTLED_NAMESPACE_BEGIN
Start of the FastLED namespace.
Definition namespace.h:14
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:54