Generating a distribution of points relative to closed surface (alphshape)
Show older comments
Is it possible to generate a set of points in a random distribution relative to a known surface? As in, a beta distribution upon an alphashape might have a u-shaped density of points if it was averaged over its normals.
Not surprised I can't find anything, but this is a shot in the dark to avoid needing to do some sort of horrific means of layering and pruning uniform points until they add up to a distribution.
9 Comments
Walter Roberson
on 25 Feb 2023
alphashapes are at least 2D, but "beta distribution" used without qualification would be a function of one variable.
Multivariate beta distributions do exist; see for example https://stats.stackexchange.com/questions/87358/how-to-construct-a-multivariate-beta-distribution
John D'Errico
on 25 Feb 2023
An alpha shape may be arbitrarily complex in shape. Trying to extend some sort of 1-dimensional distribution like a beta, into 2 or more dimensions on such an arbitrarily shaped domain will likely be nearly impossible. At best, any ad hoc scheme that does as you wish is the best you can do. Horrific? Yes. Coming up with something that has any valid statistical basis? More horrific yet.
Walter Roberson
on 25 Feb 2023
If the alpha shape were a convex hull, then you could probably study Roger Stafford's randfixedsum file exchange contribution to see how to draw random numbers fairly.
(It has been some time since we heard from @Roger Stafford . I recall that he retired at over 80... I hope he is still doing well.)
Carson Purnell
on 26 Feb 2023
Walter Roberson
on 26 Feb 2023
specifically a peak near each inner/outer extremity.
I suggest you provide a mock-up diagram so we can understand what you are trying to do.
Carson Purnell
on 26 Feb 2023
John D'Errico
on 26 Feb 2023
Edited: John D'Errico
on 26 Feb 2023
I've not seen any activity from Roger at all in the last few years. But I don't think the ideas from randfixedsum would apply here, though it has been a while since I looked at the code.
Regardless, it may be possible to help you, if I can understand the problem, AND if you are not that terribly worried about the true distribution of the points.
You have a 3-d alpha shape. It would want to be a simple one, without internal holes in it, and not disjoint pieces. If the latter was the case, you could always split the problem into separate pieces anyway.
If the problem was truly a convex hull, it would become easier, since then every point could see the centroid, for example (and that would make it a great deal simpler.) But an alpha shape may be far more complex than that. So is your alpha shape at least close to being a convex domain? For example, typically when I worked with alpha shapes in three dimensions, they corresponded to color gamuts, which were not that nasty in general. At most, a color gamut has some gentle concavities in the surface, but they were usually pretty simple things.
But I think I could offer some ideas on how to solve your problem, at least in a moderately ad hoc way, where the region near the surface of the domain is more heavily sampled, and the density would drop off in some moderately controllable fashion. Would that be sufficient?
Carson Purnell
on 26 Feb 2023
John D'Errico
on 27 Feb 2023
Um, This is far more of a problem than you think. Yes, it seems like it would be possible. But what makes sense in one dimension need not always make sense in higher dimensions. And any such scheme will have flaws. But I'll try to offer a few options for you in an answer that I'm writing now, all of which should be efficiently computable.
Accepted Answer
More Answers (0)
Categories
Find more on Bounding Regions in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!






