Algebra¶
Extrapolation¶
colour
|
Extrapolate the 1-D function of given interpolator. |
Interpolation¶
colour
|
Kernel based interpolation of a 1-D function. |
|
A nearest-neighbour interpolator. |
|
Interpolate linearly a 1-D function. |
|
Perform 1-D function null interpolation, i.e. a call within given tolerances will return existing \(y\) variable values and |
|
Interpolate a 1-D function using Piecewise Cubic Hermite Interpolating Polynomial interpolation. |
|
Construct a fifth-order polynomial that passes through \(y\) dependent variable. |
|
Compute the Lagrange Coefficients at given point \(r\) for degree \(n\). |
Supported table interpolation methods. |
|
|
Perform interpolation of given \(V_{xyz}\) values using given interpolation table. |
Interpolation Kernels
colour
Return the nearest-neighbour kernel evaluated at given samples. |
|
Return the linear kernel evaluated at given samples. |
|
|
Return the sinc kernel evaluated at given samples. |
|
Return the lanczos kernel evaluated at given samples. |
|
Return the cardinal spline kernel evaluated at given samples. |
Ancillary Objects
colour.algebra
|
Perform the trilinear interpolation of given \(V_{xyz}\) values using given interpolation table. |
|
Perform the tetrahedral interpolation of given \(V_{xyz}\) values using given interpolation table. |
Coordinates¶
colour.algebra
Transform given cartesian coordinates array \(xyz\) to spherical coordinates array \(\rho\theta\phi\) (radial distance, inclination or elevation and azimuth). |
|
Transform given spherical coordinates array \(\rho\theta\phi\) (radial distance, inclination or elevation and azimuth) to cartesian coordinates array \(xyz\). |
|
Transform given cartesian coordinates array \(xy\) to polar coordinates array \(\rho\phi\) (radial coordinate, angular coordinate). |
|
Transform given polar coordinates array \(\rho\phi\) (radial coordinate, angular coordinate) to cartesian coordinates array \(xy\). |
|
Transform given cartesian coordinates array \(xyz\) to cylindrical coordinates array \(\rho\phi z\) (radial distance, azimuth and height). |
|
Transform given cylindrical coordinates array \(\rho\phi z\) (radial distance, azimuth and height) to cartesian coordinates array \(xyz\). |
Geometry¶
colour.algebra
Normalise given vector \(a\). |
|
|
Return the Euclidean distance between point array \(a\) and point array \(b\). |
|
Return the Manhattan (or City-Block) distance between point array \(a\) and point array \(b\). |
|
Extend the line segment defined by point arrays \(a\) and \(b\) by given distance and return the new end point. |
|
Compute \(l_1\) line segments intersections with \(l_2\) line segments. |
|
Return the general form ellipse coefficients from given canonical form ellipse coefficients. |
|
Return the canonical form ellipse coefficients from given general form ellipse coefficients. |
|
Return the coordinates of the point at angle \(\phi\) in degrees on the ellipse with given canonical form coefficients. |
Supported ellipse fitting methods. |
|
|
Return the coefficients of the implicit second-order polynomial/quadratic curve that fits given point array \(a\) using given method. |
Ancillary Objects
colour.algebra
Define the specification for intersection of line segments \(l_1\) and \(l_2\) returned by |
|
Return 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
|
Return a generator yielding random triplets. |
Regression¶
colour.algebra
Compute the least-squares mapping from dependent variable \(y\) to independent variable \(x\) using Moore-Penrose inverse. |
Common¶
colour.algebra
Return whether Colour safe / symmetrical power function is enabled. |
|
|
Set Colour safe / symmetrical power function enabled state. |
|
Define a context manager and decorator temporarily setting Colour safe / symmetrical power function enabled state. |
|
Raise given array \(a\) to the power \(p\) as follows: \(sign(a) * |a|^p\). |
|
Normalise given array \(a\) values by \(a\) maximum value and optionally clip them between. |
|
Perform the dot product of the matrix array \(m\) with the vector array \(v\). |
|
Perform the dot product of the matrix array \(a\) with the matrix array \(b\). |
|
Perform a simple linear conversion of given array \(a\) between the old and new ranges. |
|
Perform a simple linear interpolation between given array \(a\) and array \(b\) using \(x\) array. |
|
Perform a simple linear interpolation between given array \(a\) and array \(b\) using \(x\) array. |
|
Evaluate the smoothstep sigmoid-like function on array \(x\). |
|
Evaluate the smoothstep sigmoid-like function on array \(x\). |
|
Return whether \(a\) array is an identity matrix. |