proposal for an alternative

the interface is retrieved based on the distance ... but it is complex
too
simple improvement for performance
operations plus and times with discontinuous functions
output improvement
function gradient for discontinuous functions
disabling warnings for added points in triangulations