colour.geometry.ellipse_coefficients_general_form#

colour.geometry.ellipse_coefficients_general_form(coefficients: ArrayLike) NDArrayFloat[source]#

Return the general form ellipse coefficients from given canonical form ellipse coefficients.

The canonical form ellipse coefficients are as follows: the center coordinates \(x_c\) and \(y_c\), semi-major axis length \(a_a\), semi-minor axis length \(a_b\) and rotation angle \(\theta\) in degrees of its semi-major axis \(a_a\).

Parameters:

coefficients (ArrayLike) – Canonical form ellipse coefficients.

Returns:

General form ellipse coefficients.

Return type:

numpy.ndarray

References

[Wikipedia]

Examples

>>> coefficients = np.array([0.5, 0.5, 2, 1, 45])
>>> ellipse_coefficients_general_form(coefficients)
array([ 2.5, -3. ,  2.5, -1. , -1. , -3.5])