colour.algebra.table_interpolation_tetrahedral#

colour.algebra.table_interpolation_tetrahedral(V_xyz: ArrayLike, table: ArrayLike) NDArrayFloat[source]#

Perform tetrahedral interpolation of the specified \(V_{xyz}\) values using the specified 4-dimensional interpolation table.

Parameters:
  • V_xyz (ArrayLike) – \(V_{xyz}\) values to interpolate.

  • table (ArrayLike) – 4-Dimensional (NxNxNx3) interpolation table.

Returns:

Interpolated \(V_{xyz}\) values.

Return type:

numpy.ndarray

References

[Kir06]

Examples

>>> import os
>>> import colour
>>> path = os.path.join(
...     os.path.dirname(__file__),
...     "..",
...     "io",
...     "luts",
...     "tests",
...     "resources",
...     "iridas_cube",
...     "Colour_Correct.cube",
... )
>>> LUT = colour.read_LUT(path)
>>> table = LUT.table
>>> prng = np.random.RandomState(4)
>>> V_xyz = colour.algebra.random_triplet_generator(3, random_state=prng)
>>> print(V_xyz)
[[0.9670298... 0.7148159... 0.9762744...]
 [0.5472322... 0.6977288... 0.0062302...]
 [0.9726843... 0.2160895... 0.2529823...]]
>>> table_interpolation_tetrahedral(V_xyz, table)
array([[1.0196197..., 0.7674062..., 1.0311751...],
       [0.5105603..., 0.6466722..., 0.1077296...],
       [1.1178206..., 0.1762039..., 0.2209534...]])