sketchucation logo sketchucation
    • Login
    1. Home
    2. mptak
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 34
    • Posts 185
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Units of Measurement in Sketchyphysics

      Thoughtful question which I presume eventually may need to be done empirically. I will dig around for the post but essentially from memory and model forensics the following settings will at least model gravity correctly. When you get into other matters I think that the effects of similitude might start to complicate things but it is still worth the effort. If your model is modeled in meters you can best model "reality" by the following settings:

      framerate: 2
      gravity: 9.8
      worldscale: 1

      velocities are then set in ruby code with the following formula to account for the inch/meter ratio and the frame rate.

      if v is your desired velocity in meters per second...

      input_velocity = v * 39.28/2

      The best way to test this at least in terms of rule of thumb is to raise a ball to 45 meters and see if it takes 3 seconds (180 frames at 60 fps) to drop. I think from there some experimentation may get you pretty far in terms of some of the rest. These two statements imbedded in each object will take you to the frictionless state at least in terms of projectile flight
      onstart{ setLinearDamping(0.0) setAngularDamping([0.0,0.0,0.0]) }

      I'll look around for the proper posts but hopefully this may help some.

      posted in SketchyPhysics
      M
      mptak
    • RE: Aircraft Crash Reconstruction

      I am sorry for your loss. As far as animation is concerned I always found Martin Reinhardt's book Edges to Rubies pretty informing. Among other insights is the fact that the base unit of sketchup is the inch which means that an airspeed of 68 mph = 1200 inches per second = 50 inches per frame ( if you are using 24fps) By Applying a name to each group or component instance you plan on animating simple and even complex animations can be achieved using the Ruby API with commands like:
      t1=Geom::Transformation.new([-15,10,0]) #causes tran -15 inches in the x and 10 in the y direction
      t2=Geom::Transformation.new([0,0,5]) #this will cause something to translate 5 units in the z direction
      entities.transform_entities(t1,e) # apply to first translation to a group defined by e
      entities.transform_entities(t2,e) #apply the second translation to a group defined by e

      Things like changes in pitch roll and yaw can be similarly achieved. Once you have the flight path all figured out the views are just achieved by controlling a camera by keeping track of where it is and where it is pointed based on the flight path. Having a webconsole will help tremendously in this but I think there may be one packaged with Sketchup 2013. Happy to help if you need it.

      Some full code as an example is given there

      
      model = Sketchup.active_model
      entities = model.entities
      selection = model.selection
      view=model.active_view
      t1=Geom;;Transformation.new([-15,10,0])
      t2=Geom;;Transformation.new([0,0,5])
      for i in 1..600 do
        entities.each{|e|
          if e.name=="plane"
          entities.transform_entities(t1,e)
          newview=view.refresh
          end
        }
      end
      for i in 1..600 do
        entities.each{|e|
          if e.name=="plane"
          entities.transform_entities(t1,e)
          entities.transform_entities(t2,e)
          newview=view.refresh
          end
        }
      end
      
      
      posted in SketchUp Discussions
      M
      mptak
    • RE: SQLite in SketchUp Ruby

      I revisit this thread as the folk at http://www.learningequality.org are using sqlite for some awesome Creative Commons work to bring education and learning to the places which can make good use of both Trimble sketchup make and stuff in the creative commons. Anyone know if this sqlite3 stuff is all still possible? And seriously check out their mission if you are interested in some Python mixed with your Ruby.

      posted in Developers' Forum
      M
      mptak
    • RE: SketchyPhysics Advanced Joints

      I hate to see these posts to Sketchy Physics go unanswered as it is a plugin that while breaking the rules a bit does have some good bones. The link below might get you started. Much of the complexity that comes out of joints is done by the order of attaching and grouping which I am not sure is covered on this site. I'll look around for some more how to videos but you might best progress by downloading some models from the warehouse and doing some sketchy physics reverse engineering. Best of Luck.

      http://sketchyphysics.wikia.com/wiki/Introduction_for_New_Users

      posted in SketchyPhysics
      M
      mptak
    • RE: Combining a motor and a piston

      your work with slight modificationsExceptional! What you want to do is to make a block (or small cylinder) and then the piston and the motor which you will each attach to it (alternatively the motor could be attached to the rotor). then group the three (the block and the two joints). Then attach the piston to the vehicle and the motor to the rotor. I have also found that when attaching multiple joints to the small block, it is useful to keep them on different layers. (SP puts them on a dedicated layer but you can change that). I'll try and work up a small tutorial using your model later today (nothing like SP on Father's Day) but try doing it on my cryptic instructions...you might get more out of it. Finally make sure to then set the grouped block to nocollision. Again...excellent work.

      ...Looking again at your model I might propose this. Group the motor with the rotor...(first attach and then group).
      Then make the whole main body of the vehicle a group. Next attach each motor/rotor to the overall vehicle group.
      You should now be able to pick up and throw the vehicle around with the rotor's attached and spinning.

      Depending on what level you are in school or sketchup....the next steps could either be simple...(attaching the vehicle group to a piston) or else using ruby sphysics push statements or a thruster value and gyron on the main body to fly around.

      posted in SketchyPhysics
      M
      mptak
    • Learning Linear Algebra et. al. without internet

      One of the great things about Sketchup Make is that even when disconnected from either funds (students) or the internet(rural/international) you can both create and learn. It is in that same vane that I share http://www.learningequality.org or "KA Lite" based on the site http://www.khanacademy.org. The linear algebra tutorials are legendary in silicon valley which for me includes Boulder. Essentially it is the same material as Khan Academy but delivered via the sneakernet.

      posted in Freeware
      M
      mptak
    • Makey makey with Sketchy Physics

      I just impulse purchased a Makey makey and see one more incredible symbiosis between that which Chris Phillips has built and the bunch of rotting bananas we bought last week (don't worry eventually they will go to banana bread). Anyway, with simple key("space"), key("left"),key("right"),key("up"), and key("down") if statements sketchy physics becomes much more tactile. Check out this video and start posting ideas. I am hoping this is the hook that may get my daughters off of their passive phones and into virtual and tactile creation.
      http://www.makeymakey.com/

      posted in SketchyPhysics
      M
      mptak
    • RE: SketchyPhysics3 FAQ.

      "What setting should I add to the buoyancy settings to allow the simulated water to interact with a propeller for example in the model, to allow its movement to propel the boat?"

      I don't think that direct action/reaction between the propeller and bouyant water is possible. You can link the propeller rotation and perhaps a push ([x,y,x]) function in some ruby script or else a hidden thruster attached to the boat. Hope this helps

      posted in SketchyPhysics
      M
      mptak
    • RE: Tank Tracks

      Have you tried constructing each subpiece of the track as a box or complex hull? (I see they are now set to ignore). This seems to work well when trying to make chains for things like suspension bridges. My first attempt was promising but I blew the scale so its back to some more individual joint connections...ugggghhh. Cool model.

      posted in SketchyPhysics
      M
      mptak
    • RE: Combination of sketchup and sketchyphysics animation

      Wow! I've been doing a lot with sketchy physics and ruby; I think you have inspired me to jump more into rendering. Any tutorials or workflow you can recommend?

      posted in WIP
      M
      mptak
    • Sketchy Physics in Sketchup 2013 functionality such as it is

      Any Sketchy Physics creators upgrade to Sketchup 2013 yet?

      posted in SketchyPhysics
      M
      mptak
    • RE: New API doc - typos and questions

      Is anyone else having a hard time accessing the Sketchup Ruby API today?

      posted in Developers' Forum
      M
      mptak
    • Tinkercad acquired by Autodesk....

      http://blog.tinkercad.com/2013/05/18/autodesk_tinkercad/

      posted in Hardware
      M
      mptak
    • Best way to copy functioning mechanisms in SketchyPhysics?

      ok....so there is one oompa loompa ... but what if you wanted to make one functioning Oompa Loompa and then copy him joints, servos and all. or perhaps just write automatic code to generate a large number of functioning Oompa Loompa. I think the answers may exist in this tread (automatically connecting joints with parent and child...but would love someone to point me this way....or that way....or both ways...(ok...mixing movies metaphors)

      Translation...what is the best way to copy functioning mechanisms in Sketchy Physics?

      posted in SketchyPhysics
      M
      mptak
    • RE: Multiple-joint Modification

      oops rereading your post I don't think I answered you question. I will leave this up and think about the script changes which I presume requires changing instance variables.
      Yes this is possible via a variety of routes. I think you can just do it by having them all access the same slider value. (just pick one for instance slider('piston2091') and copy that to the others). Otherwise to do it by scripting you just put a variable @@value for instance or ...and this is not recommended $value in the controller field and then change that the value of @@value (or $value) with script. The program can be a bit sketchy sometimes so for original troubleshooting I generally just risk the wrath of ThomThom and go with the global variable $value.

      posted in SketchyPhysics
      M
      mptak
    • RE: Algodoo now free!

      Thanks for the incredible heads up....Algoroo and then a Sketchy Physics that plays well with other plugins will really be a great pairing!

      posted in Freeware
      M
      mptak
    • RE: Bolt and Nut

      I could be wrong but I still think the base cylinder needs to be defined within the group as a cylinder and not default. Glad you are making progress. So how do you make the incremental pieces of the screw teeth?

      posted in SketchyPhysics
      M
      mptak
    • RE: Non-slider controllers?

      I think you mean

      oscillator(n)

      though there are other more controllable ways to do it.

      Like

      Math.sin(frame) which gives you a lot more control in terms of phase shift, etc.

      Hope this helps. or poke around here....

      http://sketchyphysics.wikia.com/wiki/Ready-to-use_scripts

      posted in SketchyPhysics
      M
      mptak
    • RE: Bolt and Nut

      They tell us that we are living in an era reminiscent of the time of the Guttenberg press....now I know what they mean. I think the mechanism is all yours but will be interested to hear of the construction process. I think that while boxes and spheres can be scaled along various axes and still retain their sketchy integrity I'm not sure the same is true of convex hulls.

      posted in SketchyPhysics
      M
      mptak
    • RE: Bolt and Nut

      I think you are almost there. FIrst comment is that the external cylinder needs to be built like all objects with a "void", as a set of incremental strips or elements. Second comment is that each of the screw mechanisms (already defined as incremental strips (convex hulls) need to be defined as "default" not cylinder. In my playing around I got the mechanisms to interact by attaching one to a motor and the other to a passive slider. I'll try to reassemble the whole thing back together and post what I have. Inspiring work!

      Error 404 (Not Found)!!1

      favicon

      (sketchup.google.com)

      posted in SketchyPhysics
      M
      mptak
    • 1 / 1