I'm new to quaternions and want to use the resulting rotation matrix to translate a point a towards the quaternion given a set distance.

Without using quaternions or matrices I would do something like this:

public static function calcVector(angle:Number, distance:Number = 1):Vector2D {

var vec:Vector2D = new Vector2D();

vec.x = Math.sin(90 - angle) * distance;

vec.y = Math.sin(angle) * distance;

return vec;

}

How do I mimic this functionality using the quaternions resulting rotation matrix as my "angle" parameter?

Assuming the starting point is at (0, 0, 0) and I have a rotation matrix from a quaternion how do I translate the starting point towards the quaternion with a set distance of say 10 units?

I would like to keep everything in the form of vectors, quaternions, and matrices.

Thanks for the help!

**Edited by Koga73, 10 December 2012 - 03:28 PM.**