Skip to content

Commit a4835f6

Browse files
committed
Reset highlight colour to always be red
1 parent 8c2606b commit a4835f6

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed
648 Bytes
Binary file not shown.

challenges/2024/08-resonantCollinearity/vis.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ def get_colour_for(n):
4242
scale_factor = 8
4343

4444

45-
def get_highlight_for(n):
46-
return tuple(map(lambda x: int(x * 255), hsv_to_rgb(n, 0.82, 1)))
47-
48-
49-
def generate_frame(i, base_img, highlight_locs, hc, sequence) -> int:
45+
def generate_frame(i, base_img, highlight_locs, sequence) -> int:
5046
for n in range(len(sequence)):
5147
s = sequence[: n + 1]
5248
img = base_img.copy()
@@ -56,7 +52,7 @@ def generate_frame(i, base_img, highlight_locs, hc, sequence) -> int:
5652
img.putpixel(p, get_colour_for((j + 1) / sl))
5753

5854
for h in highlight_locs:
59-
img.putpixel(h, hc)
55+
img.putpixel(h, highlight_colour)
6056

6157
maxx, maxy = img.size
6258
img = img.resize(
@@ -115,7 +111,6 @@ def update_base(base_img, add):
115111
i,
116112
base_img,
117113
(a, b),
118-
get_highlight_for(ns.index(antenna_type) / nns),
119114
this_iter,
120115
)
121116
update_base(base_img, this_iter)

0 commit comments

Comments
 (0)