50 {
51
52 int num_leds =
args.num_leds;
53 float leds_per_turn =
args.leds_per_turn;
54 float width_cm =
args.width_cm;
55
56 const float circumference = leds_per_turn;
57 const float radius = circumference / (2.0 *
PI);
58 const float angle_per_led = 2.0 *
PI / leds_per_turn;
59 const float total_angle_radians = angle_per_led * num_leds;
60 const float total_turns = total_angle_radians / (2.0 *
PI);
61 const float height_per_turn_cm = width_cm;
62 const float height_per_led =
63 height_per_turn_cm /
64 leds_per_turn;
65 const float total_height =
66 height_per_turn_cm * total_turns;
68 for (int i = 0; i < num_leds; i++) {
69 float angle = i * angle_per_led;
70 float height = (i / leds_per_turn) * height_per_turn_cm;
71
72
73 float x = radius * cos(angle);
74 float z = radius * sin(angle);
76
77
79
81 }
82 return out;
83}
void push_back(const T &value)