Sunday, September 5, 2010

Path Optimization at Burning Man

Let A and B be any two points on the playa on the same lettered street between which a traveler wishes to travel, assuming he/she cannot cut across the blocks. Let r = distance from the Man to Esplanade, and theta = the angle formed by A-Man-B, and b = distance from the Esplanade to A or B.

2*r*sin(theta/2) + 2b = distance traversed if the traveller first goes up to Esplanade and then back out.
2*pi*(r+b)(theta/2pi) = distance traversed if the traveler moves along the lettered street.
// theta is in radians

r/b = [ 1 - (2/theta) ] / [ (2/theta) sin (theta/2) - 1]

Note that the actual values of r and be are irrelevant, only their ratio. For a given theta, we have a ratio of r&b that makes it equidistant to cut to the Esplanade versus traveling along the circle to your destination. For a given r/b, this is the minimal angle at which it is worth it to cut to Esplanade and back.

Of course, this is assuming your goal is to minimize distance travelled b/c your feet are hurting due to forgetting to wear socks, and not to maximize your adventures, whose general solution is more of a random walk. Other fun things to solve for: path optimization between A and B if the distance between them and the Man is different (that is, they live on different streets), or if you want to ensure at least one set of port-o-potties is on the route.

And if you, reader, are the pirates we had that swordfight with ... Ninjas forever!

No comments:

Post a Comment