m3sh.linalg.

affine_map#

affine_map(p, q)#

Affine map from points in general position.

Compute matrix \(A\) and vector \(\mathbf{b}\) such that \(A \mathbf{p}_i + \mathbf{b} = \mathbf{q}_i\).

Parameters:
p, qarray_like, shape (n+1, n)

Two sequences of n+1 points in general position. Points are stored as row vectors!

Returns:
Andarray, shape (n, n)

The linear part of the affine map.

bndarray, shape (n,)

The translational part of the affine map.