diff options
| author | Tim Redfern <tim@getdrop.com> | 2018-07-08 12:22:06 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@getdrop.com> | 2018-07-08 12:22:06 +0100 |
| commit | fb68eed64f548d090eb550047fd0d898e4e033fc (patch) | |
| tree | 890fa917ca6bd88505b45e5c261d05e0c5c9b6ec /gui/libs/ofxAChaosLib/src/AChaosStein1.h | |
| parent | c10665e02e49da2d8f7e1a1eada151f17f507a21 (diff) | |
add altered AChaoslib
Diffstat (limited to 'gui/libs/ofxAChaosLib/src/AChaosStein1.h')
| -rw-r--r-- | gui/libs/ofxAChaosLib/src/AChaosStein1.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gui/libs/ofxAChaosLib/src/AChaosStein1.h b/gui/libs/ofxAChaosLib/src/AChaosStein1.h new file mode 100644 index 0000000..df51da9 --- /dev/null +++ b/gui/libs/ofxAChaosLib/src/AChaosStein1.h @@ -0,0 +1,44 @@ +/* + 32/64 bits A-Chaos Lib in openFrameworks + (c) s373.net/x 2004, 2012, 2015 + http://s373.net/code/A-Chaos-Lib/A-Chaos.html + programmed by Andre Sier, revised 2015 + License: MIT +*/ +#pragma once +#include "AChaosBase.h" +#define pie 3.14159265358979323846 +class AChaosStein1 : public AChaosBase { +public: + + REAL seed, lambda; + + AChaosStein1(){} + ~AChaosStein1(){} + + vector<string> param_labels={"","lambda"}; + + virtual void setup(REAL * params = NULL){ + + AChaosBase::init(params, 2, 1); + if(params==NULL){ + //init + seed = 0.87f; + lambda = 2.25f; + + REAL p[2] = {seed, lambda}; + set(p); + } else { set(params); } + } + + void reset(){ + seed = iv[0]; + lambda = iv[1]; + } + + void calc(){ + seed = lambda * seed * seed * SIN(pie*seed); + + ov[0] = seed; + } +};
\ No newline at end of file |
