Advent of Code Day 09
Another day another Advent of Code visualization. This time we are filling in patterns on a tiled floor and seeing which two red tiles make rectangles with the largest area. For part two you need to fill the loop made on the floor and make sure the rectangles are only those contained within the filled area.
It took me a looong time to figure this one out. I wanted to do a flood fill but that exceeded memory. So I only took the rows and columns where there was a red square. Then I flood filled that. (I tried figuring it out with horizontal and vertical spans but got nowhere.) Anyway I had some debug output that looked nice so I decided to make an image out of it. A visualization if you will. It is only at this point I realize my visualization is hugely distorted by clipping out the unused columns and rows. Probably would look cooler otherwise. Still it is kind of cool so you get a post with a picture of it
Since I had a C# console app it didn’t want me to let me make the image (System.Drawing didn’t have the Bitmap class probably need some sort of library added). Instead I did it in Python. Looks like I am a bit rusty, but I got there in the end. If you look at the far right of the diamond shape there is a spot that didn’t flood fill correctly. I guess that didn’t affect the final outcome.

Looking at the subreddit, if you don’t exclude the unused columns/rows the output is circular, pac-man like.