Definition at line 52 of file screenmap.cpp.
53 {
55
56
57 float circumference = numLeds * cm_between_leds;
58 float radius = circumference / (2 *
PI);
59
60
61 float totalAngle = completion * 2 *
PI;
62 float gapAngle = 2 *
PI - totalAngle;
63
64
65 float startAngle = -
PI / 2 + gapAngle / 2.0f;
66
67
68 float divisor =
69 (completion < 1.0f && numLeds > 1) ? (numLeds - 1) : numLeds;
70
71 for (int i = 0; i < numLeds; ++i) {
72 float angle = startAngle + (i * totalAngle) / divisor;
73 float x = radius * cos(angle) * 2;
74 float y = radius * sin(angle) * 2;
76 }
77
80}
void setDiameter(float diameter)
References ScreenMap(), PI, screenMap, x, and y.
Referenced by DefaultStrip(), and setup().