Script to connect points together to a curve?

 From:  Michael Gibson
6445.2 In reply to 6445.1 
Hi Brian, well if you have a whole lot of points the nearest neighbor search can be quite time consuming. It can be sped up using certain kinds of data structures such as a K-d tree: http://en.wikipedia.org/wiki/K-d_tree. If you don't have a whole lot then a more simple search like the one used here may be ok:
http://moi3d.com/forum/messages.php?webtag=MOI&msg=2749.56

The best reference that I think I've seen before on K-d trees is:
The Design and Analysis of Spatial Data Structures by Hanan Samet

- Michael