FastLED 3.9.15
Loading...
Searching...
No Matches

◆ gen_points()

list[Point] gen.gen_points ( list[HexagonAngle] input,
int leds_per_strip,
Point startPos,
list[int] | None exclude = None,
bool add_last = False )

Definition at line 68 of file gen.py.

72) -> list[Point]:
73 points: list[Point] = []
74 if (not input) or (not leds_per_strip):
75 return points
76 exclude = exclude or []
77 # Start FSM. Start pointer get's put into the accumulator.
78 curr_point: Point = Point(startPos.x, startPos.y)
79 # points.append(curr_point)
80 last_angle = input[0]
81 for i,angle in enumerate(input):
82 excluded = i in exclude
83 values = list(range(leds_per_strip))
84 last_angle = angle
85 for v in values:
86 last_angle = angle
87 curr_point = next_point(curr_point, angle, SPACE_PER_LED)
88 if not excluded:
89 points.append(curr_point)
90 #if i == len(input) - 1:
91 # break
92 # Next starting point
93 curr_point = next_point(curr_point, last_angle, SPACE_PER_LED)
94 #if not excluded:
95 # points.append(curr_point)
96 if add_last:
97 points.append(curr_point)
98 return points
99
100
101

References next_point().

Referenced by find_green_anchore_point(), find_red_anchor_point(), generate_black_points(), generate_blue_points(), generate_green_points(), generate_red_points(), main(), simple_test(), two_angle_test(), and two_angle_test2().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: