AffineTransform

class tri3d.geometry.AffineTransform(mat)

Linear transformation defined by a matrix.

\(x \mapsto M \begin{bmatrix}x \\ 1\end{bmatrix}\)

Parameters:

mat (ndarray)

property single: bool

Whether this is a single transformation or a batch.

apply(x)

Apply transformation to given point or array of points.

The broadcasting rules between transformations and their inputs are as follows:

transform

input

output

brodcast

[]

[3]

[3]

single mapping

[]

[n,3]

[n,3]

broadcast transform

[n]

[3]

[n,3]

broadcst input

[n]

[n]

[n,3]

one-to-one mapping

Return type:

ndarray

inv()

Return inverse transformation.

Return type:

Self