Replies: 1 comment 10 replies
-
Hi @kman750 what about this: from vedo import *
msh = Polygon(nsides=5)
pts = utils.pack_spheres(msh, radius=0.1)
# optionally add some noise:
jitter = np.random.randn(len(pts),3)/1000
jitter[:,2] = 0
pts += jitter
pts = Points(pts)
pts.cut_with_line(msh.points()) # needs an ordered set of points
show(msh, pts, axes=1) I would not use |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Marco,
I'm wondering if you have any suggestions to uniformly distribute a set number of points throughout a mesh. The mesh will be either 2D or 3D, and in the case of 3D, points should also be distributed throughout the body (i.e. not only the surface). These points are later used to probe the original mesh.
Currently I've tried decimating the original mesh setting "n" to the number of points/probes I want, but I run into 2 issues:
Thanks for your help!
Beta Was this translation helpful? Give feedback.
All reactions