If you're really small and at the edge of a door that's about to crush you, and you can't run outward to escape the door, what's the optimal direction to run in?

So in other words, if you're at (1, pi/2) and you can't go past r = 1 or (1, pi/2 - m), what's the shortest distance to (x, 0) if you run at k units/sec?

Ok I wrote a python script. You just want to run along the path of the door as fast as possible (assuming a constant rate). It gets easier as you get closer to the center though, because the arc it makes is moving slower.

Nikhil Jha@njha@fosstodon.orgI need to solve this or I won't be able to go back to sleep :/