Refactor some arithmetic expressions for simplicity and optimization purposes.
Use Boolean variable to store Boolean value.
Check if fitted curve is an ellipse.