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

Rotating Spherical pieces around a common axis

Scheduled Pinned Locked Moved SketchUp Discussions
sketchup
20 Posts 7 Posters 2.3k Views 7 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.
  • G Offline
    Gaieus
    last edited by 19 May 2011, 06:52

    Something like this?


    rotate.png


    rotate.skp

    Gai...

    1 Reply Last reply Reply Quote 0
    • W Offline
      wozabee
      last edited by 19 May 2011, 10:57

      Yep! just like that... except imagine you have about a dozen pieces, capable of being moved about on the surface of the sphere - on 3 tiered levels above the sperical base surface - in both the X, Y axis. and rotated about on the Y, relative to wherever they are on the surface.

      we're talking in small increments too. Between just 1 to 12 degrees at a time. Doing it 1 axis at a time - as you've kindly illustrated - is possible, but becomes tedious when each of 12 pieces x 3 moves x about 40 or so different combinations of relative positions... that's near 1500 stages in the end.

      In the end, I imagined there must be a way to use something like the dynamic tools "grab hand" to touch then grab each component, having them each "rigged" to slide about the core of the sphere following the surface in the x-y & z... somehow.

      Cheers,

      Woz

      1 Reply Last reply Reply Quote 0
      • T Offline
        TIG Moderator
        last edited by 19 May 2011, 11:16

        Look for the FreeRotate plugin - that might have something useful ??

        TIG

        1 Reply Last reply Reply Quote 0
        • W Offline
          wozabee
          last edited by 19 May 2011, 11:45

          Thanks Tig,

          will investigate it & get back.
          ...is that a Thylacine? ...helped make an animatronic one years ago for a Cascade Lager Commercial in Oz.

          1 Reply Last reply Reply Quote 0
          • T Offline
            TIG Moderator
            last edited by 19 May 2011, 12:55

            @wozabee said:

            Thanks Tig,

            will investigate it & get back.
            ...is that a Thylacine? ...helped make an animatronic one years ago for a Cascade Lager Commercial in Oz.

            No it's just a mangy Tig[er]...
            No Tasmanian Devils round here!

            TIG

            1 Reply Last reply Reply Quote 0
            • S Offline
              SketchUpNoobie
              last edited by 19 May 2011, 13:03

              @tig said:

              No Tasmanian Devils round here!

              That's debatable . . . πŸ˜†

              --

              SketchUpNoobie: the complete noob in all things SketchUp.

              1 Reply Last reply Reply Quote 0
              • B Offline
                Box
                last edited by 19 May 2011, 13:25

                Just in the interests of clarity, the Thylacine was a Tasmanian Tiger not a Tasmanian Devil. πŸ˜„

                and just a thought on the thread, Is there not some way to use the "Glue to" feature so the pieces could slide around on the surface of an invisible globe.

                1 Reply Last reply Reply Quote 0
                • T Offline
                  TIG Moderator
                  last edited by 19 May 2011, 16:03

                  @box said:

                  Just in the interests of clarity, the Thylacine was a Tasmanian Tiger not a Tasmanian Devil. πŸ˜„
                  and just a thought on the thread, Is there not some way to use the "Glue to" feature so the pieces could slide around on the surface of an invisible globe.
                  I knew it was 'Tasmanian' at least! πŸ˜’

                  The glue_to property only applies to one face at a time so you can't [easily] glue it to the face[t]s forming the surface of the sphere...

                  However, you started me thinking...
                  ...
                  You add a selection-observer to the model that spots for a type of component-instance with a particular attribute being selected.
                  That attributed component-instance, is to glue to any face[t] in a surface that is under it.
                  Whenever the observer fires it runs a raytest from the instance's insertion point [0,0,0] transformed to match the instance's transformation [its underside-center] ... and getting the ray's vector as the [0,0,-1] transformed to match the instance's transformation]... and if it finds a face [or edge with a face... then it uses that face[t] as the instances 'glue_to' face...
                  It could be further enhanced to link the instance and the face[t]s of a selected surface only so that the instance only sticks to those... πŸ€“

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    TIG Moderator
                    last edited by 19 May 2011, 16:15

                    As you want the globe to be invisible it could be difficult.
                    An instance could be give an anchor-point [the globe's center] and a radius.
                    Then whenever that type of attributed instance is selected the selection observer checks its location relative to the anchor and if the distance is not the radius it transforms the instance until it is, the vector for the translation transformation is easily got from the instances location and the anchor, adjusted so its length = radius...
                    Now we have an instance that is always 'radius' away from 'anchor'.
                    To ensure that it faces anchor properly as it is moved we also need to transform the instance about its z_axis so it matches the anchor>>>instance vector...
                    To ensure that the instance is correctly rotated around this anchor>>>instance vector we'd need something to establish that - probably something that uses the sphere's axis to ensure the instance doesn't get hopelessly spun around as we go...
                    So... it's not impossible then... just very awkward!! πŸ˜’

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      Box
                      last edited by 19 May 2011, 16:31

                      That's easy for you to say Tig 😲

                      1 Reply Last reply Reply Quote 0
                      • mitcorbM Offline
                        mitcorb
                        last edited by 19 May 2011, 18:05

                        I get the gist of the conversation, and thought I would offer this simplistic suggestion, once all of the heavy stuff is perfected: Maybe utilize custom transparent materials/textures, but extremely faint?
                        Or, not relevant.

                        I take the slow, deliberate approach in my aimless wandering.

                        1 Reply Last reply Reply Quote 0
                        • jeff hammondJ Offline
                          jeff hammond
                          last edited by 19 May 2011, 18:12

                          here's a roughed out dynamic component..

                          globe_plates.skp

                          this one just has random degress between -90,90 on the x and z axis..
                          it's messed up somewhere as one of the axis snaps back to the original position after the animation.

                          dotdotdot

                          1 Reply Last reply Reply Quote 0
                          • W Offline
                            wozabee
                            last edited by 19 May 2011, 21:31

                            WOW!
                            Thanks Jeff!
                            I think, using the line you're going down, the interact tool might be set for just a pre-set number of degrees "plate" rotation per click (say, 2 degrees or so). The trick would be - and I'm not yet familiar with dynamic components, or scripting yet to know if this is possible - holding down another key (say, one of the Left/Right, or Up/Down keys) to decide which on axis, and direction, the touched plate will move. Maybe holding another key (maybe the left "[" and right "]" keys) would cause the plate to rotate (2 degrees or so, again) in it's relative z axis to where it's sitting.

                            I think this might streamline things enormously... if possible.

                            Hmmm...
                            I'm getting excited now!
                            all the possibilities!

                            1 Reply Last reply Reply Quote 0
                            • W Offline
                              wozabee
                              last edited by 21 May 2011, 10:31

                              @unknownuser said:

                              here's a roughed out dynamic component..

                              [attachment=0:coswjkjp]<!-- ia0 -->globe_plates.skp<!-- ia0 -->[/attachment:coswjkjp]

                              this one just has random degress between -90,90 on the x and z axis..
                              it's messed up somewhere as one of the axis snaps back to the original position after the animation.

                              I'm only now just beginning to look at dynamic components. Trying to adjust the parameters of your model:
                              ANIMATE("rotx", RANDBETWEEN(-90,90)); ANIMATE("rotz", RANDBETWEEN(-90,90))

                              and have so far managed only to reduce the degrees that it ranomly moves the comonents by. Trying anything else with the expressions just has it doing a syntax error.

                              Would love to at least learn how to get your plates to just move 1 set number of degrees increment with each click, THEN find how to tell it which direction 9+ or -) to go, with perhaps a keystroke. Then maybe work out some combination to tell them either +x, -x, +y,-Y, per click...

                              Can't find any "easy-to-understand" info on how do do much with 'Rotx", Rotz" , etc, online though.

                              Anyone have suggestions?

                              1 Reply Last reply Reply Quote 0
                              • W Offline
                                wozabee
                                last edited by 1 Jun 2011, 04:34

                                Hi Tig,
                                have been looking at Kwok's "Key rotate" plug-in.
                                (and he's nicely tolerated my naivety in Ruby...)
                                It certainly looks like the most promising place to start.
                                Just hover my cursor over each component, then rotate each axis with the L-R/Up-down arrows etc.
                                Have so far managed to change it so that I get my desired 2 to 5 degrees component rotation per click.
                                The trick now is how to tell it to rotate each component around the assigned component axis instead of the general center of the component.

                                I'm now slowly wading through everything on Ruby online, dusting off my poor brain's cobwebs (being a Film SFX designer for 30 years, I left the computer biz way back when we hand-made things with Z80's!).

                                looking at this bit at the moment:

                                pt = e.bounds.center

                                Assuming this is the critical bit, I've yet to find out how to change it to refer it to the component's assigned axis instead.

                                Any help would be mega-fantastic. But this is a great learning experience at any rate.Cheers again,

                                Woz

                                @tig said:

                                As you want the globe to be invisible it could be difficult.
                                An instance could be give an anchor-point [the globe's center] and a radius.
                                Then whenever that type of attributed instance is selected the selection observer checks its location relative to the anchor and if the distance is not the radius it transforms the instance until it is, the vector for the translation transformation is easily got from the instances location and the anchor, adjusted so its length = radius...
                                Now we have an instance that is always 'radius' away from 'anchor'.
                                To ensure that it faces anchor properly as it is moved we also need to transform the instance about its z_axis so it matches the anchor>>>instance vector...
                                To ensure that the instance is correctly rotated around this anchor>>>instance vector we'd need something to establish that - probably something that uses the sphere's axis to ensure the instance doesn't get hopelessly spun around as we go...
                                So... it's not impossible then... just very awkward!! πŸ˜’

                                1 Reply Last reply Reply Quote 0
                                • W Offline
                                  wozabee
                                  last edited by 1 Jun 2011, 04:51

                                  ...ooh, forgot to mention...

                                  I've set the Component Axis for each part to the same arbitrary point in space. made a little "gyroscope" looking thingy at the center of the shells to line up all of their centers with.

                                  Woz.

                                  1 Reply Last reply Reply Quote 0
                                  • W Offline
                                    wozabee
                                    last edited by 1 Jun 2011, 05:23

                                    BTW, here's the link to Kwok's "Key rotate" plug-in:

                                    http://forums.sketchucation.com/viewtopic.php?t=28086

                                    Thanks for the pointers so far Kwok!

                                    Woz

                                    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