Replies: 2 comments 1 reply
-
I would randomly sample points within the bbox of the mesh and use Side_of_triangle_mesh to keep only random points in the volume bounded by the mesh. |
Beta Was this translation helpful? Give feedback.
0 replies
-
You mean a rejection sampling, right? That indeed could be more efficient in some cases, but not always, when the mesh occupies a small fraction of the bounding box. E.g. a torus with a big hole. Worst if it is not "aligned" with the axes (that would enlarge the bounding box). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'd like to have your advice about the following algorithm to sample some points inside the volume bounded by a closed mesh:
This should be correct, but maybe you have a better idea, a more efficient method?
Beta Was this translation helpful? Give feedback.
All reactions