Closed shengdie closed 5 years ago
Interesting but I suspect nontrivial. Meanwhile, there are a couple of routines for the sphere in meshzoo.
I knew it, but it is not based on force balance. I like distmesh, because it generates most equilateral triangles, which is important in FEM simulations. distmesh offers matlab code for 3d-surface mesh, but I can't read it😞
Geordie McBain notifications@github.com 于2019年6月23日周日 下午8:33写道:
Interesting but I suspect nontrivial. Meanwhile, there are a couple of routines for the sphere in meshzoo https://github.com/nschloe/meshzoo#sphere-surface.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nschloe/dmsh/issues/1?email_source=notifications&email_token=ABVUYFN6RS3LKZEPB3CBAQ3P4AI7NA5CNFSM4H22EEOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYLK2ZY#issuecomment-504802663, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVUYFLFQ7UQOF25VHZSX5DP4AI7NANCNFSM4H22EEOA .
Would be nice to have. Link to code?
Would be nice to have. Link to code?
In the official site, distmeshsurface.m
http://persson.berkeley.edu/distmesh/distmesh.zip
Way too complicated for me to dive in like that. PRs welcome.
I knew it, but it is not based on force balance. I like distmesh, because it generates most equilateral triangles
I've improved icosa sphere in meshzoo a bit yesterday. In general, you can't get much better than that.
Alright, it turns out you can actually do a little bit better. I've just added support for surface meshes to optimesh (https://twitter.com/nschloe/status/1184605182396641280), so here's how you get the best spherical mesh:
import meshzoo
import optimesh
points, cells = meshzoo.icosa_sphere(10)
class Sphere:
def f(self, x):
return 1.0 - (x[0] ** 2 + x[1] ** 2 + x[2] ** 2)
def grad(self, x):
return -2 * x
points, cells = optimesh.cvt.quasi_newton_uniform_full(
points, cells, 1.0e-2, 100, verbose=False,
implicit_surface=Sphere(),
# step_filename_format="out{:03d}.vtk"
)
dmsh definitely won't be able to do any better, so let's close this.
Hello,
Thank you for your work, could you please implement the 3d-surface mesh like sphere? I tried by myself, but I am not familiar with matlab. Thank you.