vle-vector-getucs


(vle-vector-getucs  normal)

This function returns the list of u-axis and v-axis for the given normal vector.

Arguments

normal  a 2d or 3d vector list

Return

'((uX uY uZ) (vX vY vZ))  always a list of 2 3d vectors, representing the x-axis and y-axis

Example

(setq vec '(2 0 0))
(vle-vector-getucs vec)
((0.0 1.0 0.0) (0.0 0.0 1.0)

(setq vec '(2 2 1))
(vle-vector-getucs vec)
((-0.707106781186547 0.707106781186547 0.0) (-0.235702260395516 -0.235702260395516 0.942809041582063))

Remarks

input vector must not be unit-length (non-normalised vectors are allowed);
returned X and Y axis vectors are always normalised (1-unit length)



©  Bricsys NV. All rights reserved.