Find points on boundaries
Helper functions