MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Using Nearest on a group of points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117557] Using Nearest on a group of points
  • From: Martin VavpotiÄ <martin.vavpotic at gmail.com>
  • Date: Tue, 22 Mar 2011 05:10:20 -0500 (EST)

Hello. I need some help with the function Nearest.

I have a groups of points, each with two coordinates (x,y), describing
a connected shape (the last point is a neighbor to the first one). The
initial order of these points is completely scrambled but I need them
to follow one another so their sequence describes a combined shape. I
thought of using the Nearest function but there is a problem.
Somewhere in the middle of my shape is a large gap where no points
reside. I fear that if I use Nearest, the function will find the wrong
point.

What I need is for function Nearest to ignore points already sorted
and search only for points that have not been used yet.


  • Prev by Date: Re: Chop in Mathematica 8.0.1
  • Next by Date: Re: Chop in Mathematica 8.0.1
  • Previous by thread: Re: Handling conditions on subvector elements
  • Next by thread: Re: Using Nearest on a group of points