- Examples
- FxNoiseRing.ino.
Definition at line 86 of file screenmap.cpp.hpp.
87 {
89
90
91 float circumference =
numLeds * cm_between_leds;
92 float radius = circumference / (2 *
FL_PI);
93
94
95 float totalAngle = completion * 2 *
FL_PI;
96 float gapAngle = 2 *
FL_PI - totalAngle;
97
98
99 float startAngle = -
FL_PI / 2 + gapAngle / 2.0f;
100
101
102 float divisor =
104
105 for (
int i = 0; i <
numLeds; ++i) {
106 float angle = startAngle + (i * totalAngle) / divisor;
107 float x = radius *
cos(angle) * 2;
108 float y = radius *
sin(angle) * 2;
110 }
111
114}
void setDiameter(float diameter) FL_NO_EXCEPT
enable_if< is_fixed_point< T >::value, T >::type sin(T angle) FL_NO_EXCEPT
enable_if< is_fixed_point< T >::value, T >::type cos(T angle) FL_NO_EXCEPT
References ScreenMap(), fl::cos(), FL_PI, screenMap, fl::sin(), fl::x, and fl::y.
Referenced by DefaultStrip(), and setup().