Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Algorithms
  4. Rotation Matrix

Rotation Matrix

Scheduled Pinned Locked Moved Algorithms
questiongraphicshelp
6 Posts 5 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wajih boukaram
    wrote on last edited by
    #1

    Hi I have a bit of a math problem (related to graphics) If i have three vectors and an origin representing an orthonormal system, how do i get the rotation matrix that would rotate the regular orthonormal system to this new one? (by regular i mean at O(0,0,0) through i(1,0,0), j(0,1,0), and k(0,0,1) ) thanks for your time :)

    C P S F 4 Replies Last reply
    0
    • W wajih boukaram

      Hi I have a bit of a math problem (related to graphics) If i have three vectors and an origin representing an orthonormal system, how do i get the rotation matrix that would rotate the regular orthonormal system to this new one? (by regular i mean at O(0,0,0) through i(1,0,0), j(0,1,0), and k(0,0,1) ) thanks for your time :)

      C Offline
      C Offline
      cp9876
      wrote on last edited by
      #2

      The columns of the matrix are the orthonormal vectors of the new basis. So if the transformation is i->V1 j->V2 k->V3 where {V1,V2,V3} are an orthonormal set, then the matrix R={V1,V2,V3} where V1 is the first column etc, is want you want. Check by using R to transform each of the original basis vectors i,j,k and check they end up in the right place.


      Peter "Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."

      1 Reply Last reply
      0
      • W wajih boukaram

        Hi I have a bit of a math problem (related to graphics) If i have three vectors and an origin representing an orthonormal system, how do i get the rotation matrix that would rotate the regular orthonormal system to this new one? (by regular i mean at O(0,0,0) through i(1,0,0), j(0,1,0), and k(0,0,1) ) thanks for your time :)

        P Offline
        P Offline
        Paul Conrad
        wrote on last edited by
        #3

        Add Mathworld[^] to your bookmark. Been some time since I've done matrices :->

        1 Reply Last reply
        0
        • W wajih boukaram

          Hi I have a bit of a math problem (related to graphics) If i have three vectors and an origin representing an orthonormal system, how do i get the rotation matrix that would rotate the regular orthonormal system to this new one? (by regular i mean at O(0,0,0) through i(1,0,0), j(0,1,0), and k(0,0,1) ) thanks for your time :)

          S Offline
          S Offline
          spin vector
          wrote on last edited by
          #4

          You need to apply a unitary matrix transform to your coordinates (http://en.wikipedia.org/wiki/Unitary\_matrix). that is, if you have a point in R3 represented by the vector v_o, then v = U v_o is a rotated coordinate. You need a unitary matrix so that no coordinate in the new basis is scaled with respect to the original basis. Concretely, if you start with an orthonormal system you want to end with an orthonormal system. See rotation matrices on wikipedia: http://en.wikipedia.org/wiki/Rotation\_matrix for more details of making the appropriate R3 rotation matrix. good luck

          C 1 Reply Last reply
          0
          • S spin vector

            You need to apply a unitary matrix transform to your coordinates (http://en.wikipedia.org/wiki/Unitary\_matrix). that is, if you have a point in R3 represented by the vector v_o, then v = U v_o is a rotated coordinate. You need a unitary matrix so that no coordinate in the new basis is scaled with respect to the original basis. Concretely, if you start with an orthonormal system you want to end with an orthonormal system. See rotation matrices on wikipedia: http://en.wikipedia.org/wiki/Rotation\_matrix for more details of making the appropriate R3 rotation matrix. good luck

            C Offline
            C Offline
            cp9876
            wrote on last edited by
            #5

            Why are you making this complicated? If he has the three new basis vectors then these are simply the columns of the transformation matrix. Simple matrix multiplication shows that the vector (1,0,0) goes to a vector equal to the first column of the matrix, (0,1,0) to the second etc. So if he has these three vectors (normalized) then he has his matrix.


            Peter "Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."

            1 Reply Last reply
            0
            • W wajih boukaram

              Hi I have a bit of a math problem (related to graphics) If i have three vectors and an origin representing an orthonormal system, how do i get the rotation matrix that would rotate the regular orthonormal system to this new one? (by regular i mean at O(0,0,0) through i(1,0,0), j(0,1,0), and k(0,0,1) ) thanks for your time :)

              F Offline
              F Offline
              Frank Kerrigan
              wrote on last edited by
              #6

              Matrix Rotation Rotation of the plane at the origin by angle @ has the following form x |--> R@x where R@ is the matrix ( cos@ -sin@ ) ( sin@ cos@ ) This is a 2 x 2 matrix on for a unit square (0,0), (0,1) , (1,0) and (1,1).

              Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture) http://www.frankkerrigan.com/[^]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups