1
$\begingroup$

I'm trying to implement a nearest neighbor search.

I have a set of points that lie within a rectangle of any size, and I need to map these points to the unit square such that the nearest neighbor relation between points is retained.

Is this possible, or will the mapping distort the relative distances between points?

For example, mapping the points inside of a 7 x 2 rectangle to the unit square.

  • 0
    Well, if you extend the short sides of the rectangle to make a square, and map in the natural way, there will be no distortion of relative distances. But if the image of the original rectangle is exactly the unit square, there will be distortion.2012-12-08

1 Answers 1

2

Extend the short sides of the rectangle to make a square, and map in the natural way to the unit square. Then there will be no distortion of relative distances.

But if the image of the original rectangle is exactly the unit square, there will be distortion of relative distances unless the original points occupy very special positions. But we cannot arrange the mapping to that the image of the rectangle is the unit square and relative distances are preserved for all finite collections of points in the rectangle.