Geometry functions.