bundles / scipy latest / scipy / spatial / _qhull / _get_barycentric_transforms
cython_function_or_method
scipy.spatial._qhull:_get_barycentric_transforms
Signature
def _get_barycentric_transforms ( points , simplices , eps ) Summary
Compute barycentric affine coordinate transformations for given simplices.
Returns
Tinvs: array, shape (nsimplex, ndim+1, ndim)Barycentric transforms for each simplex.
Tinvs[i,:ndim,:ndim] contains inverse of the matrix
T, and Tinvs[i,ndim,:] contains the vectorr_n(see below).
Notes
Barycentric transform from x to c is defined by
T c = x - r_nwhere the r_1, ..., r_n are the vertices of the simplex. The matrix T is defined by the condition
T e_j = r_j - r_nwhere e_j is the unit axis vector, e.g, e_2 = [0,1,0,0,...] This implies that T_ij = (r_j - r_n)_i.
For the barycentric transforms, we need to compute the inverse matrix T^-1 and store the vectors r_n for each vertex. These are stacked into the Tinvs returned.
Aliases
-
scipy.spatial._qhull._get_barycentric_transforms