We can speed things up if we precompute some invariants. You need to re-run this if you are changing the mesh externally between remesh passes, otherwise you will get weird results. But you will probably still come out ahead, computation-time-wise