Algebra¶
Extrapolation¶
colour
|
Extrapolates the 1-D function of given interpolator. |
Interpolation¶
colour
|
Kernel based interpolation of a 1-D function. |
|
A nearest-neighbour interpolator. |
|
Linearly interpolates a 1-D function. |
|
Performs 1-D function null interpolation, i.e. |
|
Interpolates a 1-D function using Piecewise Cubic Hermite Interpolating Polynomial interpolation. |
|
Constructs a fifth-order polynomial that passes through \(y\) dependent variable. |
|
Computes the Lagrange Coefficients at given point \(r\) for degree \(n\). |
Supported table interpolation methods. |
|
|
Performs interpolation of given \(V_{xyz}\) values using given interpolation table. |
Interpolation Kernels
colour
Returns the nearest-neighbour kernel evaluated at given samples. |
|
Returns the linear kernel evaluated at given samples. |
|
|
Returns the sinc kernel evaluated at given samples. |
|
Returns the lanczos kernel evaluated at given samples. |
|
Returns the cardinal spline kernel evaluated at given samples. |
Ancillary Objects
colour.algebra
|
Performs trilinear interpolation of given \(V_{xyz}\) values using given interpolation table. |
|
Performs tetrahedral interpolation of given \(V_{xyz}\) values using given interpolation table. |
Coordinates¶
colour.algebra
Transforms given Cartesian coordinates array \(xyz\) to Spherical coordinates array \(\rho\theta\phi\) (radial distance, inclination or elevation and azimuth). |
|
Transforms given Spherical coordinates array \(\rho\theta\phi\) (radial distance, inclination or elevation and azimuth) to Cartesian coordinates array \(xyz\). |
|
Transforms given Cartesian coordinates array \(xy\) to Polar coordinates array \(\rho\phi\) (radial coordinate, angular coordinate). |
|
Transforms given Polar coordinates array \(\rho\phi\) (radial coordinate, angular coordinate) to Cartesian coordinates array \(xy\). |
|
Transforms given Cartesian coordinates array \(xyz\) to Cylindrical coordinates array \(\rho\phi z\) (azimuth, radial distance and height). |
|
Transforms given Cylindrical coordinates array \(\rho\phi z\) (azimuth, radial distance and height) to Cartesian coordinates array \(xyz\). |
Geometry¶
colour.algebra
Normalises given vector \(a\). |
|
|
Returns the euclidean distance between point arrays \(a\) and \(b\). |
|
Extends the line segment defined by point arrays \(a\) and \(b\) by given distance and return the new end point. |
|
Computes \(l_1\) line segments intersections with \(l_2\) line segments. |
|
Returns the general form ellipse coefficients from given canonical form ellipse coefficients. |
|
Returns the canonical form ellipse coefficients from given general form ellipse coefficients. |
|
Returns the coordinates of the point at angle \(\phi\) in degrees on the ellipse with given canonical form coefficients. |
Supported ellipse fitting methods. |
|
|
Returns the coefficients of the implicit second-order polynomial/quadratic curve that fits given point array \(a\) using given method. |
Ancillary Objects
colour.algebra
Defines the specification for intersection of line segments \(l_1\) and \(l_2\) returned by |
|
Returns the coefficients of the implicit second-order polynomial/quadratic curve that fits given point array \(a\) using Halir and Flusser (1998) method. |
Random¶
colour.algebra
|
Returns a generator yielding random triplets. |
Regression¶
colour.algebra
Computes the least-squares mapping from dependent variable \(y\) to independent variable \(x\) using Moore-Penrose inverse. |
Common¶
colour.algebra
Returns whether Colour safe / symmetrical power function is enabled. |
|
|
Sets Colour safe / symmetrical power function enabled state. |
|
A context manager and decorator temporarily setting Colour safe / symmetrical power function enabled state. |
|
Raises given array \(a\) to the power \(p\) as follows: \(sign(a) * |a|^p\). |