- Examples
- FxNoiseRing.ino.
Definition at line 63 of file screenmap.cpp.hpp.
64 {
66
67
68 float circumference =
numLeds * cm_between_leds;
69 float radius = circumference / (2 *
FL_PI);
70
71
72 float totalAngle = completion * 2 *
FL_PI;
73 float gapAngle = 2 *
FL_PI - totalAngle;
74
75
76 float startAngle = -
FL_PI / 2 + gapAngle / 2.0f;
77
78
79 float divisor =
81
82 for (
int i = 0; i <
numLeds; ++i) {
83 float angle = startAngle + (i * totalAngle) / divisor;
84 float x = radius *
cos(angle) * 2;
85 float y = radius *
sin(angle) * 2;
87 }
88
91}
void setDiameter(float diameter) FL_NOEXCEPT
enable_if< is_fixed_point< T >::value, T >::type cos(T angle) FL_NOEXCEPT
enable_if< is_fixed_point< T >::value, T >::type sin(T angle) FL_NOEXCEPT
References ScreenMap(), fl::cos(), FL_PI, screenMap, fl::sin(), fl::x, and fl::y.
Referenced by DefaultStrip(), and setup().