From db9c7dda89a78a8fa19651fd37759a4602ff116c Mon Sep 17 00:00:00 2001 From: Rob Tillaart Date: Sun, 7 Jul 2024 10:18:00 +0200 Subject: [PATCH] 0.3.0 functionGenerator --- .../.github/workflows/arduino-lint.yml | 2 +- libraries/FunctionGenerator/CHANGELOG.md | 18 +- .../FunctionGenerator/FunctionGenerator.h | 17 +- .../funcGenFreeWavePlotter.ino | 95 ++++ .../functionGeneratorPerformance.ino | 149 +++++- .../performance_0.2.7.txt | 429 ++++++++++++++++++ .../performance_0.3.0.txt | 429 ++++++++++++++++++ .../functionGeneratorPlotter.ino | 41 +- .../generateFreeWave/generateFreeWave.ino | 36 ++ .../FunctionGenerator/functionGenerator.cpp | 200 +++++++- libraries/FunctionGenerator/keywords.txt | 9 + libraries/FunctionGenerator/library.json | 2 +- .../FunctionGenerator/library.properties | 2 +- libraries/FunctionGenerator/readme.md | 128 ++++-- 14 files changed, 1502 insertions(+), 55 deletions(-) create mode 100644 libraries/FunctionGenerator/examples/funcGenFreeWavePlotter/funcGenFreeWavePlotter.ino create mode 100644 libraries/FunctionGenerator/examples/functionGeneratorPerformance/performance_0.2.7.txt create mode 100644 libraries/FunctionGenerator/examples/functionGeneratorPerformance/performance_0.3.0.txt create mode 100644 libraries/FunctionGenerator/examples/generateFreeWave/generateFreeWave.ino diff --git a/libraries/FunctionGenerator/.github/workflows/arduino-lint.yml b/libraries/FunctionGenerator/.github/workflows/arduino-lint.yml index 7f8f4ef4..7b289492 100644 --- a/libraries/FunctionGenerator/.github/workflows/arduino-lint.yml +++ b/libraries/FunctionGenerator/.github/workflows/arduino-lint.yml @@ -10,4 +10,4 @@ jobs: - uses: arduino/arduino-lint-action@v1 with: library-manager: update - compliance: strict \ No newline at end of file + # compliance: strict diff --git a/libraries/FunctionGenerator/CHANGELOG.md b/libraries/FunctionGenerator/CHANGELOG.md index ee0ae28f..6933b0ff 100644 --- a/libraries/FunctionGenerator/CHANGELOG.md +++ b/libraries/FunctionGenerator/CHANGELOG.md @@ -6,11 +6,25 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [0.2.5] - 2023-11-02 +## [0.3.0] - 2024-07-05 +- add **float sinusDiode(float t)** +- add **float sinusRectified(float t)** +- add **float trapezium1(float t)** with duty cycle. +- add **float trapezium2(float t)** with duty cycle. +- add **float heartBeat(float t)** +- add **float freeWave(float t, int16_t arr, int size)** arbitrary wave generator. +- update **functionGeneratorPerformance.ino** +- add examples for **freeWave()** +- fix Arduino-lint.yml (long library name error) +- update readme.md +- minor edits + +---- + +## [0.2.6] - 2023-11-02 - update readme.md - update keywords.txt (align) - ## [0.2.5] - 2023-03-25 - add **setDutyCycle()**, **getDutyCycle()** - implement duty cycle for square(), triangle() and random() diff --git a/libraries/FunctionGenerator/FunctionGenerator.h b/libraries/FunctionGenerator/FunctionGenerator.h index 6792c70b..64077027 100644 --- a/libraries/FunctionGenerator/FunctionGenerator.h +++ b/libraries/FunctionGenerator/FunctionGenerator.h @@ -2,14 +2,14 @@ // // FILE: functionGenerator.h // AUTHOR: Rob Tillaart -// VERSION: 0.2.6 +// VERSION: 0.3.0 // PURPOSE: wave form generating functions (use with care) // URL: https://github.com/RobTillaart/FunctionGenerator #include "Arduino.h" -#define FUNCTIONGENERATOR_LIB_VERSION (F("0.2.6")) +#define FUNCTIONGENERATOR_LIB_VERSION (F("0.3.0")) class funcgen @@ -53,7 +53,7 @@ public: float zero(); // standard wave forms - float sawtooth(float t, uint8_t mode = 0); // 0 ==> /|. 1 ==> sawtooth |\. + float sawtooth(float t, uint8_t mode = 0); // 0 ==> /|. 1 ==> sawtooth |\. float triangle(float t); float square(float t); float sinus(float t); @@ -62,6 +62,17 @@ public: float random(); float random_DC(); // duty cycle variant. Experimental. + ///////////////////////////////////////////////////////////// + // + // EXPERIMENTAL 0.2.7 + // + float sinusDiode(float t); + float sinusRectified(float t); + float trapezium1(float t); + float trapezium2(float t); + float heartBeat(float t); // 72 BPM = 72/60 = 1 setFrequency(1.2) + float freeWave(float t, int16_t * arr, int16_t size); // arr must be size+1 long + private: float _period; diff --git a/libraries/FunctionGenerator/examples/funcGenFreeWavePlotter/funcGenFreeWavePlotter.ino b/libraries/FunctionGenerator/examples/funcGenFreeWavePlotter/funcGenFreeWavePlotter.ino new file mode 100644 index 00000000..b0df55ec --- /dev/null +++ b/libraries/FunctionGenerator/examples/funcGenFreeWavePlotter/funcGenFreeWavePlotter.ino @@ -0,0 +1,95 @@ +// +// FILE: funcGenFreeWavePlotter.ino +// AUTHOR: Rob Tillaart +// PURPOSE: demo function generators +// URL: https://github.com/RobTillaart/FunctionGenerator +// +// use a Serial plotter to show the data + + +#include "functionGenerator.h" + +funcgen gen; + +// sin(t). +int16_t arr_sin[101] = +{ + 0, 627, 1253, 1873, 2486, 3090, + 3681, 4257, 4817, 5358, 5877, + 6374, 6845, 7289, 7705, 8090, + 8443, 8763, 9048, 9297, 9510, + 9685, 9822, 9921, 9980, 10000, + 9980, 9921, 9822, 9685, 9510, + 9297, 9048, 8763, 8443, 8090, + 7705, 7289, 6845, 6374, 5877, + 5358, 4817, 4257, 3681, 3090, + 2486, 1873, 1253, 627, 0, + -627, -1253, -1873, -2486, -3090, + -3681, -4257, -4817, -5358, -5877, + -6374, -6845, -7289, -7705, -8090, + -8443, -8763, -9048, -9297, -9510, + -9685, -9822, -9921, -9980, -10000, + -9980, -9921, -9822, -9685, -9510, + -9297, -9048, -8763, -8443, -8090, + -7705, -7289, -6845, -6374, -5877, + -5358, -4817, -4257, -3681, -3090, + -2486, -1873, -1253, -627, 0, +}; + + +// sin(t) + 0.25 * sin(5t) +int16_t arr_two_sin[101] = +{ + 0, 1120, 2178, 3117, 3891, 4472, + 4847, 5024, 5029, 4904, 4702, + 4481, 4300, 4213, 4261, 4472, + 4852, 5392, 6063, 6820, 7608, + 8366, 9033, 9554, 9886, 10000, + 9886, 9554, 9033, 8366, 7608, + 6820, 6063, 5392, 4852, 4472, + 4261, 4213, 4300, 4481, 4702, + 4904, 5029, 5024, 4847, 4472, + 3891, 3117, 2178, 1120, 0, + -1120, -2178, -3117, -3891, -4472, + -4847, -5024, -5029, -4904, -4702, + -4481, -4300, -4213, -4261, -4472, + -4852, -5392, -6063, -6820, -7608, + -8366, -9033, -9554, -9886, -10000, + -9886, -9554, -9033, -8366, -7608, + -6820, -6063, -5392, -4852, -4472, + -4261, -4213, -4300, -4481, -4702, + -4904, -5029, -5024, -4847, -4472, + -3891, -3117, -2178, -1120, 0, +}; + + + +void setup() +{ + Serial.begin(115200); + // Serial.println(__FILE__); + // Serial.print("FUNCTIONGENERATOR_LIB_VERSION: "); + // Serial.println(FUNCTIONGENERATOR_LIB_VERSION); + // Serial.println(); + + gen.setAmplitude(80); + gen.setFrequency(0.5); + gen.setDutyCycle(50); +} + + +void loop() +{ + float t = millis() * 0.001; + + Serial.print(80); + Serial.print("\t"); + Serial.print(-80); + Serial.print("\t"); + Serial.print(gen.freeWave(t, arr_two_sin, 100)); + Serial.println(); + delay(10); +} + + +// -- END OF FILE -- diff --git a/libraries/FunctionGenerator/examples/functionGeneratorPerformance/functionGeneratorPerformance.ino b/libraries/FunctionGenerator/examples/functionGeneratorPerformance/functionGeneratorPerformance.ino index 6c4a4313..a8d55e29 100644 --- a/libraries/FunctionGenerator/examples/functionGeneratorPerformance/functionGeneratorPerformance.ino +++ b/libraries/FunctionGenerator/examples/functionGeneratorPerformance/functionGeneratorPerformance.ino @@ -17,13 +17,41 @@ volatile float y; funcgen gen; +// sin(t) + 0.25 * sin(5t) +int16_t arr_two_sin[101] = +{ + 0, 1120, 2178, 3117, 3891, 4472, + 4847, 5024, 5029, 4904, 4702, + 4481, 4300, 4213, 4261, 4472, + 4852, 5392, 6063, 6820, 7608, + 8366, 9033, 9554, 9886, 10000, + 9886, 9554, 9033, 8366, 7608, + 6820, 6063, 5392, 4852, 4472, + 4261, 4213, 4300, 4481, 4702, + 4904, 5029, 5024, 4847, 4472, + 3891, 3117, 2178, 1120, 0, + -1120, -2178, -3117, -3891, -4472, + -4847, -5024, -5029, -4904, -4702, + -4481, -4300, -4213, -4261, -4472, + -4852, -5392, -6063, -6820, -7608, + -8366, -9033, -9554, -9886, -10000, + -9886, -9554, -9033, -8366, -7608, + -6820, -6063, -5392, -4852, -4472, + -4261, -4213, -4300, -4481, -4702, + -4904, -5029, -5024, -4847, -4472, + -3891, -3117, -2178, -1120, 0, +}; + + void setup() { Serial.begin(115200); - Serial.print("Start functionGeneratorPerformance - LIB VERSION: "); + Serial.println(__FILE__); + Serial.print("FUNCTIONGENERATOR_LIB_VERSION: "); Serial.println(FUNCTIONGENERATOR_LIB_VERSION); + Serial.println(); - Serial.println("func \t\tusec\tmax calls/sec"); + Serial.println("func \t\tusec\tmax calls/sec (indicative)"); y = analogRead(A0) / 1024; test_square(); delay(10); @@ -43,9 +71,21 @@ void setup() delay(10); test_zero(); delay(10); + test_sinusDiode(); + delay(10); + test_sinusRectified(); + delay(10); + test_trapezium1(); + delay(10); + test_trapezium2(); + delay(10); + test_heartBeat(); + delay(10); + test_freeWave(); + delay(10); Serial.println(); - Serial.println("t \t sqr\t saw\t tri\t sin\t str\t rnd\t line\t zero"); + Serial.println("t \t sqr\t saw\t tri\t sin\t str\t rnd\t line\t zero\t sinD\t sinR\t trap"); for (int i = -400; i < 400; i += 2) { float t = i * 0.01; @@ -66,6 +106,12 @@ void setup() Serial.print(gen.line()); Serial.print("\t"); Serial.print(gen.zero()); + Serial.print("\t"); + Serial.print(gen.sinusDiode(t)); + Serial.print("\t"); + Serial.print(gen.sinusRectified(t)); + Serial.print("\t"); + Serial.print(gen.trapezium2(t)); Serial.println(); } Serial.println("\ndone..."); @@ -218,10 +264,105 @@ void test_zero() } +void test_sinusDiode() +{ + start = micros(); + for (int i = 0; i < 10000; i++) + { + t = gen.sinusDiode(i); + } + stop = micros(); + Serial.print(__FUNCTION__); + Serial.print(":\t"); + Serial.print((stop - start) / 10000.0); + Serial.print("\t"); + Serial.println(1000000.0 / ((stop - start) / 10000.0)); +} + + +void test_sinusRectified() +{ + start = micros(); + for (int i = 0; i < 10000; i++) + { + t = gen.sinusRectified(i); + } + stop = micros(); + Serial.print(__FUNCTION__); + Serial.print(":\t"); + Serial.print((stop - start) / 10000.0); + Serial.print("\t"); + Serial.println(1000000.0 / ((stop - start) / 10000.0)); +} + + +void test_trapezium1() +{ + start = micros(); + for (int i = 0; i < 10000; i++) + { + t = gen.trapezium1(i); + } + stop = micros(); + Serial.print(__FUNCTION__); + Serial.print(":\t"); + Serial.print((stop - start) / 10000.0); + Serial.print("\t"); + Serial.println(1000000.0 / ((stop - start) / 10000.0)); +} + + +void test_trapezium2() +{ + start = micros(); + for (int i = 0; i < 10000; i++) + { + t = gen.trapezium2(i); + } + stop = micros(); + Serial.print(__FUNCTION__); + Serial.print(":\t"); + Serial.print((stop - start) / 10000.0); + Serial.print("\t"); + Serial.println(1000000.0 / ((stop - start) / 10000.0)); +} + + +void test_heartBeat() +{ + start = micros(); + for (int i = 0; i < 10000; i++) + { + t = gen.heartBeat(i); + } + stop = micros(); + Serial.print(__FUNCTION__); + Serial.print(":\t"); + Serial.print((stop - start) / 10000.0); + Serial.print("\t"); + Serial.println(1000000.0 / ((stop - start) / 10000.0)); +} + + +void test_freeWave() +{ + start = micros(); + for (int i = 0; i < 10000; i++) + { + t = gen.freeWave(i, arr_two_sin, 100); + } + stop = micros(); + Serial.print(__FUNCTION__); + Serial.print(":\t"); + Serial.print((stop - start) / 10000.0); + Serial.print("\t"); + Serial.println(1000000.0 / ((stop - start) / 10000.0)); +} + + void loop() { } // -- END OF FILE -- - diff --git a/libraries/FunctionGenerator/examples/functionGeneratorPerformance/performance_0.2.7.txt b/libraries/FunctionGenerator/examples/functionGeneratorPerformance/performance_0.2.7.txt new file mode 100644 index 00000000..5d8d59a6 --- /dev/null +++ b/libraries/FunctionGenerator/examples/functionGeneratorPerformance/performance_0.2.7.txt @@ -0,0 +1,429 @@ + +functionGeneratorPerformance.ino +FUNCTIONGENERATOR_LIB_VERSION: 0.2.7 + +indicative output Arduino UNO 1.8.19, 16 MHz. + +| wave form name | usec | max calls/sec | +|:---------------|-------:|----------------:| +| square | 54.57 | 18325.49 | +| sawtooth | 61.69 | 16210.61 | +| triangle | 79.80 | 12531.96 | +| sinus | 166.38 | 6010.37 | +| stair | 80.86 | 12366.38 | +| random | 42.61 | 23466.69 | +| random_DC | 67.18 | 14885.12 | +| line | 0.76 | 1322751.37 | +| zero | 0.75 | 1324854.25 | +| sinusDiode | 169.93 | 5884.79 | +| sinusRectified | 169.49 | 5900.03 | +| trapezium1 | 100.98 | 9903.30 | +| trapezium2 | 143.98 | 6945.58 | +| heartBeat | 128.52 | 7780.77 | +| freeWave | 75.52 | 13241.31 | + + + +t sqr saw tri sin str rnd line zero sinD sinR trap +-4.00 -1.00 1.00 -1.00 -0.00 1.00 0.50 1.00 0.00 0.00 0.00 -1.00 +-3.98 1.00 -0.96 -0.92 0.13 -1.00 0.06 1.00 0.00 0.13 0.13 -1.00 +-3.96 1.00 -0.92 -0.84 0.25 -1.00 0.34 1.00 0.00 0.25 0.25 -1.00 +-3.94 1.00 -0.88 -0.76 0.37 -1.00 0.33 1.00 0.00 0.37 0.37 -1.00 +-3.92 1.00 -0.84 -0.68 0.48 -1.00 0.95 1.00 0.00 0.48 0.48 -1.00 +-3.90 1.00 -0.80 -0.60 0.59 -1.00 0.75 1.00 0.00 0.59 0.59 -1.00 +-3.88 1.00 -0.76 -0.52 0.68 -1.00 0.20 1.00 0.00 0.68 0.68 -1.00 +-3.86 1.00 -0.72 -0.44 0.77 -0.71 0.33 1.00 0.00 0.77 0.77 -1.00 +-3.84 1.00 -0.68 -0.36 0.84 -0.71 0.25 1.00 0.00 0.84 0.84 -1.00 +-3.82 1.00 -0.64 -0.28 0.90 -0.71 0.39 1.00 0.00 0.90 0.90 -1.00 +-3.80 1.00 -0.60 -0.20 0.95 -0.71 0.42 1.00 0.00 0.95 0.95 -1.00 +-3.78 1.00 -0.56 -0.12 0.98 -0.71 0.95 1.00 0.00 0.98 0.98 -1.00 +-3.76 1.00 -0.52 -0.04 1.00 -0.71 0.56 1.00 0.00 1.00 1.00 -1.00 +-3.74 1.00 -0.48 0.04 1.00 -0.43 0.64 1.00 0.00 1.00 1.00 -0.92 +-3.72 1.00 -0.44 0.12 0.98 -0.43 0.17 1.00 0.00 0.98 0.98 -0.76 +-3.70 1.00 -0.40 0.20 0.95 -0.43 0.78 1.00 0.00 0.95 0.95 -0.60 +-3.68 1.00 -0.36 0.28 0.90 -0.43 0.02 1.00 0.00 0.90 0.90 -0.44 +-3.66 1.00 -0.32 0.36 0.84 -0.43 0.31 1.00 0.00 0.84 0.84 -0.28 +-3.64 1.00 -0.28 0.44 0.77 -0.43 0.49 1.00 0.00 0.77 0.77 -0.12 +-3.62 1.00 -0.24 0.52 0.68 -0.14 0.09 1.00 0.00 0.68 0.68 0.04 +-3.60 1.00 -0.20 0.60 0.59 -0.14 0.21 1.00 0.00 0.59 0.59 0.20 +-3.58 1.00 -0.16 0.68 0.48 -0.14 0.82 1.00 0.00 0.48 0.48 0.36 +-3.56 1.00 -0.12 0.76 0.37 -0.14 0.51 1.00 0.00 0.37 0.37 0.52 +-3.54 1.00 -0.08 0.84 0.25 -0.14 0.74 1.00 0.00 0.25 0.25 0.68 +-3.52 1.00 -0.04 0.92 0.13 -0.14 0.20 1.00 0.00 0.13 0.13 0.84 +-3.50 1.00 0.00 1.00 0.00 -0.14 0.27 1.00 0.00 0.00 0.00 1.00 +-3.48 -1.00 0.04 0.92 -0.13 0.14 0.15 1.00 0.00 0.00 0.13 1.00 +-3.46 -1.00 0.08 0.84 -0.25 0.14 0.67 1.00 0.00 0.00 0.25 1.00 +-3.44 -1.00 0.12 0.76 -0.37 0.14 0.54 1.00 0.00 0.00 0.37 1.00 +-3.42 -1.00 0.16 0.68 -0.48 0.14 0.44 1.00 0.00 0.00 0.48 1.00 +-3.40 -1.00 0.20 0.60 -0.59 0.14 0.85 1.00 0.00 0.00 0.59 1.00 +-3.38 -1.00 0.24 0.52 -0.68 0.14 0.90 1.00 0.00 0.00 0.68 1.00 +-3.36 -1.00 0.28 0.44 -0.77 0.43 0.43 1.00 0.00 0.00 0.77 1.00 +-3.34 -1.00 0.32 0.36 -0.84 0.43 0.11 1.00 0.00 0.00 0.84 1.00 +-3.32 -1.00 0.36 0.28 -0.90 0.43 0.91 1.00 0.00 0.00 0.90 1.00 +-3.30 -1.00 0.40 0.20 -0.95 0.43 0.79 1.00 0.00 0.00 0.95 1.00 +-3.28 -1.00 0.44 0.12 -0.98 0.43 0.17 1.00 0.00 0.00 0.98 1.00 +-3.26 -1.00 0.48 0.04 -1.00 0.43 0.72 1.00 0.00 0.00 1.00 1.00 +-3.24 -1.00 0.52 -0.04 -1.00 0.71 0.77 1.00 0.00 0.00 1.00 0.92 +-3.22 -1.00 0.56 -0.12 -0.98 0.71 0.86 1.00 0.00 0.00 0.98 0.76 +-3.20 -1.00 0.60 -0.20 -0.95 0.71 0.50 1.00 0.00 0.00 0.95 0.60 +-3.18 -1.00 0.64 -0.28 -0.90 0.71 0.42 1.00 0.00 0.00 0.90 0.44 +-3.16 -1.00 0.68 -0.36 -0.84 0.71 0.73 1.00 0.00 0.00 0.84 0.28 +-3.14 -1.00 0.72 -0.44 -0.77 0.71 0.01 1.00 0.00 0.00 0.77 0.12 +-3.12 -1.00 0.76 -0.52 -0.68 1.00 0.52 1.00 0.00 0.00 0.68 -0.04 +-3.10 -1.00 0.80 -0.60 -0.59 1.00 0.72 1.00 0.00 0.00 0.59 -0.20 +-3.08 -1.00 0.84 -0.68 -0.48 1.00 0.61 1.00 0.00 0.00 0.48 -0.36 +-3.06 -1.00 0.88 -0.76 -0.37 1.00 0.41 1.00 0.00 0.00 0.37 -0.52 +-3.04 -1.00 0.92 -0.84 -0.25 1.00 0.68 1.00 0.00 0.00 0.25 -0.68 +-3.02 -1.00 0.96 -0.92 -0.13 1.00 0.34 1.00 0.00 0.00 0.13 -0.84 +-3.00 -1.00 1.00 -1.00 -0.00 1.00 0.90 1.00 0.00 0.00 0.00 -1.00 +-2.98 1.00 -0.96 -0.92 0.13 -1.00 0.43 1.00 0.00 0.13 0.13 -1.00 +-2.96 1.00 -0.92 -0.84 0.25 -1.00 0.47 1.00 0.00 0.25 0.25 -1.00 +-2.94 1.00 -0.88 -0.76 0.37 -1.00 0.51 1.00 0.00 0.37 0.37 -1.00 +-2.92 1.00 -0.84 -0.68 0.48 -1.00 0.29 1.00 0.00 0.48 0.48 -1.00 +-2.90 1.00 -0.80 -0.60 0.59 -1.00 0.42 1.00 0.00 0.59 0.59 -1.00 +-2.88 1.00 -0.76 -0.52 0.68 -1.00 0.02 1.00 0.00 0.68 0.68 -1.00 +-2.86 1.00 -0.72 -0.44 0.77 -0.71 0.91 1.00 0.00 0.77 0.77 -1.00 +-2.84 1.00 -0.68 -0.36 0.84 -0.71 0.00 1.00 0.00 0.84 0.84 -1.00 +-2.82 1.00 -0.64 -0.28 0.90 -0.71 0.22 1.00 0.00 0.90 0.90 -1.00 +-2.80 1.00 -0.60 -0.20 0.95 -0.71 0.55 1.00 0.00 0.95 0.95 -1.00 +-2.78 1.00 -0.56 -0.12 0.98 -0.71 0.96 1.00 0.00 0.98 0.98 -1.00 +-2.76 1.00 -0.52 -0.04 1.00 -0.71 0.30 1.00 0.00 1.00 1.00 -1.00 +-2.74 1.00 -0.48 0.04 1.00 -0.43 0.19 1.00 0.00 1.00 1.00 -0.92 +-2.72 1.00 -0.44 0.12 0.98 -0.43 0.62 1.00 0.00 0.98 0.98 -0.76 +-2.70 1.00 -0.40 0.20 0.95 -0.43 0.61 1.00 0.00 0.95 0.95 -0.60 +-2.68 1.00 -0.36 0.28 0.90 -0.43 0.28 1.00 0.00 0.90 0.90 -0.44 +-2.66 1.00 -0.32 0.36 0.84 -0.43 0.85 1.00 0.00 0.84 0.84 -0.28 +-2.64 1.00 -0.28 0.44 0.77 -0.43 0.22 1.00 0.00 0.77 0.77 -0.12 +-2.62 1.00 -0.24 0.52 0.68 -0.14 0.66 1.00 0.00 0.68 0.68 0.04 +-2.60 1.00 -0.20 0.60 0.59 -0.14 0.62 1.00 0.00 0.59 0.59 0.20 +-2.58 1.00 -0.16 0.68 0.48 -0.14 0.30 1.00 0.00 0.48 0.48 0.36 +-2.56 1.00 -0.12 0.76 0.37 -0.14 0.38 1.00 0.00 0.37 0.37 0.52 +-2.54 1.00 -0.08 0.84 0.25 -0.14 0.00 1.00 0.00 0.25 0.25 0.68 +-2.52 1.00 -0.04 0.92 0.13 -0.14 0.09 1.00 0.00 0.13 0.13 0.84 +-2.50 1.00 0.00 1.00 0.00 -0.14 0.56 1.00 0.00 0.00 0.00 1.00 +-2.48 -1.00 0.04 0.92 -0.13 0.14 0.67 1.00 0.00 0.00 0.13 1.00 +-2.46 -1.00 0.08 0.84 -0.25 0.14 0.66 1.00 0.00 0.00 0.25 1.00 +-2.44 -1.00 0.12 0.76 -0.37 0.14 0.15 1.00 0.00 0.00 0.37 1.00 +-2.42 -1.00 0.16 0.68 -0.48 0.14 0.71 1.00 0.00 0.00 0.48 1.00 +-2.40 -1.00 0.20 0.60 -0.59 0.14 0.75 1.00 0.00 0.00 0.59 1.00 +-2.38 -1.00 0.24 0.52 -0.68 0.14 0.13 1.00 0.00 0.00 0.68 1.00 +-2.36 -1.00 0.28 0.44 -0.77 0.43 0.99 1.00 0.00 0.00 0.77 1.00 +-2.34 -1.00 0.32 0.36 -0.84 0.43 0.01 1.00 0.00 0.00 0.84 1.00 +-2.32 -1.00 0.36 0.28 -0.90 0.43 0.92 1.00 0.00 0.00 0.90 1.00 +-2.30 -1.00 0.40 0.20 -0.95 0.43 0.92 1.00 0.00 0.00 0.95 1.00 +-2.28 -1.00 0.44 0.12 -0.98 0.43 0.38 1.00 0.00 0.00 0.98 1.00 +-2.26 -1.00 0.48 0.04 -1.00 0.43 0.87 1.00 0.00 0.00 1.00 1.00 +-2.24 -1.00 0.52 -0.04 -1.00 0.71 0.42 1.00 0.00 0.00 1.00 0.92 +-2.22 -1.00 0.56 -0.12 -0.98 0.71 0.88 1.00 0.00 0.00 0.98 0.76 +-2.20 -1.00 0.60 -0.20 -0.95 0.71 0.71 1.00 0.00 0.00 0.95 0.60 +-2.18 -1.00 0.64 -0.28 -0.90 0.71 0.97 1.00 0.00 0.00 0.90 0.44 +-2.16 -1.00 0.68 -0.36 -0.84 0.71 0.27 1.00 0.00 0.00 0.84 0.28 +-2.14 -1.00 0.72 -0.44 -0.77 0.71 0.94 1.00 0.00 0.00 0.77 0.12 +-2.12 -1.00 0.76 -0.52 -0.68 1.00 0.92 1.00 0.00 0.00 0.68 -0.04 +-2.10 -1.00 0.80 -0.60 -0.59 1.00 0.02 1.00 0.00 0.00 0.59 -0.20 +-2.08 -1.00 0.84 -0.68 -0.48 1.00 0.26 1.00 0.00 0.00 0.48 -0.36 +-2.06 -1.00 0.88 -0.76 -0.37 1.00 0.54 1.00 0.00 0.00 0.37 -0.52 +-2.04 -1.00 0.92 -0.84 -0.25 1.00 0.93 1.00 0.00 0.00 0.25 -0.68 +-2.02 -1.00 0.96 -0.92 -0.13 1.00 0.25 1.00 0.00 0.00 0.13 -0.84 +-2.00 -1.00 1.00 -1.00 -0.00 1.00 0.77 1.00 0.00 0.00 0.00 -1.00 +-1.98 1.00 -0.96 -0.92 0.13 -1.00 0.71 1.00 0.00 0.13 0.13 -1.00 +-1.96 1.00 -0.92 -0.84 0.25 -1.00 0.86 1.00 0.00 0.25 0.25 -1.00 +-1.94 1.00 -0.88 -0.76 0.37 -1.00 0.15 1.00 0.00 0.37 0.37 -1.00 +-1.92 1.00 -0.84 -0.68 0.48 -1.00 0.80 1.00 0.00 0.48 0.48 -1.00 +-1.90 1.00 -0.80 -0.60 0.59 -1.00 0.17 1.00 0.00 0.59 0.59 -1.00 +-1.88 1.00 -0.76 -0.52 0.68 -1.00 0.18 1.00 0.00 0.68 0.68 -1.00 +-1.86 1.00 -0.72 -0.44 0.77 -0.71 0.54 1.00 0.00 0.77 0.77 -1.00 +-1.84 1.00 -0.68 -0.36 0.84 -0.71 0.13 1.00 0.00 0.84 0.84 -1.00 +-1.82 1.00 -0.64 -0.28 0.90 -0.71 0.71 1.00 0.00 0.90 0.90 -1.00 +-1.80 1.00 -0.60 -0.20 0.95 -0.71 0.24 1.00 0.00 0.95 0.95 -1.00 +-1.78 1.00 -0.56 -0.12 0.98 -0.71 0.73 1.00 0.00 0.98 0.98 -1.00 +-1.76 1.00 -0.52 -0.04 1.00 -0.71 0.08 1.00 0.00 1.00 1.00 -1.00 +-1.74 1.00 -0.48 0.04 1.00 -0.43 0.13 1.00 0.00 1.00 1.00 -0.92 +-1.72 1.00 -0.44 0.12 0.98 -0.43 0.28 1.00 0.00 0.98 0.98 -0.76 +-1.70 1.00 -0.40 0.20 0.95 -0.43 0.20 1.00 0.00 0.95 0.95 -0.60 +-1.68 1.00 -0.36 0.28 0.90 -0.43 0.53 1.00 0.00 0.90 0.90 -0.44 +-1.66 1.00 -0.32 0.36 0.84 -0.43 0.48 1.00 0.00 0.84 0.84 -0.28 +-1.64 1.00 -0.28 0.44 0.77 -0.43 0.38 1.00 0.00 0.77 0.77 -0.12 +-1.62 1.00 -0.24 0.52 0.68 -0.14 0.28 1.00 0.00 0.68 0.68 0.04 +-1.60 1.00 -0.20 0.60 0.59 -0.14 0.06 1.00 0.00 0.59 0.59 0.20 +-1.58 1.00 -0.16 0.68 0.48 -0.14 0.84 1.00 0.00 0.48 0.48 0.36 +-1.56 1.00 -0.12 0.76 0.37 -0.14 0.35 1.00 0.00 0.37 0.37 0.52 +-1.54 1.00 -0.08 0.84 0.25 -0.14 0.13 1.00 0.00 0.25 0.25 0.68 +-1.52 1.00 -0.04 0.92 0.13 -0.14 0.51 1.00 0.00 0.13 0.13 0.84 +-1.50 1.00 0.00 1.00 0.00 -0.14 0.37 1.00 0.00 0.00 0.00 1.00 +-1.48 -1.00 0.04 0.92 -0.13 0.14 0.40 1.00 0.00 0.00 0.13 1.00 +-1.46 -1.00 0.08 0.84 -0.25 0.14 0.26 1.00 0.00 0.00 0.25 1.00 +-1.44 -1.00 0.12 0.76 -0.37 0.14 0.30 1.00 0.00 0.00 0.37 1.00 +-1.42 -1.00 0.16 0.68 -0.48 0.14 0.76 1.00 0.00 0.00 0.48 1.00 +-1.40 -1.00 0.20 0.60 -0.59 0.14 0.59 1.00 0.00 0.00 0.59 1.00 +-1.38 -1.00 0.24 0.52 -0.68 0.14 0.32 1.00 0.00 0.00 0.68 1.00 +-1.36 -1.00 0.28 0.44 -0.77 0.43 0.79 1.00 0.00 0.00 0.77 1.00 +-1.34 -1.00 0.32 0.36 -0.84 0.43 0.63 1.00 0.00 0.00 0.84 1.00 +-1.32 -1.00 0.36 0.28 -0.90 0.43 0.20 1.00 0.00 0.00 0.90 1.00 +-1.30 -1.00 0.40 0.20 -0.95 0.43 0.83 1.00 0.00 0.00 0.95 1.00 +-1.28 -1.00 0.44 0.12 -0.98 0.43 0.25 1.00 0.00 0.00 0.98 1.00 +-1.26 -1.00 0.48 0.04 -1.00 0.43 0.36 1.00 0.00 0.00 1.00 1.00 +-1.24 -1.00 0.52 -0.04 -1.00 0.71 0.25 1.00 0.00 0.00 1.00 0.92 +-1.22 -1.00 0.56 -0.12 -0.98 0.71 0.25 1.00 0.00 0.00 0.98 0.76 +-1.20 -1.00 0.60 -0.20 -0.95 0.71 0.18 1.00 0.00 0.00 0.95 0.60 +-1.18 -1.00 0.64 -0.28 -0.90 0.71 0.30 1.00 0.00 0.00 0.90 0.44 +-1.16 -1.00 0.68 -0.36 -0.84 0.71 0.09 1.00 0.00 0.00 0.84 0.28 +-1.14 -1.00 0.72 -0.44 -0.77 0.71 0.32 1.00 0.00 0.00 0.77 0.12 +-1.12 -1.00 0.76 -0.52 -0.68 1.00 0.69 1.00 0.00 0.00 0.68 -0.04 +-1.10 -1.00 0.80 -0.60 -0.59 1.00 0.96 1.00 0.00 0.00 0.59 -0.20 +-1.08 -1.00 0.84 -0.68 -0.48 1.00 0.28 1.00 0.00 0.00 0.48 -0.36 +-1.06 -1.00 0.88 -0.76 -0.37 1.00 0.93 1.00 0.00 0.00 0.37 -0.52 +-1.04 -1.00 0.92 -0.84 -0.25 1.00 0.21 1.00 0.00 0.00 0.25 -0.68 +-1.02 -1.00 0.96 -0.92 -0.13 1.00 0.87 1.00 0.00 0.00 0.13 -0.84 +-1.00 -1.00 1.00 -1.00 -0.00 1.00 0.57 1.00 0.00 0.00 0.00 -1.00 +-0.98 1.00 -0.96 -0.92 0.13 -1.00 0.42 1.00 0.00 0.13 0.13 -1.00 +-0.96 1.00 -0.92 -0.84 0.25 -1.00 0.81 1.00 0.00 0.25 0.25 -1.00 +-0.94 1.00 -0.88 -0.76 0.37 -1.00 0.39 1.00 0.00 0.37 0.37 -1.00 +-0.92 1.00 -0.84 -0.68 0.48 -1.00 0.71 1.00 0.00 0.48 0.48 -1.00 +-0.90 1.00 -0.80 -0.60 0.59 -1.00 0.47 1.00 0.00 0.59 0.59 -1.00 +-0.88 1.00 -0.76 -0.52 0.68 -1.00 0.56 1.00 0.00 0.68 0.68 -1.00 +-0.86 1.00 -0.72 -0.44 0.77 -0.71 0.86 1.00 0.00 0.77 0.77 -1.00 +-0.84 1.00 -0.68 -0.36 0.84 -0.71 0.87 1.00 0.00 0.84 0.84 -1.00 +-0.82 1.00 -0.64 -0.28 0.90 -0.71 0.43 1.00 0.00 0.90 0.90 -1.00 +-0.80 1.00 -0.60 -0.20 0.95 -0.71 0.42 1.00 0.00 0.95 0.95 -1.00 +-0.78 1.00 -0.56 -0.12 0.98 -0.71 0.60 1.00 0.00 0.98 0.98 -1.00 +-0.76 1.00 -0.52 -0.04 1.00 -0.71 0.13 1.00 0.00 1.00 1.00 -1.00 +-0.74 1.00 -0.48 0.04 1.00 -0.43 0.04 1.00 0.00 1.00 1.00 -0.92 +-0.72 1.00 -0.44 0.12 0.98 -0.43 0.30 1.00 0.00 0.98 0.98 -0.76 +-0.70 1.00 -0.40 0.20 0.95 -0.43 0.84 1.00 0.00 0.95 0.95 -0.60 +-0.68 1.00 -0.36 0.28 0.90 -0.43 0.52 1.00 0.00 0.90 0.90 -0.44 +-0.66 1.00 -0.32 0.36 0.84 -0.43 0.25 1.00 0.00 0.84 0.84 -0.28 +-0.64 1.00 -0.28 0.44 0.77 -0.43 0.04 1.00 0.00 0.77 0.77 -0.12 +-0.62 1.00 -0.24 0.52 0.68 -0.14 0.38 1.00 0.00 0.68 0.68 0.04 +-0.60 1.00 -0.20 0.60 0.59 -0.14 0.46 1.00 0.00 0.59 0.59 0.20 +-0.58 1.00 -0.16 0.68 0.48 -0.14 0.66 1.00 0.00 0.48 0.48 0.36 +-0.56 1.00 -0.12 0.76 0.37 -0.14 0.55 1.00 0.00 0.37 0.37 0.52 +-0.54 1.00 -0.08 0.84 0.25 -0.14 0.84 1.00 0.00 0.25 0.25 0.68 +-0.52 1.00 -0.04 0.92 0.13 -0.14 0.66 1.00 0.00 0.13 0.13 0.84 +-0.50 1.00 0.00 1.00 0.00 -0.14 0.97 1.00 0.00 0.00 0.00 1.00 +-0.48 -1.00 0.04 0.92 -0.13 0.14 0.94 1.00 0.00 0.00 0.13 1.00 +-0.46 -1.00 0.08 0.84 -0.25 0.14 0.18 1.00 0.00 0.00 0.25 1.00 +-0.44 -1.00 0.12 0.76 -0.37 0.14 0.27 1.00 0.00 0.00 0.37 1.00 +-0.42 -1.00 0.16 0.68 -0.48 0.14 0.62 1.00 0.00 0.00 0.48 1.00 +-0.40 -1.00 0.20 0.60 -0.59 0.14 0.22 1.00 0.00 0.00 0.59 1.00 +-0.38 -1.00 0.24 0.52 -0.68 0.14 0.12 1.00 0.00 0.00 0.68 1.00 +-0.36 -1.00 0.28 0.44 -0.77 0.43 0.51 1.00 0.00 0.00 0.77 1.00 +-0.34 -1.00 0.32 0.36 -0.84 0.43 0.54 1.00 0.00 0.00 0.84 1.00 +-0.32 -1.00 0.36 0.28 -0.90 0.43 0.36 1.00 0.00 0.00 0.90 1.00 +-0.30 -1.00 0.40 0.20 -0.95 0.43 0.19 1.00 0.00 0.00 0.95 1.00 +-0.28 -1.00 0.44 0.12 -0.98 0.43 0.73 1.00 0.00 0.00 0.98 1.00 +-0.26 -1.00 0.48 0.04 -1.00 0.43 0.58 1.00 0.00 0.00 1.00 1.00 +-0.24 -1.00 0.52 -0.04 -1.00 0.71 0.74 1.00 0.00 0.00 1.00 0.92 +-0.22 -1.00 0.56 -0.12 -0.98 0.71 0.48 1.00 0.00 0.00 0.98 0.76 +-0.20 -1.00 0.60 -0.20 -0.95 0.71 0.37 1.00 0.00 0.00 0.95 0.60 +-0.18 -1.00 0.64 -0.28 -0.90 0.71 0.49 1.00 0.00 0.00 0.90 0.44 +-0.16 -1.00 0.68 -0.36 -0.84 0.71 0.99 1.00 0.00 0.00 0.84 0.28 +-0.14 -1.00 0.72 -0.44 -0.77 0.71 0.38 1.00 0.00 0.00 0.77 0.12 +-0.12 -1.00 0.76 -0.52 -0.68 1.00 0.16 1.00 0.00 0.00 0.68 -0.04 +-0.10 -1.00 0.80 -0.60 -0.59 1.00 0.20 1.00 0.00 0.00 0.59 -0.20 +-0.08 -1.00 0.84 -0.68 -0.48 1.00 0.36 1.00 0.00 0.00 0.48 -0.36 +-0.06 -1.00 0.88 -0.76 -0.37 1.00 0.93 1.00 0.00 0.00 0.37 -0.52 +-0.04 -1.00 0.92 -0.84 -0.25 1.00 0.31 1.00 0.00 0.00 0.25 -0.68 +-0.02 -1.00 0.96 -0.92 -0.13 1.00 0.71 1.00 0.00 0.00 0.13 -0.84 +0.00 1.00 -1.00 -1.00 0.00 -1.00 0.35 1.00 0.00 0.00 0.00 -1.00 +0.02 1.00 -0.96 -0.92 0.13 -1.00 0.58 1.00 0.00 0.13 0.13 -0.84 +0.04 1.00 -0.92 -0.84 0.25 -1.00 0.38 1.00 0.00 0.25 0.25 -0.68 +0.06 1.00 -0.88 -0.76 0.37 -1.00 0.45 1.00 0.00 0.37 0.37 -0.52 +0.08 1.00 -0.84 -0.68 0.48 -1.00 0.96 1.00 0.00 0.48 0.48 -0.36 +0.10 1.00 -0.80 -0.60 0.59 -1.00 0.00 1.00 0.00 0.59 0.59 -0.20 +0.12 1.00 -0.76 -0.52 0.68 -1.00 0.59 1.00 0.00 0.68 0.68 -0.04 +0.14 1.00 -0.72 -0.44 0.77 -0.71 0.09 1.00 0.00 0.77 0.77 0.12 +0.16 1.00 -0.68 -0.36 0.84 -0.71 0.93 1.00 0.00 0.84 0.84 0.28 +0.18 1.00 -0.64 -0.28 0.90 -0.71 0.17 1.00 0.00 0.90 0.90 0.44 +0.20 1.00 -0.60 -0.20 0.95 -0.71 0.32 1.00 0.00 0.95 0.95 0.60 +0.22 1.00 -0.56 -0.12 0.98 -0.71 0.18 1.00 0.00 0.98 0.98 0.76 +0.24 1.00 -0.52 -0.04 1.00 -0.71 0.87 1.00 0.00 1.00 1.00 0.92 +0.26 1.00 -0.48 0.04 1.00 -0.43 0.67 1.00 0.00 1.00 1.00 1.00 +0.28 1.00 -0.44 0.12 0.98 -0.43 0.22 1.00 0.00 0.98 0.98 1.00 +0.30 1.00 -0.40 0.20 0.95 -0.43 0.83 1.00 0.00 0.95 0.95 1.00 +0.32 1.00 -0.36 0.28 0.90 -0.43 0.65 1.00 0.00 0.90 0.90 1.00 +0.34 1.00 -0.32 0.36 0.84 -0.43 0.32 1.00 0.00 0.84 0.84 1.00 +0.36 1.00 -0.28 0.44 0.77 -0.43 0.30 1.00 0.00 0.77 0.77 1.00 +0.38 1.00 -0.24 0.52 0.68 -0.14 0.90 1.00 0.00 0.68 0.68 1.00 +0.40 1.00 -0.20 0.60 0.59 -0.14 0.86 1.00 0.00 0.59 0.59 1.00 +0.42 1.00 -0.16 0.68 0.48 -0.14 0.30 1.00 0.00 0.48 0.48 1.00 +0.44 1.00 -0.12 0.76 0.37 -0.14 0.68 1.00 0.00 0.37 0.37 1.00 +0.46 1.00 -0.08 0.84 0.25 -0.14 0.06 1.00 0.00 0.25 0.25 1.00 +0.48 1.00 -0.04 0.92 0.13 -0.14 0.27 1.00 0.00 0.13 0.13 1.00 +0.50 -1.00 0.00 1.00 -0.00 0.14 0.00 1.00 0.00 0.00 0.00 1.00 +0.52 -1.00 0.04 0.92 -0.13 0.14 0.62 1.00 0.00 0.00 0.13 0.84 +0.54 -1.00 0.08 0.84 -0.25 0.14 0.18 1.00 0.00 0.00 0.25 0.68 +0.56 -1.00 0.12 0.76 -0.37 0.14 0.13 1.00 0.00 0.00 0.37 0.52 +0.58 -1.00 0.16 0.68 -0.48 0.14 0.96 1.00 0.00 0.00 0.48 0.36 +0.60 -1.00 0.20 0.60 -0.59 0.14 0.83 1.00 0.00 0.00 0.59 0.20 +0.62 -1.00 0.24 0.52 -0.68 0.14 0.11 1.00 0.00 0.00 0.68 0.04 +0.64 -1.00 0.28 0.44 -0.77 0.43 0.56 1.00 0.00 0.00 0.77 -0.12 +0.66 -1.00 0.32 0.36 -0.84 0.43 0.44 1.00 0.00 0.00 0.84 -0.28 +0.68 -1.00 0.36 0.28 -0.90 0.43 0.05 1.00 0.00 0.00 0.90 -0.44 +0.70 -1.00 0.40 0.20 -0.95 0.43 0.35 1.00 0.00 0.00 0.95 -0.60 +0.72 -1.00 0.44 0.12 -0.98 0.43 0.82 1.00 0.00 0.00 0.98 -0.76 +0.74 -1.00 0.48 0.04 -1.00 0.43 0.71 1.00 0.00 0.00 1.00 -0.92 +0.76 -1.00 0.52 -0.04 -1.00 0.71 0.26 1.00 0.00 0.00 1.00 -1.00 +0.78 -1.00 0.56 -0.12 -0.98 0.71 0.79 1.00 0.00 0.00 0.98 -1.00 +0.80 -1.00 0.60 -0.20 -0.95 0.71 0.63 1.00 0.00 0.00 0.95 -1.00 +0.82 -1.00 0.64 -0.28 -0.90 0.71 0.54 1.00 0.00 0.00 0.90 -1.00 +0.84 -1.00 0.68 -0.36 -0.84 0.71 0.34 1.00 0.00 0.00 0.84 -1.00 +0.86 -1.00 0.72 -0.44 -0.77 0.71 0.59 1.00 0.00 0.00 0.77 -1.00 +0.88 -1.00 0.76 -0.52 -0.68 1.00 0.43 1.00 0.00 0.00 0.68 -1.00 +0.90 -1.00 0.80 -0.60 -0.59 1.00 0.24 1.00 0.00 0.00 0.59 -1.00 +0.92 -1.00 0.84 -0.68 -0.48 1.00 0.94 1.00 0.00 0.00 0.48 -1.00 +0.94 -1.00 0.88 -0.76 -0.37 1.00 0.54 1.00 0.00 0.00 0.37 -1.00 +0.96 -1.00 0.92 -0.84 -0.25 1.00 0.77 1.00 0.00 0.00 0.25 -1.00 +0.98 -1.00 0.96 -0.92 -0.13 1.00 0.43 1.00 0.00 0.00 0.13 -1.00 +1.00 1.00 -1.00 -1.00 0.00 -1.00 0.16 1.00 0.00 0.00 0.00 -1.00 +1.02 1.00 -0.96 -0.92 0.13 -1.00 0.44 1.00 0.00 0.13 0.13 -0.84 +1.04 1.00 -0.92 -0.84 0.25 -1.00 0.76 1.00 0.00 0.25 0.25 -0.68 +1.06 1.00 -0.88 -0.76 0.37 -1.00 0.54 1.00 0.00 0.37 0.37 -0.52 +1.08 1.00 -0.84 -0.68 0.48 -1.00 0.52 1.00 0.00 0.48 0.48 -0.36 +1.10 1.00 -0.80 -0.60 0.59 -1.00 0.56 1.00 0.00 0.59 0.59 -0.20 +1.12 1.00 -0.76 -0.52 0.68 -1.00 0.25 1.00 0.00 0.68 0.68 -0.04 +1.14 1.00 -0.72 -0.44 0.77 -0.71 0.80 1.00 0.00 0.77 0.77 0.12 +1.16 1.00 -0.68 -0.36 0.84 -0.71 0.02 1.00 0.00 0.84 0.84 0.28 +1.18 1.00 -0.64 -0.28 0.90 -0.71 0.85 1.00 0.00 0.90 0.90 0.44 +1.20 1.00 -0.60 -0.20 0.95 -0.71 0.13 1.00 0.00 0.95 0.95 0.60 +1.22 1.00 -0.56 -0.12 0.98 -0.71 0.05 1.00 0.00 0.98 0.98 0.76 +1.24 1.00 -0.52 -0.04 1.00 -0.71 0.93 1.00 0.00 1.00 1.00 0.92 +1.26 1.00 -0.48 0.04 1.00 -0.43 0.97 1.00 0.00 1.00 1.00 1.00 +1.28 1.00 -0.44 0.12 0.98 -0.43 0.34 1.00 0.00 0.98 0.98 1.00 +1.30 1.00 -0.40 0.20 0.95 -0.43 0.57 1.00 0.00 0.95 0.95 1.00 +1.32 1.00 -0.36 0.28 0.90 -0.43 0.60 1.00 0.00 0.90 0.90 1.00 +1.34 1.00 -0.32 0.36 0.84 -0.43 0.91 1.00 0.00 0.84 0.84 1.00 +1.36 1.00 -0.28 0.44 0.77 -0.43 0.96 1.00 0.00 0.77 0.77 1.00 +1.38 1.00 -0.24 0.52 0.68 -0.14 0.25 1.00 0.00 0.68 0.68 1.00 +1.40 1.00 -0.20 0.60 0.59 -0.14 0.56 1.00 0.00 0.59 0.59 1.00 +1.42 1.00 -0.16 0.68 0.48 -0.14 0.06 1.00 0.00 0.48 0.48 1.00 +1.44 1.00 -0.12 0.76 0.37 -0.14 0.75 1.00 0.00 0.37 0.37 1.00 +1.46 1.00 -0.08 0.84 0.25 -0.14 0.14 1.00 0.00 0.25 0.25 1.00 +1.48 1.00 -0.04 0.92 0.13 -0.14 0.92 1.00 0.00 0.13 0.13 1.00 +1.50 -1.00 0.00 1.00 -0.00 0.14 0.35 1.00 0.00 0.00 0.00 1.00 +1.52 -1.00 0.04 0.92 -0.13 0.14 0.32 1.00 0.00 0.00 0.13 0.84 +1.54 -1.00 0.08 0.84 -0.25 0.14 0.50 1.00 0.00 0.00 0.25 0.68 +1.56 -1.00 0.12 0.76 -0.37 0.14 0.97 1.00 0.00 0.00 0.37 0.52 +1.58 -1.00 0.16 0.68 -0.48 0.14 0.28 1.00 0.00 0.00 0.48 0.36 +1.60 -1.00 0.20 0.60 -0.59 0.14 0.43 1.00 0.00 0.00 0.59 0.20 +1.62 -1.00 0.24 0.52 -0.68 0.14 0.42 1.00 0.00 0.00 0.68 0.04 +1.64 -1.00 0.28 0.44 -0.77 0.43 0.87 1.00 0.00 0.00 0.77 -0.12 +1.66 -1.00 0.32 0.36 -0.84 0.43 0.20 1.00 0.00 0.00 0.84 -0.28 +1.68 -1.00 0.36 0.28 -0.90 0.43 0.51 1.00 0.00 0.00 0.90 -0.44 +1.70 -1.00 0.40 0.20 -0.95 0.43 0.34 1.00 0.00 0.00 0.95 -0.60 +1.72 -1.00 0.44 0.12 -0.98 0.43 0.26 1.00 0.00 0.00 0.98 -0.76 +1.74 -1.00 0.48 0.04 -1.00 0.43 0.04 1.00 0.00 0.00 1.00 -0.92 +1.76 -1.00 0.52 -0.04 -1.00 0.71 0.04 1.00 0.00 0.00 1.00 -1.00 +1.78 -1.00 0.56 -0.12 -0.98 0.71 0.60 1.00 0.00 0.00 0.98 -1.00 +1.80 -1.00 0.60 -0.20 -0.95 0.71 0.82 1.00 0.00 0.00 0.95 -1.00 +1.82 -1.00 0.64 -0.28 -0.90 0.71 0.23 1.00 0.00 0.00 0.90 -1.00 +1.84 -1.00 0.68 -0.36 -0.84 0.71 0.93 1.00 0.00 0.00 0.84 -1.00 +1.86 -1.00 0.72 -0.44 -0.77 0.71 0.31 1.00 0.00 0.00 0.77 -1.00 +1.88 -1.00 0.76 -0.52 -0.68 1.00 0.50 1.00 0.00 0.00 0.68 -1.00 +1.90 -1.00 0.80 -0.60 -0.59 1.00 0.08 1.00 0.00 0.00 0.59 -1.00 +1.92 -1.00 0.84 -0.68 -0.48 1.00 0.47 1.00 0.00 0.00 0.48 -1.00 +1.94 -1.00 0.88 -0.76 -0.37 1.00 0.30 1.00 0.00 0.00 0.37 -1.00 +1.96 -1.00 0.92 -0.84 -0.25 1.00 0.63 1.00 0.00 0.00 0.25 -1.00 +1.98 -1.00 0.96 -0.92 -0.13 1.00 0.59 1.00 0.00 0.00 0.13 -1.00 +2.00 1.00 -1.00 -1.00 0.00 -1.00 0.36 1.00 0.00 0.00 0.00 -1.00 +2.02 1.00 -0.96 -0.92 0.13 -1.00 0.53 1.00 0.00 0.13 0.13 -0.84 +2.04 1.00 -0.92 -0.84 0.25 -1.00 0.87 1.00 0.00 0.25 0.25 -0.68 +2.06 1.00 -0.88 -0.76 0.37 -1.00 0.18 1.00 0.00 0.37 0.37 -0.52 +2.08 1.00 -0.84 -0.68 0.48 -1.00 0.24 1.00 0.00 0.48 0.48 -0.36 +2.10 1.00 -0.80 -0.60 0.59 -1.00 0.27 1.00 0.00 0.59 0.59 -0.20 +2.12 1.00 -0.76 -0.52 0.68 -1.00 0.31 1.00 0.00 0.68 0.68 -0.04 +2.14 1.00 -0.72 -0.44 0.77 -0.71 0.06 1.00 0.00 0.77 0.77 0.12 +2.16 1.00 -0.68 -0.36 0.84 -0.71 0.64 1.00 0.00 0.84 0.84 0.28 +2.18 1.00 -0.64 -0.28 0.90 -0.71 0.30 1.00 0.00 0.90 0.90 0.44 +2.20 1.00 -0.60 -0.20 0.95 -0.71 0.75 1.00 0.00 0.95 0.95 0.60 +2.22 1.00 -0.56 -0.12 0.98 -0.71 0.87 1.00 0.00 0.98 0.98 0.76 +2.24 1.00 -0.52 -0.04 1.00 -0.71 0.96 1.00 0.00 1.00 1.00 0.92 +2.26 1.00 -0.48 0.04 1.00 -0.43 0.48 1.00 0.00 1.00 1.00 1.00 +2.28 1.00 -0.44 0.12 0.98 -0.43 0.54 1.00 0.00 0.98 0.98 1.00 +2.30 1.00 -0.40 0.20 0.95 -0.43 0.20 1.00 0.00 0.95 0.95 1.00 +2.32 1.00 -0.36 0.28 0.90 -0.43 0.64 1.00 0.00 0.90 0.90 1.00 +2.34 1.00 -0.32 0.36 0.84 -0.43 0.72 1.00 0.00 0.84 0.84 1.00 +2.36 1.00 -0.28 0.44 0.77 -0.43 0.07 1.00 0.00 0.77 0.77 1.00 +2.38 1.00 -0.24 0.52 0.68 -0.14 0.38 1.00 0.00 0.68 0.68 1.00 +2.40 1.00 -0.20 0.60 0.59 -0.14 0.51 1.00 0.00 0.59 0.59 1.00 +2.42 1.00 -0.16 0.68 0.48 -0.14 0.47 1.00 0.00 0.48 0.48 1.00 +2.44 1.00 -0.12 0.76 0.37 -0.14 0.93 1.00 0.00 0.37 0.37 1.00 +2.46 1.00 -0.08 0.84 0.25 -0.14 0.13 1.00 0.00 0.25 0.25 1.00 +2.48 1.00 -0.04 0.92 0.13 -0.14 0.80 1.00 0.00 0.13 0.13 1.00 +2.50 -1.00 0.00 1.00 -0.00 0.14 0.10 1.00 0.00 0.00 0.00 1.00 +2.52 -1.00 0.04 0.92 -0.13 0.14 0.61 1.00 0.00 0.00 0.13 0.84 +2.54 -1.00 0.08 0.84 -0.25 0.14 0.26 1.00 0.00 0.00 0.25 0.68 +2.56 -1.00 0.12 0.76 -0.37 0.14 0.40 1.00 0.00 0.00 0.37 0.52 +2.58 -1.00 0.16 0.68 -0.48 0.14 0.90 1.00 0.00 0.00 0.48 0.36 +2.60 -1.00 0.20 0.60 -0.59 0.14 0.77 1.00 0.00 0.00 0.59 0.20 +2.62 -1.00 0.24 0.52 -0.68 0.14 0.20 1.00 0.00 0.00 0.68 0.04 +2.64 -1.00 0.28 0.44 -0.77 0.43 0.54 1.00 0.00 0.00 0.77 -0.12 +2.66 -1.00 0.32 0.36 -0.84 0.43 0.88 1.00 0.00 0.00 0.84 -0.28 +2.68 -1.00 0.36 0.28 -0.90 0.43 1.00 1.00 0.00 0.00 0.90 -0.44 +2.70 -1.00 0.40 0.20 -0.95 0.43 0.38 1.00 0.00 0.00 0.95 -0.60 +2.72 -1.00 0.44 0.12 -0.98 0.43 0.82 1.00 0.00 0.00 0.98 -0.76 +2.74 -1.00 0.48 0.04 -1.00 0.43 0.92 1.00 0.00 0.00 1.00 -0.92 +2.76 -1.00 0.52 -0.04 -1.00 0.71 0.88 1.00 0.00 0.00 1.00 -1.00 +2.78 -1.00 0.56 -0.12 -0.98 0.71 0.90 1.00 0.00 0.00 0.98 -1.00 +2.80 -1.00 0.60 -0.20 -0.95 0.71 0.48 1.00 0.00 0.00 0.95 -1.00 +2.82 -1.00 0.64 -0.28 -0.90 0.71 0.57 1.00 0.00 0.00 0.90 -1.00 +2.84 -1.00 0.68 -0.36 -0.84 0.71 0.60 1.00 0.00 0.00 0.84 -1.00 +2.86 -1.00 0.72 -0.44 -0.77 0.71 0.49 1.00 0.00 0.00 0.77 -1.00 +2.88 -1.00 0.76 -0.52 -0.68 1.00 0.60 1.00 0.00 0.00 0.68 -1.00 +2.90 -1.00 0.80 -0.60 -0.59 1.00 0.79 1.00 0.00 0.00 0.59 -1.00 +2.92 -1.00 0.84 -0.68 -0.48 1.00 0.35 1.00 0.00 0.00 0.48 -1.00 +2.94 -1.00 0.88 -0.76 -0.37 1.00 0.39 1.00 0.00 0.00 0.37 -1.00 +2.96 -1.00 0.92 -0.84 -0.25 1.00 0.85 1.00 0.00 0.00 0.25 -1.00 +2.98 -1.00 0.96 -0.92 -0.13 1.00 0.84 1.00 0.00 0.00 0.13 -1.00 +3.00 1.00 -1.00 -1.00 0.00 -1.00 0.30 1.00 0.00 0.00 0.00 -1.00 +3.02 1.00 -0.96 -0.92 0.13 -1.00 0.76 1.00 0.00 0.13 0.13 -0.84 +3.04 1.00 -0.92 -0.84 0.25 -1.00 0.07 1.00 0.00 0.25 0.25 -0.68 +3.06 1.00 -0.88 -0.76 0.37 -1.00 0.09 1.00 0.00 0.37 0.37 -0.52 +3.08 1.00 -0.84 -0.68 0.48 -1.00 0.22 1.00 0.00 0.48 0.48 -0.36 +3.10 1.00 -0.80 -0.60 0.59 -1.00 0.86 1.00 0.00 0.59 0.59 -0.20 +3.12 1.00 -0.76 -0.52 0.68 -1.00 0.04 1.00 0.00 0.68 0.68 -0.04 +3.14 1.00 -0.72 -0.44 0.77 -0.71 0.80 1.00 0.00 0.77 0.77 0.12 +3.16 1.00 -0.68 -0.36 0.84 -0.71 0.83 1.00 0.00 0.84 0.84 0.28 +3.18 1.00 -0.64 -0.28 0.90 -0.71 0.23 1.00 0.00 0.90 0.90 0.44 +3.20 1.00 -0.60 -0.20 0.95 -0.71 0.49 1.00 0.00 0.95 0.95 0.60 +3.22 1.00 -0.56 -0.12 0.98 -0.71 0.77 1.00 0.00 0.98 0.98 0.76 +3.24 1.00 -0.52 -0.04 1.00 -0.71 0.78 1.00 0.00 1.00 1.00 0.92 +3.26 1.00 -0.48 0.04 1.00 -0.43 0.35 1.00 0.00 1.00 1.00 1.00 +3.28 1.00 -0.44 0.12 0.98 -0.43 0.99 1.00 0.00 0.98 0.98 1.00 +3.30 1.00 -0.40 0.20 0.95 -0.43 0.14 1.00 0.00 0.95 0.95 1.00 +3.32 1.00 -0.36 0.28 0.90 -0.43 0.05 1.00 0.00 0.90 0.90 1.00 +3.34 1.00 -0.32 0.36 0.84 -0.43 0.70 1.00 0.00 0.84 0.84 1.00 +3.36 1.00 -0.28 0.44 0.77 -0.43 0.82 1.00 0.00 0.77 0.77 1.00 +3.38 1.00 -0.24 0.52 0.68 -0.14 0.62 1.00 0.00 0.68 0.68 1.00 +3.40 1.00 -0.20 0.60 0.59 -0.14 0.01 1.00 0.00 0.59 0.59 1.00 +3.42 1.00 -0.16 0.68 0.48 -0.14 0.69 1.00 0.00 0.48 0.48 1.00 +3.44 1.00 -0.12 0.76 0.37 -0.14 0.19 1.00 0.00 0.37 0.37 1.00 +3.46 1.00 -0.08 0.84 0.25 -0.14 0.39 1.00 0.00 0.25 0.25 1.00 +3.48 1.00 -0.04 0.92 0.13 -0.14 0.39 1.00 0.00 0.13 0.13 1.00 +3.50 -1.00 0.00 1.00 -0.00 0.14 0.46 1.00 0.00 0.00 0.00 1.00 +3.52 -1.00 0.04 0.92 -0.13 0.14 0.75 1.00 0.00 0.00 0.13 0.84 +3.54 -1.00 0.08 0.84 -0.25 0.14 0.21 1.00 0.00 0.00 0.25 0.68 +3.56 -1.00 0.12 0.76 -0.37 0.14 0.85 1.00 0.00 0.00 0.37 0.52 +3.58 -1.00 0.16 0.68 -0.48 0.14 0.92 1.00 0.00 0.00 0.48 0.36 +3.60 -1.00 0.20 0.60 -0.59 0.14 0.78 1.00 0.00 0.00 0.59 0.20 +3.62 -1.00 0.24 0.52 -0.68 0.14 0.41 1.00 0.00 0.00 0.68 0.04 +3.64 -1.00 0.28 0.44 -0.77 0.43 0.90 1.00 0.00 0.00 0.77 -0.12 +3.66 -1.00 0.32 0.36 -0.84 0.43 0.71 1.00 0.00 0.00 0.84 -0.28 +3.68 -1.00 0.36 0.28 -0.90 0.43 0.94 1.00 0.00 0.00 0.90 -0.44 +3.70 -1.00 0.40 0.20 -0.95 0.43 0.92 1.00 0.00 0.00 0.95 -0.60 +3.72 -1.00 0.44 0.12 -0.98 0.43 0.91 1.00 0.00 0.00 0.98 -0.76 +3.74 -1.00 0.48 0.04 -1.00 0.43 0.79 1.00 0.00 0.00 1.00 -0.92 +3.76 -1.00 0.52 -0.04 -1.00 0.71 0.64 1.00 0.00 0.00 1.00 -1.00 +3.78 -1.00 0.56 -0.12 -0.98 0.71 0.08 1.00 0.00 0.00 0.98 -1.00 +3.80 -1.00 0.60 -0.20 -0.95 0.71 0.49 1.00 0.00 0.00 0.95 -1.00 +3.82 -1.00 0.64 -0.28 -0.90 0.71 0.50 1.00 0.00 0.00 0.90 -1.00 +3.84 -1.00 0.68 -0.36 -0.84 0.71 0.86 1.00 0.00 0.00 0.84 -1.00 +3.86 -1.00 0.72 -0.44 -0.77 0.71 0.61 1.00 0.00 0.00 0.77 -1.00 +3.88 -1.00 0.76 -0.52 -0.68 1.00 0.42 1.00 0.00 0.00 0.68 -1.00 +3.90 -1.00 0.80 -0.60 -0.59 1.00 0.25 1.00 0.00 0.00 0.59 -1.00 +3.92 -1.00 0.84 -0.68 -0.48 1.00 0.06 1.00 0.00 0.00 0.48 -1.00 +3.94 -1.00 0.88 -0.76 -0.37 1.00 0.97 1.00 0.00 0.00 0.37 -1.00 +3.96 -1.00 0.92 -0.84 -0.25 1.00 0.81 1.00 0.00 0.00 0.25 -1.00 +3.98 -1.00 0.96 -0.92 -0.13 1.00 0.57 1.00 0.00 0.00 0.13 -1.00 + +done... diff --git a/libraries/FunctionGenerator/examples/functionGeneratorPerformance/performance_0.3.0.txt b/libraries/FunctionGenerator/examples/functionGeneratorPerformance/performance_0.3.0.txt new file mode 100644 index 00000000..dbc8284a --- /dev/null +++ b/libraries/FunctionGenerator/examples/functionGeneratorPerformance/performance_0.3.0.txt @@ -0,0 +1,429 @@ + +functionGeneratorPerformance.ino +FUNCTIONGENERATOR_LIB_VERSION: 0.3.0 + +indicative output Arduino UNO 1.8.19, 16 MHz. + +| wave form name | usec | max calls/sec | +|:---------------|-------:|----------------:| +| square | 54.57 | 18325.49 | +| sawtooth | 61.69 | 16210.61 | +| triangle | 79.80 | 12531.96 | +| sinus | 166.38 | 6010.37 | +| stair | 80.86 | 12366.38 | +| random | 42.61 | 23466.69 | +| random_DC | 67.18 | 14885.12 | +| line | 0.76 | 1322751.37 | +| zero | 0.75 | 1324854.25 | +| sinusDiode | 169.93 | 5884.79 | +| sinusRectified | 169.49 | 5900.03 | +| trapezium1 | 100.98 | 9903.30 | +| trapezium2 | 143.98 | 6945.58 | +| heartBeat | 128.52 | 7780.77 | +| freeWave | 75.52 | 13241.31 | + + + +t sqr saw tri sin str rnd line zero sinD sinR trap +-4.00 -1.00 1.00 -1.00 -0.00 1.00 0.50 1.00 0.00 0.00 0.00 -1.00 +-3.98 1.00 -0.96 -0.92 0.13 -1.00 0.06 1.00 0.00 0.13 0.13 -1.00 +-3.96 1.00 -0.92 -0.84 0.25 -1.00 0.34 1.00 0.00 0.25 0.25 -1.00 +-3.94 1.00 -0.88 -0.76 0.37 -1.00 0.33 1.00 0.00 0.37 0.37 -1.00 +-3.92 1.00 -0.84 -0.68 0.48 -1.00 0.95 1.00 0.00 0.48 0.48 -1.00 +-3.90 1.00 -0.80 -0.60 0.59 -1.00 0.75 1.00 0.00 0.59 0.59 -1.00 +-3.88 1.00 -0.76 -0.52 0.68 -1.00 0.20 1.00 0.00 0.68 0.68 -1.00 +-3.86 1.00 -0.72 -0.44 0.77 -0.71 0.33 1.00 0.00 0.77 0.77 -1.00 +-3.84 1.00 -0.68 -0.36 0.84 -0.71 0.25 1.00 0.00 0.84 0.84 -1.00 +-3.82 1.00 -0.64 -0.28 0.90 -0.71 0.39 1.00 0.00 0.90 0.90 -1.00 +-3.80 1.00 -0.60 -0.20 0.95 -0.71 0.42 1.00 0.00 0.95 0.95 -1.00 +-3.78 1.00 -0.56 -0.12 0.98 -0.71 0.95 1.00 0.00 0.98 0.98 -1.00 +-3.76 1.00 -0.52 -0.04 1.00 -0.71 0.56 1.00 0.00 1.00 1.00 -1.00 +-3.74 1.00 -0.48 0.04 1.00 -0.43 0.64 1.00 0.00 1.00 1.00 -0.92 +-3.72 1.00 -0.44 0.12 0.98 -0.43 0.17 1.00 0.00 0.98 0.98 -0.76 +-3.70 1.00 -0.40 0.20 0.95 -0.43 0.78 1.00 0.00 0.95 0.95 -0.60 +-3.68 1.00 -0.36 0.28 0.90 -0.43 0.02 1.00 0.00 0.90 0.90 -0.44 +-3.66 1.00 -0.32 0.36 0.84 -0.43 0.31 1.00 0.00 0.84 0.84 -0.28 +-3.64 1.00 -0.28 0.44 0.77 -0.43 0.49 1.00 0.00 0.77 0.77 -0.12 +-3.62 1.00 -0.24 0.52 0.68 -0.14 0.09 1.00 0.00 0.68 0.68 0.04 +-3.60 1.00 -0.20 0.60 0.59 -0.14 0.21 1.00 0.00 0.59 0.59 0.20 +-3.58 1.00 -0.16 0.68 0.48 -0.14 0.82 1.00 0.00 0.48 0.48 0.36 +-3.56 1.00 -0.12 0.76 0.37 -0.14 0.51 1.00 0.00 0.37 0.37 0.52 +-3.54 1.00 -0.08 0.84 0.25 -0.14 0.74 1.00 0.00 0.25 0.25 0.68 +-3.52 1.00 -0.04 0.92 0.13 -0.14 0.20 1.00 0.00 0.13 0.13 0.84 +-3.50 1.00 0.00 1.00 0.00 -0.14 0.27 1.00 0.00 0.00 0.00 1.00 +-3.48 -1.00 0.04 0.92 -0.13 0.14 0.15 1.00 0.00 0.00 0.13 1.00 +-3.46 -1.00 0.08 0.84 -0.25 0.14 0.67 1.00 0.00 0.00 0.25 1.00 +-3.44 -1.00 0.12 0.76 -0.37 0.14 0.54 1.00 0.00 0.00 0.37 1.00 +-3.42 -1.00 0.16 0.68 -0.48 0.14 0.44 1.00 0.00 0.00 0.48 1.00 +-3.40 -1.00 0.20 0.60 -0.59 0.14 0.85 1.00 0.00 0.00 0.59 1.00 +-3.38 -1.00 0.24 0.52 -0.68 0.14 0.90 1.00 0.00 0.00 0.68 1.00 +-3.36 -1.00 0.28 0.44 -0.77 0.43 0.43 1.00 0.00 0.00 0.77 1.00 +-3.34 -1.00 0.32 0.36 -0.84 0.43 0.11 1.00 0.00 0.00 0.84 1.00 +-3.32 -1.00 0.36 0.28 -0.90 0.43 0.91 1.00 0.00 0.00 0.90 1.00 +-3.30 -1.00 0.40 0.20 -0.95 0.43 0.79 1.00 0.00 0.00 0.95 1.00 +-3.28 -1.00 0.44 0.12 -0.98 0.43 0.17 1.00 0.00 0.00 0.98 1.00 +-3.26 -1.00 0.48 0.04 -1.00 0.43 0.72 1.00 0.00 0.00 1.00 1.00 +-3.24 -1.00 0.52 -0.04 -1.00 0.71 0.77 1.00 0.00 0.00 1.00 0.92 +-3.22 -1.00 0.56 -0.12 -0.98 0.71 0.86 1.00 0.00 0.00 0.98 0.76 +-3.20 -1.00 0.60 -0.20 -0.95 0.71 0.50 1.00 0.00 0.00 0.95 0.60 +-3.18 -1.00 0.64 -0.28 -0.90 0.71 0.42 1.00 0.00 0.00 0.90 0.44 +-3.16 -1.00 0.68 -0.36 -0.84 0.71 0.73 1.00 0.00 0.00 0.84 0.28 +-3.14 -1.00 0.72 -0.44 -0.77 0.71 0.01 1.00 0.00 0.00 0.77 0.12 +-3.12 -1.00 0.76 -0.52 -0.68 1.00 0.52 1.00 0.00 0.00 0.68 -0.04 +-3.10 -1.00 0.80 -0.60 -0.59 1.00 0.72 1.00 0.00 0.00 0.59 -0.20 +-3.08 -1.00 0.84 -0.68 -0.48 1.00 0.61 1.00 0.00 0.00 0.48 -0.36 +-3.06 -1.00 0.88 -0.76 -0.37 1.00 0.41 1.00 0.00 0.00 0.37 -0.52 +-3.04 -1.00 0.92 -0.84 -0.25 1.00 0.68 1.00 0.00 0.00 0.25 -0.68 +-3.02 -1.00 0.96 -0.92 -0.13 1.00 0.34 1.00 0.00 0.00 0.13 -0.84 +-3.00 -1.00 1.00 -1.00 -0.00 1.00 0.90 1.00 0.00 0.00 0.00 -1.00 +-2.98 1.00 -0.96 -0.92 0.13 -1.00 0.43 1.00 0.00 0.13 0.13 -1.00 +-2.96 1.00 -0.92 -0.84 0.25 -1.00 0.47 1.00 0.00 0.25 0.25 -1.00 +-2.94 1.00 -0.88 -0.76 0.37 -1.00 0.51 1.00 0.00 0.37 0.37 -1.00 +-2.92 1.00 -0.84 -0.68 0.48 -1.00 0.29 1.00 0.00 0.48 0.48 -1.00 +-2.90 1.00 -0.80 -0.60 0.59 -1.00 0.42 1.00 0.00 0.59 0.59 -1.00 +-2.88 1.00 -0.76 -0.52 0.68 -1.00 0.02 1.00 0.00 0.68 0.68 -1.00 +-2.86 1.00 -0.72 -0.44 0.77 -0.71 0.91 1.00 0.00 0.77 0.77 -1.00 +-2.84 1.00 -0.68 -0.36 0.84 -0.71 0.00 1.00 0.00 0.84 0.84 -1.00 +-2.82 1.00 -0.64 -0.28 0.90 -0.71 0.22 1.00 0.00 0.90 0.90 -1.00 +-2.80 1.00 -0.60 -0.20 0.95 -0.71 0.55 1.00 0.00 0.95 0.95 -1.00 +-2.78 1.00 -0.56 -0.12 0.98 -0.71 0.96 1.00 0.00 0.98 0.98 -1.00 +-2.76 1.00 -0.52 -0.04 1.00 -0.71 0.30 1.00 0.00 1.00 1.00 -1.00 +-2.74 1.00 -0.48 0.04 1.00 -0.43 0.19 1.00 0.00 1.00 1.00 -0.92 +-2.72 1.00 -0.44 0.12 0.98 -0.43 0.62 1.00 0.00 0.98 0.98 -0.76 +-2.70 1.00 -0.40 0.20 0.95 -0.43 0.61 1.00 0.00 0.95 0.95 -0.60 +-2.68 1.00 -0.36 0.28 0.90 -0.43 0.28 1.00 0.00 0.90 0.90 -0.44 +-2.66 1.00 -0.32 0.36 0.84 -0.43 0.85 1.00 0.00 0.84 0.84 -0.28 +-2.64 1.00 -0.28 0.44 0.77 -0.43 0.22 1.00 0.00 0.77 0.77 -0.12 +-2.62 1.00 -0.24 0.52 0.68 -0.14 0.66 1.00 0.00 0.68 0.68 0.04 +-2.60 1.00 -0.20 0.60 0.59 -0.14 0.62 1.00 0.00 0.59 0.59 0.20 +-2.58 1.00 -0.16 0.68 0.48 -0.14 0.30 1.00 0.00 0.48 0.48 0.36 +-2.56 1.00 -0.12 0.76 0.37 -0.14 0.38 1.00 0.00 0.37 0.37 0.52 +-2.54 1.00 -0.08 0.84 0.25 -0.14 0.00 1.00 0.00 0.25 0.25 0.68 +-2.52 1.00 -0.04 0.92 0.13 -0.14 0.09 1.00 0.00 0.13 0.13 0.84 +-2.50 1.00 0.00 1.00 0.00 -0.14 0.56 1.00 0.00 0.00 0.00 1.00 +-2.48 -1.00 0.04 0.92 -0.13 0.14 0.67 1.00 0.00 0.00 0.13 1.00 +-2.46 -1.00 0.08 0.84 -0.25 0.14 0.66 1.00 0.00 0.00 0.25 1.00 +-2.44 -1.00 0.12 0.76 -0.37 0.14 0.15 1.00 0.00 0.00 0.37 1.00 +-2.42 -1.00 0.16 0.68 -0.48 0.14 0.71 1.00 0.00 0.00 0.48 1.00 +-2.40 -1.00 0.20 0.60 -0.59 0.14 0.75 1.00 0.00 0.00 0.59 1.00 +-2.38 -1.00 0.24 0.52 -0.68 0.14 0.13 1.00 0.00 0.00 0.68 1.00 +-2.36 -1.00 0.28 0.44 -0.77 0.43 0.99 1.00 0.00 0.00 0.77 1.00 +-2.34 -1.00 0.32 0.36 -0.84 0.43 0.01 1.00 0.00 0.00 0.84 1.00 +-2.32 -1.00 0.36 0.28 -0.90 0.43 0.92 1.00 0.00 0.00 0.90 1.00 +-2.30 -1.00 0.40 0.20 -0.95 0.43 0.92 1.00 0.00 0.00 0.95 1.00 +-2.28 -1.00 0.44 0.12 -0.98 0.43 0.38 1.00 0.00 0.00 0.98 1.00 +-2.26 -1.00 0.48 0.04 -1.00 0.43 0.87 1.00 0.00 0.00 1.00 1.00 +-2.24 -1.00 0.52 -0.04 -1.00 0.71 0.42 1.00 0.00 0.00 1.00 0.92 +-2.22 -1.00 0.56 -0.12 -0.98 0.71 0.88 1.00 0.00 0.00 0.98 0.76 +-2.20 -1.00 0.60 -0.20 -0.95 0.71 0.71 1.00 0.00 0.00 0.95 0.60 +-2.18 -1.00 0.64 -0.28 -0.90 0.71 0.97 1.00 0.00 0.00 0.90 0.44 +-2.16 -1.00 0.68 -0.36 -0.84 0.71 0.27 1.00 0.00 0.00 0.84 0.28 +-2.14 -1.00 0.72 -0.44 -0.77 0.71 0.94 1.00 0.00 0.00 0.77 0.12 +-2.12 -1.00 0.76 -0.52 -0.68 1.00 0.92 1.00 0.00 0.00 0.68 -0.04 +-2.10 -1.00 0.80 -0.60 -0.59 1.00 0.02 1.00 0.00 0.00 0.59 -0.20 +-2.08 -1.00 0.84 -0.68 -0.48 1.00 0.26 1.00 0.00 0.00 0.48 -0.36 +-2.06 -1.00 0.88 -0.76 -0.37 1.00 0.54 1.00 0.00 0.00 0.37 -0.52 +-2.04 -1.00 0.92 -0.84 -0.25 1.00 0.93 1.00 0.00 0.00 0.25 -0.68 +-2.02 -1.00 0.96 -0.92 -0.13 1.00 0.25 1.00 0.00 0.00 0.13 -0.84 +-2.00 -1.00 1.00 -1.00 -0.00 1.00 0.77 1.00 0.00 0.00 0.00 -1.00 +-1.98 1.00 -0.96 -0.92 0.13 -1.00 0.71 1.00 0.00 0.13 0.13 -1.00 +-1.96 1.00 -0.92 -0.84 0.25 -1.00 0.86 1.00 0.00 0.25 0.25 -1.00 +-1.94 1.00 -0.88 -0.76 0.37 -1.00 0.15 1.00 0.00 0.37 0.37 -1.00 +-1.92 1.00 -0.84 -0.68 0.48 -1.00 0.80 1.00 0.00 0.48 0.48 -1.00 +-1.90 1.00 -0.80 -0.60 0.59 -1.00 0.17 1.00 0.00 0.59 0.59 -1.00 +-1.88 1.00 -0.76 -0.52 0.68 -1.00 0.18 1.00 0.00 0.68 0.68 -1.00 +-1.86 1.00 -0.72 -0.44 0.77 -0.71 0.54 1.00 0.00 0.77 0.77 -1.00 +-1.84 1.00 -0.68 -0.36 0.84 -0.71 0.13 1.00 0.00 0.84 0.84 -1.00 +-1.82 1.00 -0.64 -0.28 0.90 -0.71 0.71 1.00 0.00 0.90 0.90 -1.00 +-1.80 1.00 -0.60 -0.20 0.95 -0.71 0.24 1.00 0.00 0.95 0.95 -1.00 +-1.78 1.00 -0.56 -0.12 0.98 -0.71 0.73 1.00 0.00 0.98 0.98 -1.00 +-1.76 1.00 -0.52 -0.04 1.00 -0.71 0.08 1.00 0.00 1.00 1.00 -1.00 +-1.74 1.00 -0.48 0.04 1.00 -0.43 0.13 1.00 0.00 1.00 1.00 -0.92 +-1.72 1.00 -0.44 0.12 0.98 -0.43 0.28 1.00 0.00 0.98 0.98 -0.76 +-1.70 1.00 -0.40 0.20 0.95 -0.43 0.20 1.00 0.00 0.95 0.95 -0.60 +-1.68 1.00 -0.36 0.28 0.90 -0.43 0.53 1.00 0.00 0.90 0.90 -0.44 +-1.66 1.00 -0.32 0.36 0.84 -0.43 0.48 1.00 0.00 0.84 0.84 -0.28 +-1.64 1.00 -0.28 0.44 0.77 -0.43 0.38 1.00 0.00 0.77 0.77 -0.12 +-1.62 1.00 -0.24 0.52 0.68 -0.14 0.28 1.00 0.00 0.68 0.68 0.04 +-1.60 1.00 -0.20 0.60 0.59 -0.14 0.06 1.00 0.00 0.59 0.59 0.20 +-1.58 1.00 -0.16 0.68 0.48 -0.14 0.84 1.00 0.00 0.48 0.48 0.36 +-1.56 1.00 -0.12 0.76 0.37 -0.14 0.35 1.00 0.00 0.37 0.37 0.52 +-1.54 1.00 -0.08 0.84 0.25 -0.14 0.13 1.00 0.00 0.25 0.25 0.68 +-1.52 1.00 -0.04 0.92 0.13 -0.14 0.51 1.00 0.00 0.13 0.13 0.84 +-1.50 1.00 0.00 1.00 0.00 -0.14 0.37 1.00 0.00 0.00 0.00 1.00 +-1.48 -1.00 0.04 0.92 -0.13 0.14 0.40 1.00 0.00 0.00 0.13 1.00 +-1.46 -1.00 0.08 0.84 -0.25 0.14 0.26 1.00 0.00 0.00 0.25 1.00 +-1.44 -1.00 0.12 0.76 -0.37 0.14 0.30 1.00 0.00 0.00 0.37 1.00 +-1.42 -1.00 0.16 0.68 -0.48 0.14 0.76 1.00 0.00 0.00 0.48 1.00 +-1.40 -1.00 0.20 0.60 -0.59 0.14 0.59 1.00 0.00 0.00 0.59 1.00 +-1.38 -1.00 0.24 0.52 -0.68 0.14 0.32 1.00 0.00 0.00 0.68 1.00 +-1.36 -1.00 0.28 0.44 -0.77 0.43 0.79 1.00 0.00 0.00 0.77 1.00 +-1.34 -1.00 0.32 0.36 -0.84 0.43 0.63 1.00 0.00 0.00 0.84 1.00 +-1.32 -1.00 0.36 0.28 -0.90 0.43 0.20 1.00 0.00 0.00 0.90 1.00 +-1.30 -1.00 0.40 0.20 -0.95 0.43 0.83 1.00 0.00 0.00 0.95 1.00 +-1.28 -1.00 0.44 0.12 -0.98 0.43 0.25 1.00 0.00 0.00 0.98 1.00 +-1.26 -1.00 0.48 0.04 -1.00 0.43 0.36 1.00 0.00 0.00 1.00 1.00 +-1.24 -1.00 0.52 -0.04 -1.00 0.71 0.25 1.00 0.00 0.00 1.00 0.92 +-1.22 -1.00 0.56 -0.12 -0.98 0.71 0.25 1.00 0.00 0.00 0.98 0.76 +-1.20 -1.00 0.60 -0.20 -0.95 0.71 0.18 1.00 0.00 0.00 0.95 0.60 +-1.18 -1.00 0.64 -0.28 -0.90 0.71 0.30 1.00 0.00 0.00 0.90 0.44 +-1.16 -1.00 0.68 -0.36 -0.84 0.71 0.09 1.00 0.00 0.00 0.84 0.28 +-1.14 -1.00 0.72 -0.44 -0.77 0.71 0.32 1.00 0.00 0.00 0.77 0.12 +-1.12 -1.00 0.76 -0.52 -0.68 1.00 0.69 1.00 0.00 0.00 0.68 -0.04 +-1.10 -1.00 0.80 -0.60 -0.59 1.00 0.96 1.00 0.00 0.00 0.59 -0.20 +-1.08 -1.00 0.84 -0.68 -0.48 1.00 0.28 1.00 0.00 0.00 0.48 -0.36 +-1.06 -1.00 0.88 -0.76 -0.37 1.00 0.93 1.00 0.00 0.00 0.37 -0.52 +-1.04 -1.00 0.92 -0.84 -0.25 1.00 0.21 1.00 0.00 0.00 0.25 -0.68 +-1.02 -1.00 0.96 -0.92 -0.13 1.00 0.87 1.00 0.00 0.00 0.13 -0.84 +-1.00 -1.00 1.00 -1.00 -0.00 1.00 0.57 1.00 0.00 0.00 0.00 -1.00 +-0.98 1.00 -0.96 -0.92 0.13 -1.00 0.42 1.00 0.00 0.13 0.13 -1.00 +-0.96 1.00 -0.92 -0.84 0.25 -1.00 0.81 1.00 0.00 0.25 0.25 -1.00 +-0.94 1.00 -0.88 -0.76 0.37 -1.00 0.39 1.00 0.00 0.37 0.37 -1.00 +-0.92 1.00 -0.84 -0.68 0.48 -1.00 0.71 1.00 0.00 0.48 0.48 -1.00 +-0.90 1.00 -0.80 -0.60 0.59 -1.00 0.47 1.00 0.00 0.59 0.59 -1.00 +-0.88 1.00 -0.76 -0.52 0.68 -1.00 0.56 1.00 0.00 0.68 0.68 -1.00 +-0.86 1.00 -0.72 -0.44 0.77 -0.71 0.86 1.00 0.00 0.77 0.77 -1.00 +-0.84 1.00 -0.68 -0.36 0.84 -0.71 0.87 1.00 0.00 0.84 0.84 -1.00 +-0.82 1.00 -0.64 -0.28 0.90 -0.71 0.43 1.00 0.00 0.90 0.90 -1.00 +-0.80 1.00 -0.60 -0.20 0.95 -0.71 0.42 1.00 0.00 0.95 0.95 -1.00 +-0.78 1.00 -0.56 -0.12 0.98 -0.71 0.60 1.00 0.00 0.98 0.98 -1.00 +-0.76 1.00 -0.52 -0.04 1.00 -0.71 0.13 1.00 0.00 1.00 1.00 -1.00 +-0.74 1.00 -0.48 0.04 1.00 -0.43 0.04 1.00 0.00 1.00 1.00 -0.92 +-0.72 1.00 -0.44 0.12 0.98 -0.43 0.30 1.00 0.00 0.98 0.98 -0.76 +-0.70 1.00 -0.40 0.20 0.95 -0.43 0.84 1.00 0.00 0.95 0.95 -0.60 +-0.68 1.00 -0.36 0.28 0.90 -0.43 0.52 1.00 0.00 0.90 0.90 -0.44 +-0.66 1.00 -0.32 0.36 0.84 -0.43 0.25 1.00 0.00 0.84 0.84 -0.28 +-0.64 1.00 -0.28 0.44 0.77 -0.43 0.04 1.00 0.00 0.77 0.77 -0.12 +-0.62 1.00 -0.24 0.52 0.68 -0.14 0.38 1.00 0.00 0.68 0.68 0.04 +-0.60 1.00 -0.20 0.60 0.59 -0.14 0.46 1.00 0.00 0.59 0.59 0.20 +-0.58 1.00 -0.16 0.68 0.48 -0.14 0.66 1.00 0.00 0.48 0.48 0.36 +-0.56 1.00 -0.12 0.76 0.37 -0.14 0.55 1.00 0.00 0.37 0.37 0.52 +-0.54 1.00 -0.08 0.84 0.25 -0.14 0.84 1.00 0.00 0.25 0.25 0.68 +-0.52 1.00 -0.04 0.92 0.13 -0.14 0.66 1.00 0.00 0.13 0.13 0.84 +-0.50 1.00 0.00 1.00 0.00 -0.14 0.97 1.00 0.00 0.00 0.00 1.00 +-0.48 -1.00 0.04 0.92 -0.13 0.14 0.94 1.00 0.00 0.00 0.13 1.00 +-0.46 -1.00 0.08 0.84 -0.25 0.14 0.18 1.00 0.00 0.00 0.25 1.00 +-0.44 -1.00 0.12 0.76 -0.37 0.14 0.27 1.00 0.00 0.00 0.37 1.00 +-0.42 -1.00 0.16 0.68 -0.48 0.14 0.62 1.00 0.00 0.00 0.48 1.00 +-0.40 -1.00 0.20 0.60 -0.59 0.14 0.22 1.00 0.00 0.00 0.59 1.00 +-0.38 -1.00 0.24 0.52 -0.68 0.14 0.12 1.00 0.00 0.00 0.68 1.00 +-0.36 -1.00 0.28 0.44 -0.77 0.43 0.51 1.00 0.00 0.00 0.77 1.00 +-0.34 -1.00 0.32 0.36 -0.84 0.43 0.54 1.00 0.00 0.00 0.84 1.00 +-0.32 -1.00 0.36 0.28 -0.90 0.43 0.36 1.00 0.00 0.00 0.90 1.00 +-0.30 -1.00 0.40 0.20 -0.95 0.43 0.19 1.00 0.00 0.00 0.95 1.00 +-0.28 -1.00 0.44 0.12 -0.98 0.43 0.73 1.00 0.00 0.00 0.98 1.00 +-0.26 -1.00 0.48 0.04 -1.00 0.43 0.58 1.00 0.00 0.00 1.00 1.00 +-0.24 -1.00 0.52 -0.04 -1.00 0.71 0.74 1.00 0.00 0.00 1.00 0.92 +-0.22 -1.00 0.56 -0.12 -0.98 0.71 0.48 1.00 0.00 0.00 0.98 0.76 +-0.20 -1.00 0.60 -0.20 -0.95 0.71 0.37 1.00 0.00 0.00 0.95 0.60 +-0.18 -1.00 0.64 -0.28 -0.90 0.71 0.49 1.00 0.00 0.00 0.90 0.44 +-0.16 -1.00 0.68 -0.36 -0.84 0.71 0.99 1.00 0.00 0.00 0.84 0.28 +-0.14 -1.00 0.72 -0.44 -0.77 0.71 0.38 1.00 0.00 0.00 0.77 0.12 +-0.12 -1.00 0.76 -0.52 -0.68 1.00 0.16 1.00 0.00 0.00 0.68 -0.04 +-0.10 -1.00 0.80 -0.60 -0.59 1.00 0.20 1.00 0.00 0.00 0.59 -0.20 +-0.08 -1.00 0.84 -0.68 -0.48 1.00 0.36 1.00 0.00 0.00 0.48 -0.36 +-0.06 -1.00 0.88 -0.76 -0.37 1.00 0.93 1.00 0.00 0.00 0.37 -0.52 +-0.04 -1.00 0.92 -0.84 -0.25 1.00 0.31 1.00 0.00 0.00 0.25 -0.68 +-0.02 -1.00 0.96 -0.92 -0.13 1.00 0.71 1.00 0.00 0.00 0.13 -0.84 +0.00 1.00 -1.00 -1.00 0.00 -1.00 0.35 1.00 0.00 0.00 0.00 -1.00 +0.02 1.00 -0.96 -0.92 0.13 -1.00 0.58 1.00 0.00 0.13 0.13 -0.84 +0.04 1.00 -0.92 -0.84 0.25 -1.00 0.38 1.00 0.00 0.25 0.25 -0.68 +0.06 1.00 -0.88 -0.76 0.37 -1.00 0.45 1.00 0.00 0.37 0.37 -0.52 +0.08 1.00 -0.84 -0.68 0.48 -1.00 0.96 1.00 0.00 0.48 0.48 -0.36 +0.10 1.00 -0.80 -0.60 0.59 -1.00 0.00 1.00 0.00 0.59 0.59 -0.20 +0.12 1.00 -0.76 -0.52 0.68 -1.00 0.59 1.00 0.00 0.68 0.68 -0.04 +0.14 1.00 -0.72 -0.44 0.77 -0.71 0.09 1.00 0.00 0.77 0.77 0.12 +0.16 1.00 -0.68 -0.36 0.84 -0.71 0.93 1.00 0.00 0.84 0.84 0.28 +0.18 1.00 -0.64 -0.28 0.90 -0.71 0.17 1.00 0.00 0.90 0.90 0.44 +0.20 1.00 -0.60 -0.20 0.95 -0.71 0.32 1.00 0.00 0.95 0.95 0.60 +0.22 1.00 -0.56 -0.12 0.98 -0.71 0.18 1.00 0.00 0.98 0.98 0.76 +0.24 1.00 -0.52 -0.04 1.00 -0.71 0.87 1.00 0.00 1.00 1.00 0.92 +0.26 1.00 -0.48 0.04 1.00 -0.43 0.67 1.00 0.00 1.00 1.00 1.00 +0.28 1.00 -0.44 0.12 0.98 -0.43 0.22 1.00 0.00 0.98 0.98 1.00 +0.30 1.00 -0.40 0.20 0.95 -0.43 0.83 1.00 0.00 0.95 0.95 1.00 +0.32 1.00 -0.36 0.28 0.90 -0.43 0.65 1.00 0.00 0.90 0.90 1.00 +0.34 1.00 -0.32 0.36 0.84 -0.43 0.32 1.00 0.00 0.84 0.84 1.00 +0.36 1.00 -0.28 0.44 0.77 -0.43 0.30 1.00 0.00 0.77 0.77 1.00 +0.38 1.00 -0.24 0.52 0.68 -0.14 0.90 1.00 0.00 0.68 0.68 1.00 +0.40 1.00 -0.20 0.60 0.59 -0.14 0.86 1.00 0.00 0.59 0.59 1.00 +0.42 1.00 -0.16 0.68 0.48 -0.14 0.30 1.00 0.00 0.48 0.48 1.00 +0.44 1.00 -0.12 0.76 0.37 -0.14 0.68 1.00 0.00 0.37 0.37 1.00 +0.46 1.00 -0.08 0.84 0.25 -0.14 0.06 1.00 0.00 0.25 0.25 1.00 +0.48 1.00 -0.04 0.92 0.13 -0.14 0.27 1.00 0.00 0.13 0.13 1.00 +0.50 -1.00 0.00 1.00 -0.00 0.14 0.00 1.00 0.00 0.00 0.00 1.00 +0.52 -1.00 0.04 0.92 -0.13 0.14 0.62 1.00 0.00 0.00 0.13 0.84 +0.54 -1.00 0.08 0.84 -0.25 0.14 0.18 1.00 0.00 0.00 0.25 0.68 +0.56 -1.00 0.12 0.76 -0.37 0.14 0.13 1.00 0.00 0.00 0.37 0.52 +0.58 -1.00 0.16 0.68 -0.48 0.14 0.96 1.00 0.00 0.00 0.48 0.36 +0.60 -1.00 0.20 0.60 -0.59 0.14 0.83 1.00 0.00 0.00 0.59 0.20 +0.62 -1.00 0.24 0.52 -0.68 0.14 0.11 1.00 0.00 0.00 0.68 0.04 +0.64 -1.00 0.28 0.44 -0.77 0.43 0.56 1.00 0.00 0.00 0.77 -0.12 +0.66 -1.00 0.32 0.36 -0.84 0.43 0.44 1.00 0.00 0.00 0.84 -0.28 +0.68 -1.00 0.36 0.28 -0.90 0.43 0.05 1.00 0.00 0.00 0.90 -0.44 +0.70 -1.00 0.40 0.20 -0.95 0.43 0.35 1.00 0.00 0.00 0.95 -0.60 +0.72 -1.00 0.44 0.12 -0.98 0.43 0.82 1.00 0.00 0.00 0.98 -0.76 +0.74 -1.00 0.48 0.04 -1.00 0.43 0.71 1.00 0.00 0.00 1.00 -0.92 +0.76 -1.00 0.52 -0.04 -1.00 0.71 0.26 1.00 0.00 0.00 1.00 -1.00 +0.78 -1.00 0.56 -0.12 -0.98 0.71 0.79 1.00 0.00 0.00 0.98 -1.00 +0.80 -1.00 0.60 -0.20 -0.95 0.71 0.63 1.00 0.00 0.00 0.95 -1.00 +0.82 -1.00 0.64 -0.28 -0.90 0.71 0.54 1.00 0.00 0.00 0.90 -1.00 +0.84 -1.00 0.68 -0.36 -0.84 0.71 0.34 1.00 0.00 0.00 0.84 -1.00 +0.86 -1.00 0.72 -0.44 -0.77 0.71 0.59 1.00 0.00 0.00 0.77 -1.00 +0.88 -1.00 0.76 -0.52 -0.68 1.00 0.43 1.00 0.00 0.00 0.68 -1.00 +0.90 -1.00 0.80 -0.60 -0.59 1.00 0.24 1.00 0.00 0.00 0.59 -1.00 +0.92 -1.00 0.84 -0.68 -0.48 1.00 0.94 1.00 0.00 0.00 0.48 -1.00 +0.94 -1.00 0.88 -0.76 -0.37 1.00 0.54 1.00 0.00 0.00 0.37 -1.00 +0.96 -1.00 0.92 -0.84 -0.25 1.00 0.77 1.00 0.00 0.00 0.25 -1.00 +0.98 -1.00 0.96 -0.92 -0.13 1.00 0.43 1.00 0.00 0.00 0.13 -1.00 +1.00 1.00 -1.00 -1.00 0.00 -1.00 0.16 1.00 0.00 0.00 0.00 -1.00 +1.02 1.00 -0.96 -0.92 0.13 -1.00 0.44 1.00 0.00 0.13 0.13 -0.84 +1.04 1.00 -0.92 -0.84 0.25 -1.00 0.76 1.00 0.00 0.25 0.25 -0.68 +1.06 1.00 -0.88 -0.76 0.37 -1.00 0.54 1.00 0.00 0.37 0.37 -0.52 +1.08 1.00 -0.84 -0.68 0.48 -1.00 0.52 1.00 0.00 0.48 0.48 -0.36 +1.10 1.00 -0.80 -0.60 0.59 -1.00 0.56 1.00 0.00 0.59 0.59 -0.20 +1.12 1.00 -0.76 -0.52 0.68 -1.00 0.25 1.00 0.00 0.68 0.68 -0.04 +1.14 1.00 -0.72 -0.44 0.77 -0.71 0.80 1.00 0.00 0.77 0.77 0.12 +1.16 1.00 -0.68 -0.36 0.84 -0.71 0.02 1.00 0.00 0.84 0.84 0.28 +1.18 1.00 -0.64 -0.28 0.90 -0.71 0.85 1.00 0.00 0.90 0.90 0.44 +1.20 1.00 -0.60 -0.20 0.95 -0.71 0.13 1.00 0.00 0.95 0.95 0.60 +1.22 1.00 -0.56 -0.12 0.98 -0.71 0.05 1.00 0.00 0.98 0.98 0.76 +1.24 1.00 -0.52 -0.04 1.00 -0.71 0.93 1.00 0.00 1.00 1.00 0.92 +1.26 1.00 -0.48 0.04 1.00 -0.43 0.97 1.00 0.00 1.00 1.00 1.00 +1.28 1.00 -0.44 0.12 0.98 -0.43 0.34 1.00 0.00 0.98 0.98 1.00 +1.30 1.00 -0.40 0.20 0.95 -0.43 0.57 1.00 0.00 0.95 0.95 1.00 +1.32 1.00 -0.36 0.28 0.90 -0.43 0.60 1.00 0.00 0.90 0.90 1.00 +1.34 1.00 -0.32 0.36 0.84 -0.43 0.91 1.00 0.00 0.84 0.84 1.00 +1.36 1.00 -0.28 0.44 0.77 -0.43 0.96 1.00 0.00 0.77 0.77 1.00 +1.38 1.00 -0.24 0.52 0.68 -0.14 0.25 1.00 0.00 0.68 0.68 1.00 +1.40 1.00 -0.20 0.60 0.59 -0.14 0.56 1.00 0.00 0.59 0.59 1.00 +1.42 1.00 -0.16 0.68 0.48 -0.14 0.06 1.00 0.00 0.48 0.48 1.00 +1.44 1.00 -0.12 0.76 0.37 -0.14 0.75 1.00 0.00 0.37 0.37 1.00 +1.46 1.00 -0.08 0.84 0.25 -0.14 0.14 1.00 0.00 0.25 0.25 1.00 +1.48 1.00 -0.04 0.92 0.13 -0.14 0.92 1.00 0.00 0.13 0.13 1.00 +1.50 -1.00 0.00 1.00 -0.00 0.14 0.35 1.00 0.00 0.00 0.00 1.00 +1.52 -1.00 0.04 0.92 -0.13 0.14 0.32 1.00 0.00 0.00 0.13 0.84 +1.54 -1.00 0.08 0.84 -0.25 0.14 0.50 1.00 0.00 0.00 0.25 0.68 +1.56 -1.00 0.12 0.76 -0.37 0.14 0.97 1.00 0.00 0.00 0.37 0.52 +1.58 -1.00 0.16 0.68 -0.48 0.14 0.28 1.00 0.00 0.00 0.48 0.36 +1.60 -1.00 0.20 0.60 -0.59 0.14 0.43 1.00 0.00 0.00 0.59 0.20 +1.62 -1.00 0.24 0.52 -0.68 0.14 0.42 1.00 0.00 0.00 0.68 0.04 +1.64 -1.00 0.28 0.44 -0.77 0.43 0.87 1.00 0.00 0.00 0.77 -0.12 +1.66 -1.00 0.32 0.36 -0.84 0.43 0.20 1.00 0.00 0.00 0.84 -0.28 +1.68 -1.00 0.36 0.28 -0.90 0.43 0.51 1.00 0.00 0.00 0.90 -0.44 +1.70 -1.00 0.40 0.20 -0.95 0.43 0.34 1.00 0.00 0.00 0.95 -0.60 +1.72 -1.00 0.44 0.12 -0.98 0.43 0.26 1.00 0.00 0.00 0.98 -0.76 +1.74 -1.00 0.48 0.04 -1.00 0.43 0.04 1.00 0.00 0.00 1.00 -0.92 +1.76 -1.00 0.52 -0.04 -1.00 0.71 0.04 1.00 0.00 0.00 1.00 -1.00 +1.78 -1.00 0.56 -0.12 -0.98 0.71 0.60 1.00 0.00 0.00 0.98 -1.00 +1.80 -1.00 0.60 -0.20 -0.95 0.71 0.82 1.00 0.00 0.00 0.95 -1.00 +1.82 -1.00 0.64 -0.28 -0.90 0.71 0.23 1.00 0.00 0.00 0.90 -1.00 +1.84 -1.00 0.68 -0.36 -0.84 0.71 0.93 1.00 0.00 0.00 0.84 -1.00 +1.86 -1.00 0.72 -0.44 -0.77 0.71 0.31 1.00 0.00 0.00 0.77 -1.00 +1.88 -1.00 0.76 -0.52 -0.68 1.00 0.50 1.00 0.00 0.00 0.68 -1.00 +1.90 -1.00 0.80 -0.60 -0.59 1.00 0.08 1.00 0.00 0.00 0.59 -1.00 +1.92 -1.00 0.84 -0.68 -0.48 1.00 0.47 1.00 0.00 0.00 0.48 -1.00 +1.94 -1.00 0.88 -0.76 -0.37 1.00 0.30 1.00 0.00 0.00 0.37 -1.00 +1.96 -1.00 0.92 -0.84 -0.25 1.00 0.63 1.00 0.00 0.00 0.25 -1.00 +1.98 -1.00 0.96 -0.92 -0.13 1.00 0.59 1.00 0.00 0.00 0.13 -1.00 +2.00 1.00 -1.00 -1.00 0.00 -1.00 0.36 1.00 0.00 0.00 0.00 -1.00 +2.02 1.00 -0.96 -0.92 0.13 -1.00 0.53 1.00 0.00 0.13 0.13 -0.84 +2.04 1.00 -0.92 -0.84 0.25 -1.00 0.87 1.00 0.00 0.25 0.25 -0.68 +2.06 1.00 -0.88 -0.76 0.37 -1.00 0.18 1.00 0.00 0.37 0.37 -0.52 +2.08 1.00 -0.84 -0.68 0.48 -1.00 0.24 1.00 0.00 0.48 0.48 -0.36 +2.10 1.00 -0.80 -0.60 0.59 -1.00 0.27 1.00 0.00 0.59 0.59 -0.20 +2.12 1.00 -0.76 -0.52 0.68 -1.00 0.31 1.00 0.00 0.68 0.68 -0.04 +2.14 1.00 -0.72 -0.44 0.77 -0.71 0.06 1.00 0.00 0.77 0.77 0.12 +2.16 1.00 -0.68 -0.36 0.84 -0.71 0.64 1.00 0.00 0.84 0.84 0.28 +2.18 1.00 -0.64 -0.28 0.90 -0.71 0.30 1.00 0.00 0.90 0.90 0.44 +2.20 1.00 -0.60 -0.20 0.95 -0.71 0.75 1.00 0.00 0.95 0.95 0.60 +2.22 1.00 -0.56 -0.12 0.98 -0.71 0.87 1.00 0.00 0.98 0.98 0.76 +2.24 1.00 -0.52 -0.04 1.00 -0.71 0.96 1.00 0.00 1.00 1.00 0.92 +2.26 1.00 -0.48 0.04 1.00 -0.43 0.48 1.00 0.00 1.00 1.00 1.00 +2.28 1.00 -0.44 0.12 0.98 -0.43 0.54 1.00 0.00 0.98 0.98 1.00 +2.30 1.00 -0.40 0.20 0.95 -0.43 0.20 1.00 0.00 0.95 0.95 1.00 +2.32 1.00 -0.36 0.28 0.90 -0.43 0.64 1.00 0.00 0.90 0.90 1.00 +2.34 1.00 -0.32 0.36 0.84 -0.43 0.72 1.00 0.00 0.84 0.84 1.00 +2.36 1.00 -0.28 0.44 0.77 -0.43 0.07 1.00 0.00 0.77 0.77 1.00 +2.38 1.00 -0.24 0.52 0.68 -0.14 0.38 1.00 0.00 0.68 0.68 1.00 +2.40 1.00 -0.20 0.60 0.59 -0.14 0.51 1.00 0.00 0.59 0.59 1.00 +2.42 1.00 -0.16 0.68 0.48 -0.14 0.47 1.00 0.00 0.48 0.48 1.00 +2.44 1.00 -0.12 0.76 0.37 -0.14 0.93 1.00 0.00 0.37 0.37 1.00 +2.46 1.00 -0.08 0.84 0.25 -0.14 0.13 1.00 0.00 0.25 0.25 1.00 +2.48 1.00 -0.04 0.92 0.13 -0.14 0.80 1.00 0.00 0.13 0.13 1.00 +2.50 -1.00 0.00 1.00 -0.00 0.14 0.10 1.00 0.00 0.00 0.00 1.00 +2.52 -1.00 0.04 0.92 -0.13 0.14 0.61 1.00 0.00 0.00 0.13 0.84 +2.54 -1.00 0.08 0.84 -0.25 0.14 0.26 1.00 0.00 0.00 0.25 0.68 +2.56 -1.00 0.12 0.76 -0.37 0.14 0.40 1.00 0.00 0.00 0.37 0.52 +2.58 -1.00 0.16 0.68 -0.48 0.14 0.90 1.00 0.00 0.00 0.48 0.36 +2.60 -1.00 0.20 0.60 -0.59 0.14 0.77 1.00 0.00 0.00 0.59 0.20 +2.62 -1.00 0.24 0.52 -0.68 0.14 0.20 1.00 0.00 0.00 0.68 0.04 +2.64 -1.00 0.28 0.44 -0.77 0.43 0.54 1.00 0.00 0.00 0.77 -0.12 +2.66 -1.00 0.32 0.36 -0.84 0.43 0.88 1.00 0.00 0.00 0.84 -0.28 +2.68 -1.00 0.36 0.28 -0.90 0.43 1.00 1.00 0.00 0.00 0.90 -0.44 +2.70 -1.00 0.40 0.20 -0.95 0.43 0.38 1.00 0.00 0.00 0.95 -0.60 +2.72 -1.00 0.44 0.12 -0.98 0.43 0.82 1.00 0.00 0.00 0.98 -0.76 +2.74 -1.00 0.48 0.04 -1.00 0.43 0.92 1.00 0.00 0.00 1.00 -0.92 +2.76 -1.00 0.52 -0.04 -1.00 0.71 0.88 1.00 0.00 0.00 1.00 -1.00 +2.78 -1.00 0.56 -0.12 -0.98 0.71 0.90 1.00 0.00 0.00 0.98 -1.00 +2.80 -1.00 0.60 -0.20 -0.95 0.71 0.48 1.00 0.00 0.00 0.95 -1.00 +2.82 -1.00 0.64 -0.28 -0.90 0.71 0.57 1.00 0.00 0.00 0.90 -1.00 +2.84 -1.00 0.68 -0.36 -0.84 0.71 0.60 1.00 0.00 0.00 0.84 -1.00 +2.86 -1.00 0.72 -0.44 -0.77 0.71 0.49 1.00 0.00 0.00 0.77 -1.00 +2.88 -1.00 0.76 -0.52 -0.68 1.00 0.60 1.00 0.00 0.00 0.68 -1.00 +2.90 -1.00 0.80 -0.60 -0.59 1.00 0.79 1.00 0.00 0.00 0.59 -1.00 +2.92 -1.00 0.84 -0.68 -0.48 1.00 0.35 1.00 0.00 0.00 0.48 -1.00 +2.94 -1.00 0.88 -0.76 -0.37 1.00 0.39 1.00 0.00 0.00 0.37 -1.00 +2.96 -1.00 0.92 -0.84 -0.25 1.00 0.85 1.00 0.00 0.00 0.25 -1.00 +2.98 -1.00 0.96 -0.92 -0.13 1.00 0.84 1.00 0.00 0.00 0.13 -1.00 +3.00 1.00 -1.00 -1.00 0.00 -1.00 0.30 1.00 0.00 0.00 0.00 -1.00 +3.02 1.00 -0.96 -0.92 0.13 -1.00 0.76 1.00 0.00 0.13 0.13 -0.84 +3.04 1.00 -0.92 -0.84 0.25 -1.00 0.07 1.00 0.00 0.25 0.25 -0.68 +3.06 1.00 -0.88 -0.76 0.37 -1.00 0.09 1.00 0.00 0.37 0.37 -0.52 +3.08 1.00 -0.84 -0.68 0.48 -1.00 0.22 1.00 0.00 0.48 0.48 -0.36 +3.10 1.00 -0.80 -0.60 0.59 -1.00 0.86 1.00 0.00 0.59 0.59 -0.20 +3.12 1.00 -0.76 -0.52 0.68 -1.00 0.04 1.00 0.00 0.68 0.68 -0.04 +3.14 1.00 -0.72 -0.44 0.77 -0.71 0.80 1.00 0.00 0.77 0.77 0.12 +3.16 1.00 -0.68 -0.36 0.84 -0.71 0.83 1.00 0.00 0.84 0.84 0.28 +3.18 1.00 -0.64 -0.28 0.90 -0.71 0.23 1.00 0.00 0.90 0.90 0.44 +3.20 1.00 -0.60 -0.20 0.95 -0.71 0.49 1.00 0.00 0.95 0.95 0.60 +3.22 1.00 -0.56 -0.12 0.98 -0.71 0.77 1.00 0.00 0.98 0.98 0.76 +3.24 1.00 -0.52 -0.04 1.00 -0.71 0.78 1.00 0.00 1.00 1.00 0.92 +3.26 1.00 -0.48 0.04 1.00 -0.43 0.35 1.00 0.00 1.00 1.00 1.00 +3.28 1.00 -0.44 0.12 0.98 -0.43 0.99 1.00 0.00 0.98 0.98 1.00 +3.30 1.00 -0.40 0.20 0.95 -0.43 0.14 1.00 0.00 0.95 0.95 1.00 +3.32 1.00 -0.36 0.28 0.90 -0.43 0.05 1.00 0.00 0.90 0.90 1.00 +3.34 1.00 -0.32 0.36 0.84 -0.43 0.70 1.00 0.00 0.84 0.84 1.00 +3.36 1.00 -0.28 0.44 0.77 -0.43 0.82 1.00 0.00 0.77 0.77 1.00 +3.38 1.00 -0.24 0.52 0.68 -0.14 0.62 1.00 0.00 0.68 0.68 1.00 +3.40 1.00 -0.20 0.60 0.59 -0.14 0.01 1.00 0.00 0.59 0.59 1.00 +3.42 1.00 -0.16 0.68 0.48 -0.14 0.69 1.00 0.00 0.48 0.48 1.00 +3.44 1.00 -0.12 0.76 0.37 -0.14 0.19 1.00 0.00 0.37 0.37 1.00 +3.46 1.00 -0.08 0.84 0.25 -0.14 0.39 1.00 0.00 0.25 0.25 1.00 +3.48 1.00 -0.04 0.92 0.13 -0.14 0.39 1.00 0.00 0.13 0.13 1.00 +3.50 -1.00 0.00 1.00 -0.00 0.14 0.46 1.00 0.00 0.00 0.00 1.00 +3.52 -1.00 0.04 0.92 -0.13 0.14 0.75 1.00 0.00 0.00 0.13 0.84 +3.54 -1.00 0.08 0.84 -0.25 0.14 0.21 1.00 0.00 0.00 0.25 0.68 +3.56 -1.00 0.12 0.76 -0.37 0.14 0.85 1.00 0.00 0.00 0.37 0.52 +3.58 -1.00 0.16 0.68 -0.48 0.14 0.92 1.00 0.00 0.00 0.48 0.36 +3.60 -1.00 0.20 0.60 -0.59 0.14 0.78 1.00 0.00 0.00 0.59 0.20 +3.62 -1.00 0.24 0.52 -0.68 0.14 0.41 1.00 0.00 0.00 0.68 0.04 +3.64 -1.00 0.28 0.44 -0.77 0.43 0.90 1.00 0.00 0.00 0.77 -0.12 +3.66 -1.00 0.32 0.36 -0.84 0.43 0.71 1.00 0.00 0.00 0.84 -0.28 +3.68 -1.00 0.36 0.28 -0.90 0.43 0.94 1.00 0.00 0.00 0.90 -0.44 +3.70 -1.00 0.40 0.20 -0.95 0.43 0.92 1.00 0.00 0.00 0.95 -0.60 +3.72 -1.00 0.44 0.12 -0.98 0.43 0.91 1.00 0.00 0.00 0.98 -0.76 +3.74 -1.00 0.48 0.04 -1.00 0.43 0.79 1.00 0.00 0.00 1.00 -0.92 +3.76 -1.00 0.52 -0.04 -1.00 0.71 0.64 1.00 0.00 0.00 1.00 -1.00 +3.78 -1.00 0.56 -0.12 -0.98 0.71 0.08 1.00 0.00 0.00 0.98 -1.00 +3.80 -1.00 0.60 -0.20 -0.95 0.71 0.49 1.00 0.00 0.00 0.95 -1.00 +3.82 -1.00 0.64 -0.28 -0.90 0.71 0.50 1.00 0.00 0.00 0.90 -1.00 +3.84 -1.00 0.68 -0.36 -0.84 0.71 0.86 1.00 0.00 0.00 0.84 -1.00 +3.86 -1.00 0.72 -0.44 -0.77 0.71 0.61 1.00 0.00 0.00 0.77 -1.00 +3.88 -1.00 0.76 -0.52 -0.68 1.00 0.42 1.00 0.00 0.00 0.68 -1.00 +3.90 -1.00 0.80 -0.60 -0.59 1.00 0.25 1.00 0.00 0.00 0.59 -1.00 +3.92 -1.00 0.84 -0.68 -0.48 1.00 0.06 1.00 0.00 0.00 0.48 -1.00 +3.94 -1.00 0.88 -0.76 -0.37 1.00 0.97 1.00 0.00 0.00 0.37 -1.00 +3.96 -1.00 0.92 -0.84 -0.25 1.00 0.81 1.00 0.00 0.00 0.25 -1.00 +3.98 -1.00 0.96 -0.92 -0.13 1.00 0.57 1.00 0.00 0.00 0.13 -1.00 + +done... diff --git a/libraries/FunctionGenerator/examples/functionGeneratorPlotter/functionGeneratorPlotter.ino b/libraries/FunctionGenerator/examples/functionGeneratorPlotter/functionGeneratorPlotter.ino index 3733618e..3bf50dcc 100644 --- a/libraries/FunctionGenerator/examples/functionGeneratorPlotter/functionGeneratorPlotter.ino +++ b/libraries/FunctionGenerator/examples/functionGeneratorPlotter/functionGeneratorPlotter.ino @@ -11,17 +11,26 @@ #include "functionGenerator.h" funcgen gen; +funcgen gen2; void setup() { Serial.begin(115200); - // Serial.print("Start functionGeneratorPerformance - LIB VERSION: "); + // Serial.println(__FILE__); + // Serial.print("FUNCTIONGENERATOR_LIB_VERSION: "); // Serial.println(FUNCTIONGENERATOR_LIB_VERSION); + // Serial.println(); - gen.setAmplitude(50); - gen.setFrequency(1); - gen.setDutyCycle(25); + gen.setAmplitude(80); + gen.setFrequency(65.0 / 60.0); // HB = BPM/60.0 + gen.setDutyCycle(40); + gen2.setYShift(+20); + + gen2.setAmplitude(80); + gen2.setFrequency(120.0 / 60.0); // HB = BPM/60.0 + gen2.setDutyCycle(80); + gen2.setYShift(-80); } @@ -34,20 +43,34 @@ void loop() // Serial.print(t, 3); // Serial.print("\t"); - Serial.print(80); + Serial.print(100); Serial.print("\t"); - Serial.print(-80); - Serial.print("\t"); - Serial.print(gen.square(t)); + Serial.print(-100); Serial.print("\t"); + // Serial.print(gen.square(t)); + // Serial.print("\t"); // Serial.print(gen.sawtooth(t, 0)); // up /| signal // Serial.print("\t"); // Serial.print(gen.sawtooth(t, 1)); // down |\ signal // Serial.print("\t"); - Serial.print(gen.triangle(t)); + // Serial.print(gen.triangle(t)); // Serial.print("\t"); // Serial.print(gen.sinus(t)); // Serial.print("\t"); + // Serial.print(gen.sinusDiode(t)); + // Serial.print("\t"); + // Serial.print(gen.sinusRectified(t)); + // Serial.print("\t"); + // Serial.print(gen.trapezium1(t)); + // Serial.print("\t"); + // Serial.print(gen.trapezium2(t)); + // Serial.print("\t"); + Serial.print(gen.heartBeat(t)); + Serial.print("\t"); + Serial.print(gen2.heartBeat(t)); + // Serial.print("\t"); + // Serial.print(gen.freeWave(t, array)); + // Serial.print("\t"); // Serial.print(gen.stair(t, 16, 0)); // step up // Serial.print("\t"); // Serial.print(gen.stair(t, 16, 1)); // step down diff --git a/libraries/FunctionGenerator/examples/generateFreeWave/generateFreeWave.ino b/libraries/FunctionGenerator/examples/generateFreeWave/generateFreeWave.ino new file mode 100644 index 00000000..6bdb4bcb --- /dev/null +++ b/libraries/FunctionGenerator/examples/generateFreeWave/generateFreeWave.ino @@ -0,0 +1,36 @@ +// +// FILE: generatorFreeWave.ino +// AUTHOR: Rob Tillaart +// PURPOSE: demo function generators +// URL: https://github.com/RobTillaart/FunctionGenerator + + +void setup() +{ + Serial.begin(115200); + Serial.println(__FILE__); + Serial.println(); + Serial.println(); + + Serial.println("int16_t arr[101] =\n{"); + for (int i = 0; i < 101; i++) + { + // sin(t) + 0.25*sin(5t) + float f = sin(i * 0.01 * 2 * PI); + float g = sin(i * 0.05 * 2 * PI); + int16_t v = 8000 * (f + 0.25 * g); + Serial.print(""); + Serial.print(v); + Serial.print(","); + if (i > 0 and i % 5 == 0) Serial.println(); + } + Serial.println("};"); +} + + +void loop() +{ +} + + +// -- END OF FILE -- diff --git a/libraries/FunctionGenerator/functionGenerator.cpp b/libraries/FunctionGenerator/functionGenerator.cpp index c5abc468..72108478 100644 --- a/libraries/FunctionGenerator/functionGenerator.cpp +++ b/libraries/FunctionGenerator/functionGenerator.cpp @@ -1,7 +1,7 @@ // // FILE: functionGenerator.cpp // AUTHOR: Rob Tillaart -// VERSION: 0.2.6 +// VERSION: 0.3.0 // PURPOSE: wave form generating functions (use with care) // URL: https://github.com/RobTillaart/FunctionGenerator @@ -240,7 +240,199 @@ float funcgen::random_DC() } +///////////////////////////////////////////////////////////// +// +// EXPERIMENTAL 0.2.7 +// +float funcgen::sinusDiode(float t) +{ + float rv = sinus(t); + if (rv < _yShift) return _yShift; + return rv; + // float rv; + // t += _phase; + // rv = sin(t * _freq0); + // if (rv < 0) return _yShift; + // rv *= amplitude; + // rv += _yShift; + // return rv; +} + + +float funcgen::sinusRectified(float t) +{ + // float rv = sinus(t); + // if (rv < _yShift) return _yShift - rv; + // return rv; + + float rv; + t += _phase; + rv = _amplitude * sin(t * _freq0); + if (rv < 0) rv = -rv; + rv += _yShift; + return rv; +} + + +float funcgen::trapezium1(float t) +{ + t += _phase + _period * _dutyCycle / 4; // zero point for t = 0 + if (t < 0) + { + t = -t; + } + t = fmod(t, _period); + + if (t < _period * 0.5 * _dutyCycle) // rising part + { + return _yShift + -_amplitude + 2 * _amplitude * (t * 2 / (_period * _dutyCycle)); + } + else if (t < _period * 0.5) // high part + { + return _yShift + _amplitude; + } + else if (t < _period * (0.5 + 0.5 * _dutyCycle)) // falling part + { + return _yShift + _amplitude - 2 * _amplitude * ( (t * 2 - _period) / (_period * _dutyCycle)); + } + else // low part + { + return _yShift + -_amplitude; + } +} + + +float funcgen::trapezium2(float t) +{ + t += _phase + _period * _dutyCycle / 4; // zero point for t = 0 + if (t < 0) + { + t = -t; + } + t = fmod(t, _period); + + if (t < _period * 0.25) // rising part + { + return _yShift + -_amplitude + 2 * _amplitude * (t * 4 / _period); + } + else if (t < _period * (0.25 + 0.5 * _dutyCycle)) // high part + { + return _yShift + _amplitude; + } + else if (t < _period * (0.5 + 0.5 * _dutyCycle)) // falling part + { + return _yShift + _amplitude - 2 * _amplitude * ((t - _period * (0.25 + 0.5 * _dutyCycle)) * 4 / _period); + } + else // low part + { + return _yShift + -_amplitude; + } +} + + +/* +// no DC version (50% +float funcgen::trapezium(float t) +{ + t += _phase; + if (t < 0) + { + t = -t; + } + t = fmod(t, _period); + + if (t < _period * 0.25) // rising part + { + return -_amplitude + 2 * _amplitude * (t * 4 / _period); + } + else if (t < _period * 0.5) // high part + { + return _amplitude; + } + else if (t < _period * 0.75) // high part + { + return _amplitude - 2 * _amplitude * ((t - _period/2) * 4 / _period); + } + else // low part + { + return -_amplitude; + } +} +*/ + + +// +// EXPERIMENTAL HEARTBEAT +// => setFrequency(72.0 / 60.0); // BPM/60 = BPS. +float funcgen::heartBeat(float t) +{ + int16_t out[32] = { + 0, 0, 1000, 2500, + 1000, 1000, -50, 10000, + -2500, 2000, 2500, 3000, + 3000, 2000, 0, 0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + 0,0,0,0, + }; + // use duty cycle to determine zero level duration. + int pts = map(_dutyCycle * 100, 0, 100, 31, 15); + + return freeWave(t, out, pts); +} + + +/* +// points need to be optimized, +// 0.2.7 uses 160 bytes for the two arrays. +// wrapper around freeWave? +float funcgen::heartBeat(float t) +{ + // based upon MultiMap in[] array is normalized to 0.0 - 1.0 + // Heart beat phase P Q R S T U + float in[21] = { 0.0, 0.07, 0.13, 0.20, 0.27, 0.33, 0.40, 0.46, 0.53, 0.60, 0.66, 0.73, 0.80, 0.86, 0.93, 1.00 }; + float out[21] = { 0.0, 0.00, 0.10, 0.25, 0.10, 0.10, -0.05, 1.00, -0.25, 0.20, 0.25, 0.30, 0.30, 0.20, 0.00, 0.00 }; + + t += _phase; + t = fmod(t, _period); + + // normalize t to 0.0 - 1.0 + t *= _freq1; + // search interval + int idx = 0; + while (t > in[idx]) idx++; + if (t == in[idx]) return _yShift + _amplitude * out[idx]; + idx--; + // interpolate. + float factor = (t - in[idx]) / (in[idx+1] - in[idx]); + return _yShift + _amplitude * (out[idx] + factor * (out[idx+1] - out[idx])); +} +*/ + + +float funcgen::freeWave(float t, int16_t * arr, int16_t size) +{ + t += _phase; + // normalize t to 0.0 - 1.0 + t = fmod(t, _period); + t *= _freq1; + + // search interval, as arr is based upon N equidistant points, + // we can easily calculate the points for direct access + float factor = t * size; + int idx = factor; // truncate to get index of output array. + factor = factor - idx; // remainder is interpolate factor. + // interpolate. + return _yShift + _amplitude * 1e-4 * (arr[idx] + factor * (arr[idx+1] - arr[idx])); +} + + +///////////////////////////////////////////////////////////// +// +// PRIVATE +// // An example of a simple pseudo-random number generator is the // Multiply-with-carry method invented by George Marsaglia. // two initializers (not null) @@ -252,6 +444,7 @@ uint32_t funcgen::_random() } + ///////////////////////////////////////////////////////////// // // INTEGER VERSIONS FOR 8 BIT DAC @@ -356,6 +549,7 @@ float fgstr(float t, float period = 1.0, uint16_t steps = 8) // // FULL floatS ONES // +// SAWTOOTH float fgsaw(float t, float period = 1.0, float amplitude = 1.0, float phase = 0.0, float yShift = 0.0) { t += phase; @@ -370,6 +564,7 @@ float fgsaw(float t, float period = 1.0, float amplitude = 1.0, float phase = 0. } +// TRIANGLE float fgtri(float t, float period = 1.0, float amplitude = 1.0, float phase = 0.0, float yShift = 0.0, float dutyCycle = 0.50) { t += phase; @@ -384,6 +579,7 @@ float fgtri(float t, float period = 1.0, float amplitude = 1.0, float phase = 0. } +// SQUARE float fgsqr(float t, float period = 1.0, float amplitude = 1.0, float phase = 0.0, float yShift = 0.0, float dutyCycle = 0.50) { t += phase; @@ -400,6 +596,7 @@ float fgsqr(float t, float period = 1.0, float amplitude = 1.0, float phase = 0. } +// SINUS float fgsin(float t, float period = 1.0, float amplitude = 1.0, float phase = 0.0, float yShift = 0.0) { t += phase; @@ -408,6 +605,7 @@ float fgsin(float t, float period = 1.0, float amplitude = 1.0, float phase = 0. } +// STAIR float fgstr(float t, float period = 1.0, float amplitude = 1.0, float phase = 0.0, float yShift = 0.0, uint16_t steps = 8) { t += phase; diff --git a/libraries/FunctionGenerator/keywords.txt b/libraries/FunctionGenerator/keywords.txt index 9ce81e8e..12a99780 100644 --- a/libraries/FunctionGenerator/keywords.txt +++ b/libraries/FunctionGenerator/keywords.txt @@ -27,8 +27,17 @@ zero KEYWORD2 sawtooth KEYWORD2 triangle KEYWORD2 square KEYWORD2 + sinus KEYWORD2 +sinusDiode KEYWORD2 +sinusRectified KEYWORD2 + stair KEYWORD2 +trapezium1 KEYWORD2 +trapezium2 KEYWORD2 + +heartBeat KEYWORD2 +freeWave KEYWORD2 random KEYWORD2 random_DC KEYWORD2 diff --git a/libraries/FunctionGenerator/library.json b/libraries/FunctionGenerator/library.json index bdf46260..584cc6e7 100644 --- a/libraries/FunctionGenerator/library.json +++ b/libraries/FunctionGenerator/library.json @@ -15,7 +15,7 @@ "type": "git", "url": "https://github.com/RobTillaart/FunctionGenerator" }, - "version": "0.2.6", + "version": "0.3.0", "license": "MIT", "frameworks": "*", "platforms": "*", diff --git a/libraries/FunctionGenerator/library.properties b/libraries/FunctionGenerator/library.properties index ceb765bd..0ff4034a 100644 --- a/libraries/FunctionGenerator/library.properties +++ b/libraries/FunctionGenerator/library.properties @@ -1,5 +1,5 @@ name=FunctionGenerator -version=0.2.6 +version=0.3.0 author=Rob Tillaart maintainer=Rob Tillaart sentence=Arduino library to generate wave forms (nummeric) for a DAC diff --git a/libraries/FunctionGenerator/readme.md b/libraries/FunctionGenerator/readme.md index e6870ce1..6c109fe9 100644 --- a/libraries/FunctionGenerator/readme.md +++ b/libraries/FunctionGenerator/readme.md @@ -27,10 +27,15 @@ In practice the generator is useful for low frequencies, Note: this class generates float values, performance wise this can be optimized, to achieve higher speeds at cost of accuracy / precision. +As always, feedback and ideas are welcome. -#### Performance -Indication of what performance can be expected (based upon 0.2.1 version). +### Performance + +You always have to verify your own performance measurements to see if +your requirements are met by this library. + +**Indication** of what performance can be expected (based upon 0.2.1 version). Note that the values need to be transported to a DAC or serial port too. Numbers based on performance example, for one single signal. @@ -72,14 +77,24 @@ have become slightly slower. | Arduino UNO | 16 MHz | square | 57 | 1000 Hz | | Arduino UNO | 16 MHz | random_DC | 68 | 500 Hz | +See **functionGeneratorPerformance.ino** -#### Accuracy + +### Accuracy If the time parameter **t** grows large, the internal math may have rounding problems after some time. This can and will affect the quality of the output. +It is advised to reset **t** after a number (e.g. 100) full periods Needs further investigations. +### Related + +- https://github.com/RobTillaart/AD9833 hardware waveform generator. +- https://github.com/RobTillaart/AD985X hardware waveform generator. +- https://github.com/RobTillaart/functionGenerator software waveform generator. +- https://pages.mtu.edu/~suits/notefreqs.html frequency table for notes. + ## Interface @@ -87,40 +102,42 @@ Needs further investigations. #include "functionGenerator.h" ``` -#### Constructor +### Constructor - **funcgen(float period = 1.0, float amplitude = 1.0, float phase = 0.0, float yShift = 0.0)** All parameters (except duty cycle) can be set in the constructor but also later in configuration. Default dutyCycle is 50%. -#### Configuration +### Configuration -- **void setPeriod(float period = 1.0)** set the period of the wave in seconds. +- **void setPeriod(float period = 1.0)** set the period of the wave in seconds. +This is the inverse of the frequency. - **float getPeriod()** returns the set period. -- **void setFrequency(float frequency = 1.0)** set the frequency of the wave in Hertz (1/s). +- **void setFrequency(float frequency = 1.0)** set the frequency of the wave in Hertz (1/s). +This is the inverse of the period. - **float getFrequency()** returns the set frequency in Hertz. -- **void setAmplitude(float amplitude = 1.0)** sets the amplitude of the wave. +- **void setAmplitude(float amplitude = 1.0)** sets the amplitude of the wave. The range is from **-amplitude** to **+amplitude**. Setting the amplitude to 0 gives effectively a zero signal. Setting the amplitude to a negative value effectively inverts the signal. - **float getAmplitude()** returns the set amplitude. -- **void setPhase(float phase = 0.0)** shifts the phase of the wave. +- **void setPhase(float phase = 0.0)** shifts the phase of the wave. Will only be noticeable when compared with other waves. Phase is also known as the X- or horizontal shift. - **float getPhase()** returns the set phase. -- **void setYShift(float yShift = 0.0)** sets an Y-shift or vertical offset in amplitude. +- **void setYShift(float yShift = 0.0)** sets an Y-shift or vertical offset in amplitude. This allows to set e.g. the zero level. - **float getYShift()** returns the set Y-shift. -- **void setDutyCycle(float percentage = 100)** sets the duty cycle of the signal. +- **void setDutyCycle(float percentage = 100)** sets the duty cycle of the signal. Experimental, not all waveforms have a duty cycle or interpret it differently, see below. Duty cycle must be between 0 and 100% and will be clipped otherwise. -- **float getDutyCycle()** returns the set duty cycle. -- **void setRandomSeed(uint32_t a, uint32_t b = 314159265)** sets the initial seeds for the +- **float getDutyCycle()** returns the set (clipped) duty cycle. +- **void setRandomSeed(uint32_t a, uint32_t b = 314159265)** sets the initial seeds for the (Marsaglia) random number generator. The first is mandatory, the second is optional. -#### Wave forms +### Wave forms The variable t == time in seconds. @@ -129,11 +146,12 @@ The variable t == time in seconds. - mode == 1 ==> sawtooth |\\. Effectively equals inverting the amplitude. - **float triangle(float t)** triangle form, duty cycle default 50%. - **float square(float t)** square wave with duty cycle default 50%. -- **float sinus(float t)** sinus wave, has no duty cycle. +- **float sinus(float t)** sinus wave, has no duty cycle. - **float stair(float t, uint16_t steps = 8, uint8_t mode = 0)** defaults to 8 steps up. - mode = 0 ==> steps up - mode = 1 ==> steps down. Effectively equals inverting the amplitude. -- **float random()** random noise generation. +- **float random()** random noise generation between 0 and amplitude. +Uses Marsaglia random generator. - **float line()** constant voltage line. Height depends on the YShift and amplitude. - **float zero()** constant zero. @@ -142,7 +160,29 @@ The functions **line()** and **zero()** can be used to drive a constant voltage from a DAC and can be used to calibrate the generator / DAC combination. -#### Duty Cycle +Experimental 0.2.7 + +- **float sinusDiode(float t)** sinus wave, only positive pulses. +(better name welcome). +- **float sinusRectified(float t)** sinus wave, with "abs(negative pulses)". +(better name welcome). +- **float trapezium1(float t)** trapezium wave. +DutyCycle changes steepness of the falling and rising edge. +The wave changes from a square wave, via trapezium to a triangle wave. +- **float trapezium2(float t)** trapezium wave. +DutyCycle changes duration HIGH vs LOW, wave stays trapezium like. +Note at 50% DC the two trapezium functions are identical. +- **float heartBeat(float t)** simplified heartbeat wave. +To get a regular BPM heartbeat one should **setFrequency(BPM/60.0)** e.g 72/60 = 1.2. +- **float freeWave(float t, int16_t arr, int16_t N)** define a free wave form. +It uses an array of **N+1** values, dividing a full period in **N** equidistant steps. +The last value should equal the first value to have a smooth transition. +The values of the array normally vary between -10000 and +10000 to manage +the set the relative amplitude in small steps. +These are scaled back to -1.0 to +1.0 times the amplitude. + + +### Duty Cycle Since 0.2.5 the library has **experimental** support for duty cycle. The meaning of duty cycle differs per wave form. @@ -160,7 +200,16 @@ with respect to previous value. Implemented as a weighed average between new and previous value. Made a separate function as handling the duty cycle slows performance substantial. Initial starts at zero and can be adjusted with **YShift()**. +- **float trapezium1(float t)** The duty cycle changes the steepness of the rising +and falling edges. This changes the form from square wave to trapezium to triangle. +The length of the HIGH LOW level go from 0 to half a period. +- **float trapezium2(float t)** The duty cycle determines the length of the HIGH level, +which is 0 for 0% DC and half a period for 100% DC. +The rising and falling edges stay same. +- **float heartBeat(float t)** The duty cycle determines the part of the period +that the signal ~zero. +### No duty cycle The other functions need to be investigated what duty cycle means. Current ideas that are **NOT** implemented: @@ -171,41 +220,52 @@ Think of it as the halve of the triangle wave. - **stair()** like sawtooth?? - **line()** has no period so does not make sense (yet). - **zero()** has no period so does not make sense (yet). - -Feedback and ideas are welcome. - +- **float sinusDiode(float t)** +- **float sinusRectified(float t)** +- **float freeWave(float t, int16_t arr, int16_t N)** ## Future - #### Must -- documentation - - quality of signals - after substantial time t - - max freq per wave form etc. - Should this be in the library? - +- improve documentation + - reorganize + - section per function might be better. #### Should - smart reseed needed for random(). -- initialize random generator with compile time. - + - initialize random generator with compile file + date + time. + - use function values for seed bits. +- stand-alone functions in separate .h +- clean up code #### Could -- waves - - trapezium wave (could merge square and triangle and sawtooth) - - white noise, pink noise etc. -- RC function curve. +- ASDR wave + - https://en.wikipedia.org/wiki/Envelope_(music) + - **float ADSR(float t, float A, float D, float S, float R)** + - ADSR are percentages, A + D + R < 1.0 + - S = % of amplitude. - external clock to synchronize two or more software function generators. -- stand-alone functions in separate .h - check for synergy with https://github.com/RobTillaart/AD985X - investigate performance. - algorithms for DAC specific gains e.g. 10-12-16 bit. - improve performance sin() lookup table. - add float variable for ```_perDC = _period * _dutyCycle``` - do we need **freq4** ? not since DC. +- heartBeat + - small noise/variation parameter on amplitude and frequency. + - reduce footprint ==> wrapper around freeWave() +- waves + - white noise, pink noise (better done with hardware) + - min() + max() => return +-amplitude + yshift? + - RC function curve. + - Gamma curve. +- create a function table? with what? +- create an example program to sample an arbitrary wave form + - output in the right format. + - slow sampling vs real time. #### Examples @@ -228,6 +288,8 @@ Feedback and ideas are welcome. - **float stairDC()** - Bezier curve? (too complex) - record a signal and play back ==> separate class +- document max frequency per wave form etc. + Should this be in the library? differs per board. ## Support