-1

Suppose I have a six-dimensional point cloud D, it has only one cluster and no noise, and its density is uneven. Given an examination point C, how to calculate the distance from C to the boundary of D? This is easy when C is outside the point cloud D; in this case, the distance is the minimum distance from C to all points in D. But how about the case when C is in the interior of D? 2D-example Thanks a lot!

I have tried the density-based algorithm DBSCAN to detect the boundary points of the point cloud, but it can not detect enough actual boundary points that enclose the point cloud.

  • Is it right to assume that as the number of points in D tends to infinity, the surface of D becomes perfectly smooth? I.e. in the 2D example, if the number of points was arbitrarily large, D would look like a nice, smooth, solid ellipse? – Robot Head Jan 18 '23 at 11:15
  • yes it is right to assume so. – Lucy Don Jan 18 '23 at 19:49
  • In your example, the point-cloud is convex. Is that a guarantee? If yes, you can start by computing the convex hull of the point cloud. This will be your boundary. – Stef Jan 19 '23 at 20:15
  • This is a math problem for https://math.stackexchange.com/ and not a programming problem. [What topics can I ask about here?](https://stackoverflow.com/help/on-topic) – Rob Jan 21 '23 at 10:49

1 Answers1

0

Assumptions

On the basis that the points represent a defined ellipse with a smooth, sharp surface (as per your answer to my question), the boundary position you find will necessarily be a statistical estimate, as I expect you're aware.

I assume the points are uniformly randomly distributed.

My idea

The location on the edge of the ellipse (or on the surface of the cloud) is going to be somewhere on a line that starts at the origin of the point cloud and goes through C.

  1. Project a cylinder from the origin to C (I'll get to the diameter later).
  2. Count the number of points enclosed by the cylinder. I found a bit of C++ code that can check if a point is inside a cylinder here. That code is for 3 dimensions but it's easy to see how it can be adapted for 6, and it's simple enough that you could translate it into any language.
  3. Increase the length of the cylinder and count the points it encloses again.
  4. Keep going until the number of points enclosed by the cylinder hasn't changed for a few iterations.
  5. You can then work back to find the cylinder length where the point count stopped increasing.
  6. The cylinder now essentially represents a vector whose end lies on the boundary of D.
  7. You can also subtract the distance from the origin of D to C from the length of the final cylinder to get the distance from C to the boundary.

You can have an outer iteration that chooses random locations for C and goes through these steps each time. The ends of all those cylinders represent a set of new points that describe the surface of the point cloud, which I imagined is the purpose of the exercise (to generate a shell from the cloud).

Cylinder radius

As for the radius of the cylinder, this needs to be large enough to ensure it's not so thin that it misses too many points near the boundary and so gives you a distance that's too small. You could trial-and-error this, use some judgment based on the density of the point cloud, or carry out the test above a number of times using different radii.

Notes

This method should actually work with any shape, even an amorphous one as long as as the boundary never overlaps itself (i.e. all points on the surface would be visible from the origin).

So it would work with a cube, but not a banana! You could adapt it for abritrary shapes but as that's not in the question I'll leave that for now.

Robot Head
  • 396
  • 3
  • 16