Let me ask a question , given any short curve segment , how can you decide that it is not an ellipse line segment by a finite calculations?
Thank you in advance.
Use Pascal's Theorem. This lets you determine whether any six points can lie on a conic section (an ellipse, circle, hyperbola, parabola, or the union of two straight lines).
This theorem states that if $ A, B, C, D, E, F $ are six points of a conic section, then you take $ U $ which is the intersection point of the line $ AB $ and the line $ DE $, $ V $ is the intersection point of line $ BC $ and line $ EF $, and $ W $ is the intersection point of lines $ CD $ and $ FA $, then $ UVW $ are on a straight line. If this condition fails for any six lines of your curve, then it can't be a section of an ellipse.
There is, however, an exceptional case: is if your curve is a segment of a hyperbola or parabola or straight line, the above method won't work, as it does not distinguish between conic sections. I'm not sure what computation route you could follow in this case though.
Choose enough points on it to force a fit: 4 if the ellipse is aligned with the axes, 6 otherwise. If the fit fails, it's not an ellipse. This just requires solving a linear system.