I'm going insane.
It is a complete tangent to everything and a good enough solution really would be good enough, but I'm trying to create an algorithm that fits an axis aligned regular hexagon to a grid of points, while making the hexagon as small as possible.
I have spent hours just bashing my head against trig only to realize I've made basic fundamental mistakes like multiplying by 2 instead of dividing. I keep coming up with seemingly solid algorithms, only for them to fail on edge cases. Why the heck am I bothering with this? I think I'll delete it all in the morning, unless the solution is stupidly obvious once I have slept.
It is a complete tangent to everything and a good enough solution really would be good enough, but I'm trying to create an algorithm that fits an axis aligned regular hexagon to a grid of points, while making the hexagon as small as possible.
I have spent hours just bashing my head against trig only to realize I've made basic fundamental mistakes like multiplying by 2 instead of dividing. I keep coming up with seemingly solid algorithms, only for them to fail on edge cases. Why the heck am I bothering with this? I think I'll delete it all in the morning, unless the solution is stupidly obvious once I have slept.