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
1
u/niahoo Dec 09 '25
Hello,
I'm not sure I understand this code:
A vertical segment should share the same
xcoordinate, not the sameycoordinate. Is there some inversion on purpose here?Thank you for the examples! I have the same shape :)