python-adaptive / adaptive

:chart_with_upwards_trend: Adaptive: parallel active learning of mathematical functions
http://adaptive.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.16k stars 59 forks source link

improve isosurface computation #228

Open jbweston opened 5 years ago

jbweston commented 5 years ago

When computing the isosurface, when 4 simplex edges crosses the isosurface, we add 2 triangles to the isosurface triangulation.

Right now we add these arbitrarily (in these 3 lines) but we should add them so that the curvature is minimized.

The current state of affairs produces plots like this:

K3D-1574269258138

Note how the isosurface on the right hand side of the figure is not smooth.

oroszl commented 5 years ago

Hey @jbweston can you put up the example notebook for producing the above plot somewhere?

jhoofwijk commented 4 years ago

I had though about that before, but the four points which are found are co-planar, so it doesn't matter in what way you make the triangles. The roughness comes from differences between adjacent tetrahedra.

akhmerov commented 4 years ago

@jhoofwijk thanks for the clarification, that's an excellent point.

akhmerov commented 4 years ago

OTOH the isosurface seems to have artifacts... wondering how to investigate the specific origin of those...