Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBacterius

Posted 11 December 2012 - 12:18 PM

As Alvaro says above, you'll need to define some form of metric to compare the distance between two (x, y) "colors". The closest thing I can think of to your request is a kd-tree, which is basically a multidimensional binary tree, which sorts a list of points in k dimensions, which supports efficient nearest-neighbor search (find the N closest colors in the tree to some color, according to your definition of "closest") and range search (find all the colors in the tree closer to some color than some distance X, again according to your definition of "distance").

But it depends on what you want to do, you haven't given enough information.

#1Bacterius

Posted 11 December 2012 - 12:17 PM

As Alvaro says above, you'll need to define some form of metric to compare the distance between two (x, y) "colors". The closest thing I can think of to your request is a kd-tree, which is basically a multidimensional binary tree, which sorts a list of points in k dimensions, which supports nearest-neighbor search (find the N closest colors in the tree to some color, according to your definition of "closest") and range search (find all the colors in the tree closer to some color than some distance X, again according to your definition of "distance").

PARTNERS