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

    Transformation Matrix Tool

    Scheduled Pinned Locked Moved Developers' Forum
    19 Posts 6 Posters 909 Views 6 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.
    • Chris FullmerC Offline
      Chris Fullmer
      last edited by

      Hey Martin, this looks great. Each time I dig into Matrices I end up re-writing some code to format the matrix so I can read it in the ruby console. This will save much time I'm sure!

      [Opinion]
      The tutorial seems like a great start. I have to say that one of my big confusions is that it starts by talking about a 1x3 and a 3x3 matrix. While the information is true, it is confusing because SU uses the 4x4 matrix. I think it would be nice if it just jumped right into the 4x4 matrix. OR at least showed a series of 4x4 matrix examples at the end. Maybe it is good to start on the smaller 3x3 matrix to get the main ideas across. But please oh please show math examples with full 4x4 matrices. I still honestly do not understand them (well, I'm close to understanding them, but I was hoping your tutorial would show some more examples to help me see if I'm on the right track).[/Opion]

      And lastly, you mention chapter 15 (which I think is not done yet?), but I wish you would turn the mention of the chapeter in a link. And also at the end you state:

      The translation vector's origin point is unspecified. SketchUp's translation is always relative to the [0,0,0] origin.

      I thinkt hat is wrong inside of Components definition where it uses the def's origin as 0,0,0 - I think. Maybe I should test that again first though.

      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, that is what I have discovered when trying to manipulate the geometry inside a component. I could not figure out how a sub-component's axis (when unlike the model's) affect its transformation (if at all). Gave up and exploded the component to get at its parts. If you figure this out, please let me know:-) Btw, I haven't really had time to follow up on your last effort to help me. Perhaps this weekend.

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

          @chris fullmer said:

          I thinkt hat is wrong inside of Components definition where it uses the def's origin as 0,0,0 - I think. Maybe I should test that again first though.

          Think that might depend. I think that when you open a group/component, SU transforms the co-ordinates to relate to SU origin instead of relative to definition origin.

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

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

            @chris fullmer said:

            I have to say that one of my big confusions is that [the tutorial appendix] starts by talking about a 1x3 and a 3x3 matrix. While the information is true, it is confusing because SU uses the 4x4 matrix.

            What I knew, and should have said, is that there really isn't a 4x4 matrix. If this were first done in an OO world we'd have a transformation object that combined a 3x3 scale/rotate array and a 3d translation vector.

            The new version includes this bit of table art in the intro:

            xf3x3.jpg

            Thanks for helping make this clear.

            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

              I have seen Wt to be other than 1.0

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

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

                @chris fullmer said:

                you state:

                The translation vector's origin point is unspecified. SketchUp's translation is always relative to the [0,0,0] origin.

                I think that is wrong inside of Components definition where it uses the def's origin as 0,0,0

                I dunno. Try these two:

                xfgroup.jpg

                xfinst.jpg

                I'm not positive about SU, but I am positive that the Transformation Matrix hack was worth the effort. At least we can talk about these things.

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

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

                  @thomthom said:

                  I have seen Wt to be other than 1.0

                  I'd love to have an example!

                  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

                    I don't remember exactly where I saw it. But I think Chris came across it recently while working on his Random Rotate and Scale plugin. I belive he'll be able to fill in the details here.

                    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

                      This is the whole story ?TransformationMatrix.png

                      TIG

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

                        @martinrinehart said:

                        I'd love to have an example!

                        Take a component and use a uniform scaling method on it.

                        t = Geom::Transformation.scaling 0.5 my_comp.transform! t

                        They have applied uniform scaling by adjusting the 16th element. HOWEVER this caues problems with faceme components. Try it on one, and then orbit the model. The comonent gets all jumpy. This is a new bug in 7.1. The scaling method has worked the same way in previous version of SU, it is just how SU displays faceme's whose 16th element is not 1 has broke in 7.1. A bug has been filed and I'm begging them to get a fix out for 7.1 and not put it off until 8.0.

                        I'll take a closer look at the new explanataion Martin. I think it looks hopeful that I might get this learned yet!

                        Chris

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

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

                          According to Wikipedia, affine transformations never change Wt so it remains a 1. Perspective transformations do change it.

                          I mention this in hopes that someone who understands will explain it to the rest of us.

                          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

                            Martin, My apologies;-) at third glance, it is illustrated, now that I know what I am looking at:-) Thanks.

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

                              @honoluludesktop said:

                              Martin, My apologies;-)

                              Apologies not needed. Besides, you're the only guy here who has the correct version number on Win XP.

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

                              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