colour.geometry.ellipse_coefficients_canonical_form#
- colour.geometry.ellipse_coefficients_canonical_form(coefficients: ArrayLike) NDArrayFloat[source]#
Compute canonical form ellipse coefficients from the specified general form ellipse coefficients.
The general form ellipse coefficients are the coefficients of the implicit second-order polynomial/quadratic curve expressed as follows:
\(F\left(x, y\right) = ax^2 + bxy + cy^2 + dx + ey + f = 0\)
with an ellipse-specific constraint such as \(b^2 - 4ac < 0\) and where \(a, b, c, d, e, f\) are the ellipse coefficients and \(F\left(x, y\right)\) are coordinates of points lying on the ellipse.
- Parameters:
coefficients (ArrayLike) – General form ellipse coefficients.
- Returns:
Canonical form ellipse coefficients.
- Return type:
References
Examples
>>> coefficients = np.array([2.5, -3.0, 2.5, -1.0, -1.0, -3.5]) >>> ellipse_coefficients_canonical_form(coefficients) array([ 0.5, 0.5, 2. , 1. , 45. ])