Results 1 to 6 of 6

Math Help - Angle from 2x2 rotation matrix

  1. #1
    Junior Member
    Joined
    Nov 2009
    Posts
    29

    Angle from 2x2 rotation matrix

    Hy, I need to calculate angle from 2x2 rotation matrix. How exactly i can do that?
    Thank you, for help.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor undefined's Avatar
    Joined
    Mar 2010
    From
    Chicago
    Posts
    2,340
    Awards
    1
    Quote Originally Posted by PJani View Post
    Hy, I need to calculate angle from 2x2 rotation matrix. How exactly i can do that?
    Thank you, for help.
    You mean this kind of rotation matrix?

    \begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \\ \end{bmatrix}

    Rotation matrix - Wikipedia, the free encyclopedia

    You can derive the rotation matrix by considering what (1,0) and (0,1) map to when rotated by angle theta.

    If you have a matrix of that form and need to find theta, you can do so using inverse trig functions.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Nov 2009
    Posts
    29
    Jep this form i mean.

    This will look weird but i just want to get sure its correct.
    \begin{bmatrix} acos(\cos \theta) & asin(--\sin \theta) \\ asin(\sin \theta) & acos(\cos \theta) \\ \end{bmatrix}

    and all elements must be the same if i am not mistaking.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor undefined's Avatar
    Joined
    Mar 2010
    From
    Chicago
    Posts
    2,340
    Awards
    1
    Quote Originally Posted by PJani View Post
    Jep this form i mean.

    This will look weird but i just want to get sure its correct.
    \begin{bmatrix} acos(\cos \theta) & asin(--\sin \theta) \\ asin(\sin \theta) & acos(\cos \theta) \\ \end{bmatrix}

    and all elements must be the same if i am not mistaking.
    Sorry I don't know what you mean. Is the matrix you wrote part of the problem, or is it your part of your answer? Would you be able to post the full question?

    In general you should be careful about the domain and range of the inverse trig functions.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Junior Member
    Joined
    Nov 2009
    Posts
    29
    It is part of my answer.
    hmm full question...
    ...Actually i am working on 2D game. And for debug display its hard to read 2x2 transformation matrix in realtime. So i only want to get angle and display it.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor undefined's Avatar
    Joined
    Mar 2010
    From
    Chicago
    Posts
    2,340
    Awards
    1
    Quote Originally Posted by PJani View Post
    It is part of my answer.
    hmm full question...
    ...Actually i am working on 2D game. And for debug display its hard to read 2x2 transformation matrix in realtime. So i only want to get angle and display it.
    Okay, it was a little confusing that you wrote it in matrix form, but I see what you're saying; mainly I would just be careful about domain and range, for example asin(sin(pi/6)) will return pi/6, but asin(sin(5pi/6)) will also return pi/6.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 0
    Last Post: January 14th 2012, 09:02 PM
  2. Replies: 3
    Last Post: May 29th 2011, 07:48 AM
  3. Up vector and angle to rotation matrix
    Posted in the Geometry Forum
    Replies: 0
    Last Post: March 16th 2010, 07:21 AM
  4. Angle of rotation in a matrix
    Posted in the Advanced Algebra Forum
    Replies: 4
    Last Post: February 6th 2009, 02:23 AM
  5. Vector Rotation 3D - determine correct angle
    Posted in the Calculus Forum
    Replies: 1
    Last Post: January 18th 2008, 07:32 AM

Search Tags


/mathhelpforum @mathhelpforum