Version 0.60.0

orth_bases::orth_basis

Creates an orthonormal basis from an input vector.

Signatures

  •   bool orth_basis( vector input, vector& base1, vector& base2, vector& base3 )

Details

The function takes one vector input as input vector and creates a right-handed orthonormal basis from that. The first basis vector is in the direction of the input vector, the other two basis vectors fulfill the orthonormality conditions.

Return value

true if the function succeeded (this is guaranteed to be the case if input is unequal the zero vector), or false otherwise.

Parameters

input

Input vector. This must not be the zero vector.

base1

Returns the first vector of the constructed basis. This is in the direction of the input vector.

base2

Returns the second vector of the constructed basis.

base3

Returns the third vector of the constructed basis.

🗙

Search results for