This is my code:

void RemoveClosePoints(double* xIso, double* yIso, int nIso, double

maxdist)

{

for(unsigned int i=0; i<nIso; ++i)

{

for(unsigned int j=i+1; j<nIso; ++j)

{

// if the points are closer than "maxdist"

if(abs(xIso[i]-xIso[j])<=maxdist && abs(yIso[i]-yIso[j])<=maxdist)

{

// make it inaccessable in the list

--nIso;

xIso[j] = xIso[nIso];

yIso[j] = yIso[nIso];

vIso[j] = vIso[nIso];

--i;

break;

}

}

}

}

how to make that faster?

--

-Gernot

int main(int argc, char** argv) {printf

("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}

________________________________________

Looking for a good game? Do it yourself!

GLBasic - you can do

www.GLBasic.com

To make it faster you have to avoid the check each point against each point by some

accelerating structur like a hash bucket list. Means put points in buckets addressed by a

hashvalue calculated from the point. This way you just need to test against all the points

in the bucket the point is and the buckets next to it.

Regards

Stefan

"Stefan Rybacki" < XXXX@XXXXX.COM > schrieb im Newsbeitrag

Nice! Thx!

Of course. Weird that one usualy calls them three-dimensional kd-trees

instead of 3d-trees. :-)

1. How to find closest point(s) around a specific point in point cloud?

2. How to find closest point(s) around a specific point in point cloud?

3. Maximum point spread in point cloud

4. Delete points from point cloud.

5. tunnel point to point vs physical point to point

6. Finding volume of a point cloud

7. Finding Spheres and their centres in a 3d point clouds

8. Removig Points That Are Close to Each Other, From a Point Matrix

9. explorer.exe-entry point not found-error message after updates ins

10. Scenario 5: IS-IS routing on Frame Relay Multi-point and Point-to-Point

11. Make one point larger than the rest of points in a point series

12. wireless point to point (multi point)

13. From point A to point B to... point Z

14. xp point-to-point-to-point settings

15. How do I find points on a curve between known points?

6 post • Page:**1** of **1**