sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Matrix Multiplication Explained

    Scheduled Pinned Locked Moved Developers' Forum
    10 Posts 5 Posters 697 Views 5 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.
    • M Offline
      MartinRinehart
      last edited by

      I've written another appendix for the tutorial. It explains matrix multiplication. Hopefully, this explanation is a lot clearer than most of what you find if you search the web for this topic. It answers that burning question:

      Why isn't matrix multiplication commutative?

      I've also made some improvements to the "how does the transformation matrix work" appendix.

      This board doesn't permit .html files as attachments. Change the .txt extension back to .html and open either in your favorite browser.


      Matrix Multiplication - change .txt to .html


      Transformation Matrix - change .txt to .html

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

      1 Reply Last reply Reply Quote 0
      • R Offline
        remus
        last edited by

        Nice explanation, bit programming orientated in my opinion but shouldnt cause any problems given the target audience. If i was being pedantic, id also say it doesnt really explain why matrix multiplication is non-commutative, rather it demonstrates that it is non-commutative (probably a good thing though, as id guess the answer is largely irrelevant to the typical sketchup scripter and would add a great deal of complexity.)

        http://remusrendering.wordpress.com/

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

          Saved your post for a later day:-) Thanks.

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

            @remus said:

            as id guess the answer [why not commutative?] is largely irrelevant to the typical sketchup scripter and would add a great deal of complexity.)

            I'd guess that the non-commutative part bites everyone who codes with transformations. Let's see, is that rotation * scale or ... It's got me more than once.

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

            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              @martinrinehart said:

              @remus said:

              as id guess the answer [why not commutative?] is largely irrelevant to the typical sketchup scripter and would add a great deal of complexity.)

              I'd guess that the non-commutative part bites everyone who codes with transformations. Let's see, is that rotation * scale or ... It's got me more than once.

              "non-commutative" ❓

              Thomas Thomassen — SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • R Offline
                remus
                last edited by

                Sorry, poor wording on my part. I meant why matrix multiplication is non-commutative probably isnt important to most scripters, whereas the fact that it is non-commutative is clearly very important.

                Thom, commutativity is the property that "order doesnt matter", for example 23 = 32 and 4+5 = 5+4, but if youve got 2 matrices A and B, AB != BA. Multiplication and addition are said to be commutative and matrix multiplication is said to be non-commutative.

                http://remusrendering.wordpress.com/

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  Ah yea - I've been puzzled by that. Why a scale * rotate isn't the same as rotate * scale.

                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 Reply Last reply Reply Quote 0
                  • TIGT Offline
                    TIG Moderator
                    last edited by

                    But that is the same as doing it manually ?

                    TIG

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

                      @tig said:

                      But that is the same as doing it manually ?

                      What that is "that"?

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

                      1 Reply Last reply Reply Quote 0
                      • TIGT Offline
                        TIG Moderator
                        last edited by

                        That 'that' is manually rotating about a point and then scaling in a certain axis often gives quite different results from scaling in a certain axis then rotating about the same point 😕
                        That is that ! 😉

                        TIG

                        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