Geometric curve fitting