-
Notifications
You must be signed in to change notification settings - Fork 10
/
MEOSimplexNoise.h
42 lines (33 loc) · 1.03 KB
/
MEOSimplexNoise.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
G35: An Arduino library for GE Color Effects G-35 holiday lights.
Copyright © 2012 The G35 Authors. Use, modification, and distribution are
subject to the BSD license as described in the accompanying LICENSE file.
By Mike Tsao <http://github.com/sowbug>.
and Mark Ortiz
and happyinmotion http://happyinmotion.livejournal.com/278357.html
See README for complete attributions.
*/
#ifndef INCLUDE_G35_PROGRAMS_MEO_SIMPLEX_NOISE_H
#define INCLUDE_G35_PROGRAMS_MEO_SIMPLEX_NOISE_H
#include <MEOLightProgram.h>
class MEOSimplexNoise : public MEOLightProgram
{
public:
MEOSimplexNoise(MEOG35& g35, uint8_t pattern);
uint32_t Do();
private:
float SimplexNoise(float x, float y, float z);
int fastfloor(float n);
float k_fn(int a);
int shuffle(int i, int j, int k);
int b(int i, int j, int k, int B);
int b(int N, int B);
float rMult_;
float gMult_;
float bMult_;
float spaceinc_;
float timeinc_;
float yoffset_;
uint8_t pattern_;
};
#endif