Added basic computational geometry and some tests.