Taxicab circles

Slide the radius and watch the blue "circle" of all points a taxi can reach in exactly r blocks. The orange curve is the ordinary circle with the same radius. Then tap any two grid points (A, then B) to see both distances between them, one staircase route and the number of shortest routes. Drag the big dot to move the centre. Notice that the taxi circle is a diamond with exactly 4r corner-to-corner lattice points, and that taxi distance is never less than straight-line distance.

taxicab circleEuclidean circleA and B

What's going on

A taxi in a city of square blocks cannot cut corners. To get from (0, 0) to (3, 2) it must drive 3 blocks east and 2 blocks north, in some order, so the taxicab distance is |Δx| + |Δy| = 5. The straight-line (Euclidean) distance is √(3² + 2²) = √13 ≈ 3.61. The taxi always goes at least as far, and it goes exactly as far only when the two points are on the same street.

A circle is "all the points at distance r from the centre". Change the meaning of distance and you change the shape. In taxicab geometry the circle of radius r is a diamond, a square tilted by 45°, with perimeter 8r. Perimeter divided by diameter is 8r / 2r = 4, so taxicab π is exactly 4.

There are many shortest taxi routes between two points. Every route from A to B is a sequence of |Δx| easts and |Δy| norths, so the count is the binomial coefficient C(|Δx| + |Δy|, |Δx|). From (0, 0) to (3, 2) that is C(5, 2) = 10 routes, all of length 5. Pascal's triangle is hiding in the street map.

Sheet: Taxicab geometry. Related demo: Pick's theorem for another game on lattice points.