mescla.emma.endmembers.barycentric_coordinates

mescla.emma.endmembers.barycentric_coordinates(points, vertices)[source]

Barycentric coordinates of points with respect to a simplex.

For k+1 vertices in k dimensions this is an exact square solve, and the coordinates are the mixing ratios: the geometry of U-space and the algebra of conservative mixing are the same thing.

Parameters:
  • points (ndarray, shape (n_points, n_components))

  • vertices (ndarray, shape (n_components + 1, n_components))

Returns:

ndarray, shape (n_points, n_components + 1) – Rows sum to 1. Negative entries mean the point lies outside the simplex.

Return type:

ndarray