The answer is: “up to 30%”. What? You thought this was some think piece about craftsmanship and doing things the hard way? No! It’s math time, motherfuckers.

layout.png

How much time do you save by going straight from the red point to the green point?

tricolor.png

Call the sides of the triangle a, b, and c. Then question is: how much shorter is c than a + b?

theproblem.png

Use the Pythagorean Theorem.

pythag.png

If you call the shorter of the two shortest sides a, and the longer one b, then the problem gets simpler.

constraint.png

One of those two sides will always be shorter than the other (or equal), so instead of a and b being separate variables, you can just think of b as some multiple of a. Now take it a step further and just set a to be equal to 1. If you think about this hard enough, it will make sense why that works—or just trust me.

singlevar.png

Now that the problem is in terms of a single variable, a plot answers the question.

cutcorners.png

When the two shorter sides of the triangle are equal (left side of the plot), you get the maximum benefit from cutting across the diagonal: a reduction in distance traveled of nearly 30%. This is why my preferred method for crossing intersections with 4-way stop signs is to go straight through the middle.

As the two shorter sides of the triangle grow more unequal, the benefit to cutting the corner falls down to 0 (in the limit).

cutcornerscode.png

Here’s the code for that plot.