Rough computation of distance between 2 points

2019-02-14 08:43发布

I want to calculate the rough (approximate) distance between two points to reduce the computation overhead.

I am using the following formula for the distance between (x1, y1) & (x2, y2):

Dist = Mod (x1 - x2) + Mod (y1 - y2)

Where Mod is the Modulus operator such that Mod(x) = |X|.

This seems to be working.

I want to know, if I have missed out something ...

7条回答
Bombasti
2楼-- · 2019-02-14 09:32

Graphical representation of three usual distances:

enter image description here

(Note: this represents a circle of radius 4 in these three metrics.)

查看更多
登录 后发表回答