3D - 2

Breaking 3D Vectors Into Its Parts?

Hi all, For my Software Engineering class, me and my group decided to do a realistic 3D pool game. Right now I am having trouble trying to figure out how to break a vector into it's three parts. I understand the concept of breaking a vector into 2 parts, but I don't see how I can extend it to the 3D - though the concept is the same. With 2D you can use cos and sin to find the ratio's of x and y in regards to a unit circle and then multiply it by the magnitude to get the respective x and y magnitudes. I don't see how you can use this same approach with 3D - as you don't know how much of the magnitude to give to z axis. I have tried looking it up online, but all of the tutorials on the subject seem to just cover 2D Vectors... Any and all help greatly appreciated! Ryan EDIT: I know what a vector is - I need to know how to break it up into 3 seperate vectors corresponding to the x,y, and z axis. Namely - I need to know how to divide the magnitude of the vector into these 3 seperate vectors.

Public Comments

  1. All 3D vectors can be represented by a directed line segment in 3D space R3, which has a start point and an end point. This gives each vector a magnitude (the length of the line segment) and direction (from the start point to the end point). They have a rigorous definition in terms of vector spaces, but this'll do for now. If we take the origin as out starting point we can describe any vector, a, by specifying its end point in cartesian coordinates (x, y, z). So any vector can be described by an ordered 3-tuple (x, y, z) where x, y and z are real numbers. In n dimensional space we could describe any vector by an ordered n-tuple (x1, x2, ... , xn) but we'll stay in 3D. Definition: The position vector of a point A is the vector represented by the line segment from the origin to A, and is written a.
  2. I'm not sure what you're starting with. If you have 3D spherical polar coordinates in (r, theta, phi), then the equations are: x = r * sin(theta) * cos(phi) y = r * sin(theta) * sin(phi) z = r * cos(theta) You can see a diagram to make sure your variable definitions are consistent at: http://electron9.phys.utk.edu/vectors/3dcoordinates.htm
Powered by Yahoo! Answers