wolph / numpy-stl

Simple library to make working with STL files (and 3D objects in general) fast and easy.
http://numpy-stl.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
605 stars 103 forks source link

How to draw a ball #185

Closed 936769651 closed 1 year ago

936769651 commented 2 years ago

How do I draw a ball,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you,thank you!

wolph commented 2 years ago

Generating a sphere itself is reasonably simple: https://stackoverflow.com/questions/25253719/sphere-mesh-grid-in-python From that point on however, you will need to do triangulation which scipy can do: https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.Delaunay.html