sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Transformation

    Scheduled Pinned Locked Moved Developers' Forum
    9 Posts 3 Posters 298 Views 3 Watching
    Loading More Posts
    • 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.
    • honoluludesktopH Offline
      honoluludesktop
      last edited by

      Where can I get information as to the meaning of each variable in a SU components transformation matrix? Starting at [0], I think that [9], [10], and [11] are the component's origin.x, origin.y, and origin.z coordinates in the model. Where can I find a lay-person's description of, or can someone tell me what the other values stand for?

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        Yeah, Martin just recently put together something of a tutorial on this. Maybe in the last 3 weeks and posted it here. Search for it and it should help.

        But essentially you got the location info correct. The last element in the array is a global multiplier for elements 0,1,2,4,5,6,8,9,10. It should be left at 1, but it gets changed sometimes unfortunately.

        Then those 9 listed elements above are the rotation and scale of the transformation. 0,1,2 are the x vector, 4,5,6 are the y vector and 8,9,10 are the z vector.

        But Martin explains it much nicer than that, if you can find the link.

        Chris

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • honoluludesktopH Offline
          honoluludesktop
          last edited by

          Thanks Chris, my guess for the first 9 elements was that, and I will look for Martin's post. Not good being mathematically imparted, however if you ask me to draw πŸ™‚

          as follows (doing from memory, hope it's right):

          [0] [1] [2] [12]
          [3] [4] [5] [13]
          [6] [7] [8] [14]
          [9][10][11][15]

          where 0, 1, 2 are the x vector, 4, 5, 6 are the y vector, 6, 7, 8 the z vector, 9, 10, 11 the component origin in the model, 12, 13, 14 are user variables, and 15 is essentailly 1. Can I actually put stuff in 12, 13, and 14?

          1 Reply Last reply Reply Quote 0
          • M Offline
            MartinRinehart
            last edited by

            http://www.martinrinehart.com/models/tutorial/tutorial_t.html

            Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

            1 Reply Last reply Reply Quote 0
            • Chris FullmerC Offline
              Chris Fullmer
              last edited by

              Honolulu, I think the matrix should look like this:

              [0][1][2][3]
              [4][5][6][7]
              [8][9][10][11]
              [12][13][14][15]

              I think it lines up in rows not columns. And for sure elements 0,4,8 are the starts (the x length) of each axial vector (not elements 0 3 and 6 like you have shown).

              Chris

              Lately you've been tan, suspicious for the winter.
              All my Plugins I've written

              1 Reply Last reply Reply Quote 0
              • honoluludesktopH Offline
                honoluludesktop
                last edited by

                Chris, Opps, you are right. Thanks.

                Martin, Thanks for the link.

                1 Reply Last reply Reply Quote 0
                • M Offline
                  MartinRinehart
                  last edited by

                  @chris fullmer said:

                  [0][1][2][3]
                  [4][5][6][7]
                  [8][9][10][11]
                  [12][13][14][15]

                  Yes. OpenGL and SketchUp use row-major order. Microsoft's DirectX (and Fortran!) use column-major order.

                  @honoluludesktop said:

                  [0] [1] [2] [12]
                  [3] [4] [5] [13]
                  [6] [7] [8] [14]
                  [9][10][11][15]

                  Odd mistake, that. In that order you can extract the 3x3 array from the 4x4 array in almost no clocks. Any idea where that might have come from, Honolulu?

                  Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

                  1 Reply Last reply Reply Quote 0
                  • honoluludesktopH Offline
                    honoluludesktop
                    last edited by

                    I was drawing the matrix from memory of a screen dump the night before and thought elements [9], [10], and [11] were the component's origin. So I tried to make that fit the illustration of your matrix, and erroneously guessed at the order:-)

                    1 Reply Last reply Reply Quote 0
                    • honoluludesktopH Offline
                      honoluludesktop
                      last edited by

                      I was drawing the matrix from memory of a screen dump the night before and thought elements [9], [10], and [11] were the component's origin. So I tried to make that fit the illustration of your matrix, and erroneously guessed at the order:-)

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      Buy SketchPlus
                      Buy SUbD
                      Buy WrapR
                      Buy eBook
                      Buy Modelur
                      Buy Vertex Tools
                      Buy SketchCuisine
                      Buy FormFonts

                      Advertisement