🔒 Locked
Vector from Angle
Advertisement
Original Post
Of course. You don''t even actually need the angle, but simple the point (since that point essentially contains the angle within it). In fact, that point *is* the vector itself, starting from the origin. If you then want a unit vector, just normalize that.
The Artist Formerly Known as CmndrM
http://chaos.webhop.org
The Artist Formerly Known as CmndrM
http://chaos.webhop.org
Think about the parametric equation of a circle...(looking DOWN the Y acis)
x = a + (r * sin(theta) )
z = b + (r * cos(theta) )
where x and z are your vector points (in 2D) and a and b are the position of the point, or 0 and 0 if at the origin and r is the radius of the circle.
you have to picture 0 degrees as "North" or UP, or maybe (0, 1) as a 2D vector in the XZ plane. Then, imagine rotating a vector by hand, or drawing it on paper, about the origin by whatever angle. The new position of the end of the vector is the x and z value computed above.
This example rotates around the Y axis....it can be used in exactly the same way with a little alteration for rotation about all 3 axis....everything is just done in 2D steps.
Hope that helps...and hope I havn''t made a stoopid mistake! ;o)
see how you get on,
GCoder
x = a + (r * sin(theta) )
z = b + (r * cos(theta) )
where x and z are your vector points (in 2D) and a and b are the position of the point, or 0 and 0 if at the origin and r is the radius of the circle.
you have to picture 0 degrees as "North" or UP, or maybe (0, 1) as a 2D vector in the XZ plane. Then, imagine rotating a vector by hand, or drawing it on paper, about the origin by whatever angle. The new position of the end of the vector is the x and z value computed above.
This example rotates around the Y axis....it can be used in exactly the same way with a little alteration for rotation about all 3 axis....everything is just done in 2D steps.
Hope that helps...and hope I havn''t made a stoopid mistake! ;o)
see how you get on,
GCoder
The AP is correct. I mispoke, as there really is no "starting point" per se of a vector. However, there *is* one using the geometric interpretation of a vector, and that is what I meant by that.
The Artist Formerly Known as CmndrM
http://chaos.webhop.org
The Artist Formerly Known as CmndrM
http://chaos.webhop.org
No. It''s not. Using the standard use of the angle theta (measured counterclockwise), y = sin theta, not -sin.
The Artist Formerly Known as CmndrM
http://chaos.webhop.org
The Artist Formerly Known as CmndrM
http://chaos.webhop.org
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement