ported over implicit surfaces