66 {
67
68 int num_leds =
args.num_leds;
69 float leds_per_turn =
args.leds_per_turn;
70 float width_cm =
args.width_cm;
71
72 const float circumference = leds_per_turn;
73 const float radius = circumference / (2.0 *
FL_PI);
74 const float angle_per_led = 2.0 *
FL_PI / leds_per_turn;
75 const float total_angle_radians = angle_per_led * num_leds;
76 const float total_turns = total_angle_radians / (2.0 *
FL_PI);
77 const float height_per_turn_cm = width_cm;
78 const float height_per_led =
79 height_per_turn_cm /
80 leds_per_turn;
81 const float total_height =
82 height_per_turn_cm * total_turns;
84 for (int i = 0; i < num_leds; i++) {
85 float angle = i * angle_per_led;
86 float height = (i / leds_per_turn) * height_per_turn_cm;
87
88
92
93
95
97 }
98 return out;
99}
void push_back(const T &value) 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