polished and documented surfaceDistR and horizontalSurfaceProjection