meshpro/dmsh

Mesh on 3D-surface

Closed this issue · 7 comments

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.

Interesting but I suspect nontrivial. Meanwhile, there are a couple of routines for the sphere in meshzoo.

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.

iso

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"
)

opt

dmsh definitely won't be able to do any better, so let's close this.