Thread: How do I rotate a matrix 45 degrees?

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    204

    How do I rotate a matrix 45 degrees?

    Can someone give me some ideas? Thanks.

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    3

    Rotating by 45

    I assume you are talking of rotating a vector or a set of points in a plane or space by 45 degrees.

    To achieve this multiply the matrix by

    cos(pi/4) sin(pi/4)

    -sin(pi/4) cos(pi/4)

    Where pi/4 is the radian equiv of 45 degrees. pi = 3.14169

    The above method will work for a 2x2 matrix.

  3. #3
    Registered User
    Join Date
    Jun 2004
    Posts
    722
    Quote Originally Posted by Aamrun
    I assume you are talking of rotating a vector or a set of points in a plane or space by 45 degrees.

    To achieve this multiply the matrix by

    cos(pi/4) sin(pi/4)

    -sin(pi/4) cos(pi/4)

    Where pi/4 is the radian equiv of 45 degrees. pi = 3.14169

    The above method will work for a 2x2 matrix.
    Nops.. It'll work for a 3x3 matrix representing a 2d transformation, or state

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C - access violation
    By uber in forum C Programming
    Replies: 2
    Last Post: 07-08-2009, 01:30 PM
  2. Matrix Help
    By HelpmeMark in forum C++ Programming
    Replies: 27
    Last Post: 03-06-2008, 05:57 PM
  3. Temperature conversion...
    By Onslaught in forum C Programming
    Replies: 3
    Last Post: 10-21-2005, 01:15 PM
  4. What is a matrix's purpose in OpenGL
    By jimboob in forum Game Programming
    Replies: 5
    Last Post: 11-14-2004, 12:19 AM