colour.algebra.ellipse_coefficients_general_form

colour.algebra.ellipse_coefficients_general_form(coefficients)[source]

Returns 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 (array_like) – Canonical form ellipse coefficients.

Returns

General form ellipse coefficients.

Return type

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])