 # Graphing in taxicab geometry has some flaws

Something’s not working the way it seems like it should.

When I graphed |x|+|y|=|x-3|+|y-3|

I saw a mess!

But I expected the segment from (0,3) to (3,0) (which was correct), plus the quarter planes above and left of (0,3) and below and right of (3,0), which didn’t look right at all.

Here’s the link to the page, dashboard, or activity: I broke Desmos (taxicab geometry)
(This is a special case when the segment connecting the two given points is at a slope of +/- 1)

There were some similar issues with |x|+|y|+|x-1|+|y-5|=6 which should be a rectangle and its interior but was just the rectangle: Should shade interior of rectangle
(This is a special case when the sum of the taxicab distances is equal to the distance between the points.)

Hey Joshua, thanks for the report!

Our implicit plotter works by taking your `f(x,y)` and sampling—and recursively subsampling—many points in the plane in an attempt to approximate the boundary between regions where it is positive and where it is negative, because this boundary forms the solution set. But in order to reliably detect that, we need your function to actually change signs at that boundary. Or, equivalently, we need that surface to properly intersect the plane at `z=0` , not simply become tangent to it.

As a consequence of this, we will never shade a region based on an implicit equation . If an implicit equation (not inequality) is 0 over some region , it means that region is tangent to the plane.

We do this because it’s not feasible to sample every single point in the viewport and check for exact equality with 0 without being intolerably slow. And even if we could, we’d end up plotting a pretty janky boundary almost all the time, because those comparisons would be very numerically unstable due to floating-point rounding error. This is one of n compromises we make in numerical systems, where n is large.