Quaternion Function Reference

orthonormal_basis

Construct orthonormal basis

Syntax

B = orthonormal_basis(V, W)

Description

Creates an orthonormal basis from a pure quaternion V, and an optional pure quaternion W, which need not be perpendicular to V, but must not be parallel.

The result is represented as a 3×3 orthogonal matrix, which may be complex if V and/or W are complex pure quaternions.

Examples

>> orthonormal_basis(qi + qj, qk + qi)

ans =

    0.7071    0.7071         0
    0.5774   -0.5774   -0.5774
   -0.4082    0.4082   -0.8165

>> ans * ans'

ans =

    1.0000    0.0000   -0.0000
    0.0000    1.0000   -0.0000
   -0.0000   -0.0000    1.0000

See Also

QTFM function: change_basis

© 2008-2013 Stephen J. Sangwine and Nicolas Le Bihan

License terms.