1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Coordinates transformation by rotating at the origin.

  1. Jun 17, 2013 #1
    I want to transform from rectangular coordinates ( xyz) to (x",y",z") rectangular coordinates that is rotated at the origin as show in the attachment. Then I want to transform (x",y",z") rectangular coordinates into Spherical coordinates.

    Attach is the method I use, I want to verify I am doing it correctly. Basically I want to transform the xyz into any position on the SAME ORIGIN as shown in Fig.1. I first rotate along z axis on the xy plane as shown in Fig.2. I rotate clockwise as shown by angle ##\alpha##. I called the new coordinates as (x',y',z') as intermediate coordinates. Then the second step is to rotate along x' axis as shown in Fig. 3 by angle ##\beta## to get the final (x",y",z") coordinates. I also show my work step by step in the drawing attached.

    [PLAIN]http://i43.tinypic.com/2uxwt52.jpg[/PLAIN]

    Then the final step of transforming to Spherical coordinates is by the same method like

    [tex]\hat R=\hat x''(\hat x''\cdot \hat R)+\hat y''(\hat y''\cdot\hat R)+\hat z''(\hat z''\cdot\hat R)[/tex]

    Am I correct?

    Thanks a million.
     
  2. jcsd
  3. Jun 18, 2013 #2

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

  4. Jun 18, 2013 #3

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    These manipulations are much clearer and simpler when put into matrix form.

    See: http://www.cs.brandeis.edu/~cs155/Lecture_07_6.pdf

    This is standard stuff for a lot of computer work with 3-D coordinates.
     
  5. Jun 18, 2013 #4
    Thanks for the information. What topic is this under? I took a quick look at a Linear Algebra text book and I didn't see it.

    Also, Do you have the transformation from one Spherical coordinates to another Spherical coordinates? eg. From (R,θ,∅) to (R',θ',∅')?

    Also, any online calculator for 3D rotation?

    Thanks
     
  6. Jun 18, 2013 #5

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    In general, rotations and translations of coordinates should be addressed under analytic geometry. Matrices are useful in topics besides linear algebra.

    It's not clear to me what the difference is between your two sets of spherical coordinates.
     
  7. Jun 18, 2013 #6
    Can you give a suggestion on a book? I am working through the article you provided to verify.

    I am not a math major, I am using this in Antenna design. The problem I am working on is that the dipole ( which is just like a vector) is situated at the origin but point to some direction. The field it is radiating out is in the ##\hat \theta##' direction RESPECT to the dipole ( as if the dipole is pointing at +z' direction of it's own coordinates (R',##\theta##',##\phi##')). I need to find the direction of the field at a point P in the normal (##R,\theta,\phi##) coordinates.

    Thanks for all your help.

    Alan
     
    Last edited: Jun 18, 2013
  8. Jun 18, 2013 #7
    I am trying to verify my work with the notes you gave. For CCW rotation about the z-axis, it is given:


    [tex]\left( \begin{array} \;x' \\ y' \\ z' \\ 1\end{array}\right)=\left(\begin{array} \;\cos \theta & -\sin\theta & 0 & 0\\ \sin\theta & \cos\theta & 0 & 0\\0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\end{array}\right) \left( \begin{array} \;x \\ y \\ z \\ 1 \end{array}\right)[/tex]

    To conform to the Right Hand notation, I just let ##\cos\theta=\cos (2\pi-\alpha)=\cos\alpha\;## and ##\;\sin\theta=-\sin(2\pi-\alpha)=-\sin\alpha\;## to give:

    [tex]\left( \begin{array} \;x' \\ y' \\ z' \\ 1\end{array}\right)=\left(\begin{array} \;\cos \theta & -\sin\theta & 0 & 0\\ \sin\theta & \cos\theta & 0 & 0\\0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\end{array}\right) \left( \begin{array} \;x \\ y \\ z \\ 1 \end{array}\right)=\left(\begin{array} \;\cos \alpha & \sin\alpha & 0 & 0\\ -\sin\alpha & \cos\alpha & 0 & 0\\0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\end{array}\right)\left( \begin{array} \;x \\ y \\ z \\ 1 \end{array}\right)[/tex]

    This implies ##x'=x\cos\alpha-y\sin\alpha\;## and ## y'=-x\sin\alpha+y\cos\alpha##.
    But if you look at step 1 in my notes in post #1. It is different. I triple checked my work and I am confident I am correct.

    The most important thing is to look at the graph physically. If you rotate about z axis clockwise by ##\alpha##, the y component has to be negative agreeing with my derivation in post #1.

    Please help.
     
    Last edited: Jun 18, 2013
  9. Jun 18, 2013 #8
    Also is

    [tex]\left( \begin{array} \;x' \\ y' \\ z' \\ 1\end{array}\right)=\left(\begin{array} \;\cos \alpha & -\sin\alpha & 0 & 0\\ \sin\alpha & \cos\theta & 0 & 0\\0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\end{array}\right) \left( \begin{array} \;x \\ y \\ z \\ 1 \end{array}\right)[/tex]

    really means


    [tex]\left( \begin{array} \;\hat x' \\ \hat y' \\ \hat z' \\ 1\end{array}\right)=\left(\begin{array} \;\cos \alpha & -\sin\alpha & 0 & 0\\ \sin\alpha & \cos\theta & 0 & 0\\0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\end{array}\right) \left( \begin{array} \;\hat x \\ \hat y \\ \hat z \\ 1 \end{array}\right)[/tex]

    As this is vector translations.

    Also, why do we have the "1" inserted in to make it a 4X4 instead 3X3 array for calculation? I try eliminating the "1" and calculate as 3X3 array and it gave the same result.


    [tex]\left( \begin{array} \;\hat x' \\ \hat y' \\ \hat z' \end{array}\right)=\left(\begin{array} \;\cos \alpha & -\sin\alpha & 0 \\ \sin\alpha & \cos\theta & 0 \\0 & 0 & 1 \end{array}\right) \left( \begin{array} \;\hat x \\ \hat y \\ \hat z \end{array}\right)[/tex]

    Thanks
     
  10. Jun 18, 2013 #9

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    The '1' in the lower right hand cell of the transformation matrix is there in order to make what is called an 'affine transformation'. More explanations are given here:

    http://en.wikipedia.org/wiki/Cartesian_coordinate_system

    I didn't check your OP too closely. The positive rotations in coordinate transformation generally follow the right hand rule. Check your assumptions to see if they are also right-handed.

    In the right hand convention, the following cross products give a positive result:

    i x j = k
    j x k = i
    k x j = i

    where i, j, k are the three unit vectors for a cartesian coordinate system.
     
  11. Jun 18, 2013 #10
    Thanks for your time helping me repeatedly.

    Before today, I don't even know this is a big topics. I derived my OP just from dot products. In my example as shown in Fig.2, I used Left Hand rotation ( notation) for not knowing any better. To conform to the Right Hand notation, I just let ##\cos\theta=\cos (2\pi-\alpha)=\cos\alpha\;## and ##\;\sin\theta=-\sin(2\pi-\alpha)=-\sin\alpha\;## to give:

    [tex]\left( \begin{array} \;x' \\ y' \\ z' \\ 1\end{array}\right)=\left(\begin{array} \;\cos \theta & -\sin\theta & 0 & 0\\ \sin\theta & \cos\theta & 0 & 0\\0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\end{array}\right) \left( \begin{array} \;x \\ y \\ z \\ 1 \end{array}\right)=\left(\begin{array} \;\cos \alpha & \sin\alpha & 0 & 0\\ -\sin\alpha & \cos\alpha & 0 & 0\\0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\end{array}\right)\left( \begin{array} \;x \\ y \\ z \\ 1 \end{array}\right)[/tex]

    This implies ##x'=x\cos\alpha-y\sin\alpha\;## and ## y'=-x\sin\alpha+y\cos\alpha##.

    From looking at Fig.2 in my original drawing, I just cannot agree with the outcome. The most important thing is to look at the graph physically. If you rotate about z axis clockwise by ##\alpha##, the y component of x' has to be negative agreeing with my derivation in post #1. Also, both x and y component of y' have to be both positive as ##\hat y'## is in the first quadrant on the xy plane.

    Thanks

    Alan
     
    Last edited: Jun 19, 2013
  12. Jun 18, 2013 #11

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    A basic property of even functions is that f(-x) = f(x), while for odd functions f(-x) = -f(x).

    cos(x) is an even function, while sin(x) is an odd function. A check of the graph of sin and cos confirms this.
     
  13. Jun 18, 2013 #12
    I just make a big update on my post #7 and #10 to transform my LH notion to RH notion by letting ##\theta =2\pi-\alpha##. And I went through the derivation to show it is NOT agreeing with my OP.
     
    Last edited: Jun 19, 2013
  14. Jun 19, 2013 #13
    Anyone?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Coordinates transformation by rotating at the origin.
Loading...