Computational geometry algorithms - Java