Example of computational geometry algorithm