I have a complicated equation that defines a shape in 3D, and I would like to generate a surface mesh. The shape is defined by an isosurface, i.e. the function is positive inside the shape and negative outside it.
The standard basic technique for this is the 'marching cubes' algorithm. However, it has a few disadvantages for me:
It generates meshes that are not particularly good, in ways that are well known.
At least with the most naïve implementation, I have to evaluate my function at every single point in a 3D grid, even though many of these are far away from the surface. I would rather have an algorithm that makes fewer evaluations of the function.
Marching cubes doesn't take advantage of any information about derivatives, which I can easily provide since I know the function.
Are there known, 'recommended' algorithms for this kind of case? There are many, many variations on marching cubes, but it's pretty hard to get an overview of their comparative advantages, and many of them seem only to address the first point above, not the second two.
This is for a little hobby project, so ideally I'm looking for something that's comparatively easy to implement.