Geometric calculation in computer vision and graphics