Simple and efficient SDF calculation.