next up previous contents
Next: 3D Transformation Functions Up: 2D and 3D vector Previous: 2D Matrix Algebra Functions   Contents

3D Rotation Functions

Mat3    rot3(double theta, Vec3 axis)
Returns the matrix representing a rotation by an angle theta (in radians) about a (not necessarily unit) vector axis.

Mat3    rot3_1(Vec3 axis)
An alternative version of the above function in which the angle of roation theta is encoded in the length of the vector axis.

void    rot3_angle_axis(Mat3 m, double *theta, Vec3 * axis)
Sets *theta and *axis to be the angle of rotation and unit vector axis of rotation repectively of the rotation matrix r.

root 2020-01-20