Anyone who has written or used path finding algorithms will be familiar with the as-the-crow-flies and Manhattan heuristics for measuring the distance between two points in 2D or 3D space.
What I discovered only recently is that the formulae for both heuristics are specific instances of the Minkowski distance formulae, which in 3D can be written as
Where \lvert dx\rvert, \lvert dy\rvert and \lvert dz\rvert are the absolute differences between the 2 points along the orthogonal axes.
When p=2 then this equates to the as-the-crow-flies heuristic and when p=1 it equates to the Manhattan
This sketch below allows you to experiment by changing the value of p in either 2D or 3D space. The circumference (2D) and the surface (3D) represents all points equidistant (Minkowski distance) from the centre of the shapes.
The sketch code can be found here
![]()