Squared distance computations for simple 2D objects.