Some geometry agorithms.