Results 1 to 2 of 2

Math Help - Proof of Rotation Matrix for Sanity Purposes

  1. #1
    Newbie
    Joined
    May 2013
    From
    United States
    Posts
    1

    Application of Rotation Matrix + Understanding ...

    I am trying to apply the rotation matrix about the z-axis (altitude or north) correctly, and want to do a sanity check to make sure I understand it.

    My goal at the end of this, is to take a local point (x, y, z) and transform it to "north local point" (a point with respect to north), call it (east, north, up).

    I used the the rotation across z-axis "Rz" matrix from, where z appears to be altitude or north (axis out of the page).

    Rotation matrix - Wikipedia, the free encyclopedia

    Code:
    theta = 0
    
    %from wiki:
    rotation_matrix_to_north = [cosd(theta) -sind(theta) 0; sind(theta) cosd(theta) 0; 0 0 1]
    
    %take a sample point on the earth, call it local point
    
    xg = 1; yg = 1; zg = 1;
    local_point = [xg; yg; zg]
    
    %now transform that local point with respect to north via the rotation matrix
    
    north_point = rotation_matrix_to_north *  local_point
    However, when I rotate with a theta of 180, my rotation_matrix_to_north equals

    -1 0 0
    0 -1 0
    0 0 1

    And my north_point after the rotation equals

    -1
    -1
    1

    My input or local_point =


    1
    1
    1

    I don't think this makes sense, since I would only expect the zg to be altered; looks like that was the only thing that was not altered.

    Or, maybe it's not supposed to change, since I'm just facing 180 degrees prior to where I was facing, but my vector from my local point to north is still the same, and maybe my x and y only have to change since I now need to "face north"?

    Can someone confirm my understanding...Thanks.
    Last edited by bigman8424; May 12th 2013 at 03:53 PM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Sep 2012
    From
    Australia
    Posts
    3,807
    Thanks
    660

    Re: Proof of Rotation Matrix for Sanity Purposes

    Hey bigman8424.

    If you rotate about the z axis then it means the z value should not change and the result you obtained makes sense.

    If you want the z point altered you need to rotate around something that isn't the z axis.

    To understand this, note that if you rotate a point that lies on the rotation axis, then rotating the axis (and the point) doesn't change any point on the axis. The further the point is away from the axis the more that the point will change after its rotation.

    You need to have a rotation axis that makes sense intuitively for your purpose and use that to perform the rotation.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Angle of rotation and axis of rotation of a 3x3 matrix
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: April 14th 2013, 07:34 AM
  2. Matrix Rotation
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: April 12th 2010, 08:15 PM
  3. Verifying that a matrix is a rotation matrix
    Posted in the Advanced Algebra Forum
    Replies: 5
    Last Post: October 27th 2009, 11:43 AM
  4. 2d rotation matrix...
    Posted in the Trigonometry Forum
    Replies: 0
    Last Post: October 27th 2009, 10:13 AM
  5. Homework purposes.
    Posted in the Math Topics Forum
    Replies: 0
    Last Post: April 22nd 2009, 02:19 AM

Search Tags


/mathhelpforum @mathhelpforum