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

    Fun with sin and cos

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    9 Posts 5 Posters 2.1k 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.
    • Alan FraserA Offline
      Alan Fraser
      last edited by

      We wuz messing about with security cameras, trying to make them a bit more interesting than Click!...pan left; Click! pan right.
      James had the idea of introducing a sin or cos function into an animatecustom routine.
      The attached is a very rough and ready development from....animatecustom("Rotz",10,0,0,0,90)...which simply rotated through 90 degrees over 10 seconds.
      The attached file will oscillate back and forth continuously for 2 minutes; so basically the 120 (in the onClick) is the length of the animation, the 7200 is the number of degrees it has to get through in that time, hence its speed.


      oscillate.skp

      3D Figures
      Were you required to walk 500 miles? Were you advised to walk 500 more?
      You could be entitled to compensation. Call the Pro Claimers now!

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

        Thats a great camera Alan! I really need to invest some time into figuring out how to use sin and cosin and all ther trig functions. I never did this in school, and its finally catching up to me πŸ˜„

        Chris

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

        1 Reply Last reply Reply Quote 0
        • J Offline
          James Fraser
          last edited by

          I reckon it would be well worth your while working out some basic trig, it should be very handy for your DCs. I'd also have a look at trig identities and things, they can save you code and calculations, one of my formulas got a lot nicer when I remembered that the thing was inclined at 30 degrees, so the length was just twice the rise (sin30 = 0.5). Plenty of universities will have notes on the web for basic trig courses, so you should be ok.

          Technically, it should be possible to model any path using sin and cos, but my Fourier analysis is very rusty and I really don't want to have to type it all into that little box. I think it should be possible to use something like the example above to script more complex movement, though. I wasn't entirely sure if it would work, but I was glad it did.

          http://www.FormFonts.com

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

            ok, so I found a fun one. I'm sjut plugging in numbers to see what I get, and I like this one! Its a box that bounces up and down and back and forth.

            Help save the box! Get it safely from one side of the chasm to the other, by clicking on it.

            Chris


            bouncing box.skp

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

            1 Reply Last reply Reply Quote 0
            • Alan FraserA Offline
              Alan Fraser
              last edited by

              🀣 Brilliant!

              3D Figures
              Were you required to walk 500 miles? Were you advised to walk 500 more?
              You could be entitled to compensation. Call the Pro Claimers now!

              1 Reply Last reply Reply Quote 0
              • pilouP Offline
                pilou
                last edited by

                Swinging under camera πŸ˜„

                PS With the "Free"
                Have you seen that you can make start many boxes in
                the same time ❓
                Just click on the right over top box! ❗ πŸ‘ πŸ˜„

                Frenchy Pilou
                Is beautiful that please without concept!
                My Little site :)

                1 Reply Last reply Reply Quote 0
                • pilouP Offline
                  pilou
                  last edited by

                  Any chance with the "free" to copy a comportment of a Dynamic component to another object group?
                  Or "past" a group on a Dynamic component?

                  Frenchy Pilou
                  Is beautiful that please without concept!
                  My Little site :)

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    matthew.robert
                    last edited by

                    Tbere is a security camera and a flipping coin on the 3dwh that use some pretty cool trig stuff. If you haven't seen that security camera, maybe it would be better not to and compare the Attributes. I have been really surprised how different people are accomplishing similar things with DCs.

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

                      This thread is what got me thinking about how to animate a ping pong ball that lead to a DC movie I made o Bryce and Sang playing Ping Pong:

                      301 Moved Permanently

                      favicon

                      (www.sketchucation.com)

                      Indeed there is a lot of power with figuring out how to control this better and seeing how other people are accomplishing similar tasks.

                      Chris

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

                      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