Fortran to find nearest point from set in 3-D
- From: David.Paterson@xxxxxxxx
- Date: 15 Apr 2006 16:16:11 -0700
I'm looking for Fortran source code if possible.
Given set A with roughly 10,000 (x,y,z) triples and set B with roughly
1,000,000 (x,y,z) triples.
For each point in set A find the nearest point from set B.
What's the quickest algorithm?
-------------------------------
A very slow algorithm would be to check all 1,000,000 triples in B for
every point in A.
A slightly better algorithm would be to sort B by (x) in advance. If I
was programming it from scratch that's what I'd do.
A slightly better algorithm than that would be to allocate every point
in B to a 3-D cubic grid. Find the grid node closest to each point from
A and search that and the surrounding 26 grid cubes for the closest.
I seem to remember that there's an even better algorithm than that,
using a heirarchy of 3-D grids.
.
- Follow-Ups:
- Re: Fortran to find nearest point from set in 3-D
- From: Martin Blume
- Re: Fortran to find nearest point from set in 3-D
- From: Ronald Bruck
- Re: Fortran to find nearest point from set in 3-D
- From: Rob McDonald
- Re: Fortran to find nearest point from set in 3-D
- Prev by Date: [OT] Rieman curvatures
- Next by Date: Re: Fortran to find nearest point from set in 3-D
- Previous by thread: [OT] Rieman curvatures
- Next by thread: Re: Fortran to find nearest point from set in 3-D
- Index(es):
Relevant Pages
|