Computational geometry in C