Syntax

[~, M] = sw_mirror(n)

[Vp, M] = sw_mirror(n,V)

Description

[~, M] = sw_mirror(n) generates the transformation matrix corresponding to a mirror plane perpendicular to n.

[Vp, M] = sw_mirror(n,V) mirrors the vectors in V.

To mirror any column vector use the following:

Vp = M * V

To apply mirror plane operation on tensors ( matrices) use the following command:

Ap = M * A * M'

Input Arguments

n
3D Row vector, normal to the mirror plane.
V
Matrix of 3D vectors, dimensions are .

Output Arguments

Vp
Mirrored vectors in a matrix with dimensions of .
mirM
Matrix of the mirror transformation, dimensions are .

See Also

sw_rot