r/adventofcode • u/dllu • Dec 09 '25
Visualization [2025 Day 9 Part 2] [Python] Visualization of the polygon and best rectangle
code to generate (and solve): https://gist.github.com/dllu/f8770b967d48d1dfcfc8e2468f7ab97a
I didn't read the problem statement carefully, so my solution works for points in any order. But in fact the problem statement says that they are given in order of appearance along the polygon, so my complex solution is way overkill lol.
65
Upvotes
View all comments
4
u/Hacker1MC Dec 09 '25
This image alone allows for a solution to be made much more easily than roughing it out against giant vectors. I am very glad my buddy accidentally sent me this while we were racing to the end, because it took me 15x less time to solve from that point than I had already invested into part 2.