Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Rotating vector x around vector z

  1. Aug 12, 2003 #1

    ddr

    User Avatar

    Is this how it should be done (rotating vector x around vector z for alpha degrees):
    assumes |x|*|z|<>0
    xonz=(scalar_product(z,x)/(|x|*|z|))*z;
    y=x-xonz;
    assumes |x|<>0
    result=cos(alpha)*x+sin(aplha)*(|y|/|x|)*y;
     
  2. jcsd
  3. Aug 12, 2003 #2

    ddr

    User Avatar

    correction

    actually y=croos_vector(z,(x-xonz))/|x-xonz|^2
     
  4. Aug 12, 2003 #3
    Not quite. I should say:

    answer = xonz + y cos [alpha] + z/|z| X y sin [alpha].

    Where X means vector product. And y = x - xonz.

    Note: There should be a simpler form to this. Try yourself, please!
     
    Last edited: Aug 12, 2003
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Rotating vector x around vector z
  1. Vector rotation (Replies: 1)

  2. Vector rotation (Replies: 6)

  3. Vector z-component (Replies: 6)

  4. Moving Vectors Around (Replies: 7)

Loading...