Adding some geometric routines.