RE: [Algorithms] merging of points in 3D space
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2003-04-18 16:59:04
|
> 1.000 1.000 1.000 > 0.999 1.001 1.000 > 1.000 1.002 0.989 etc Either sort by one axis, and then walk the list, merging points=20 that are close enough (you only need to look a certain distance=20 ahead in the list to find matches). This is vaguely N*sqrt(N) in=20 run-time, assuming number of neighbors you need to consider=20 grows as root of total number of verts. Or round/quantize all points to even multiples of your weld=20 distance (typically, convert them all to shorts with the=20 appropriate scaling factor), and use a hash table to find=20 matches as you insert into the table. This is N run-time, in the=20 same sense as hashing is N in run-time. Cheers, / h+ |