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

MSPhysics 1.0.3 (16 October 2017)

Scheduled Pinned Locked Moved Plugins
920 Posts 170 Posters 882.8k Views
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.
  • D Offline
    DonDeEs
    last edited by 25 Nov 2016, 15:32

    I just checked and this only seems to be a problem with S2017. Seems to work fine in 2016.

    1 Reply Last reply Reply Quote 0
    • A Offline
      Anton_S
      last edited by 25 Nov 2016, 20:53

      Thank you for reporting this, DonDeEs. Someone reported something similar and I'm in the process of fixing it. I might have to send you s private message to verify the fix.

      1 Reply Last reply Reply Quote 0
      • D Offline
        DonDeEs
        last edited by 26 Nov 2016, 09:53

        Sure thing. Feel free to do so.

        1 Reply Last reply Reply Quote 0
        • R Offline
          robint
          last edited by 11 Dec 2016, 06:47

          Hi Anton
          Congrats on your great work resurecting old SP for a new version. I played with SP some years ago and amazed myself by getting a caterpillar track chain to work

          May I ask if it is possible, in your version, to assign real physical values to objects, eg mass in kg, spring rate m/kg, damping kg/m^2 and so on

          and perhaps equivalent elements for rotating masses

          Its all in aid of helping my student understand the dynamic behaviour of physical systems with different input and load conditions open loop and closed loop

          If this could be done, it would be of fantastic benefit for Uni ugrads (yes there are professional - expensive suites to do this). Something tailored to fit with the unbeatable SU would be so good

          It wasn't available in the original SP, only cruded dimensionless tweaks

          Cheers

          Robin

          ps apologies if this has already been answered pls link me

          As one door closes another one slams in your face

          1 Reply Last reply Reply Quote 0
          • A Offline
            Anton_S
            last edited by 11 Dec 2016, 10:44

            Hi, robint,

            Just to clarify a thing, MSPhysics is not a new version of SketchyPhysics; MSPhysics is a plugin written completely from scratch, integrating the latest NewtonDynamics Physics engine by Julio Jerez. Yes, it does have a similar functionality to SketchyPhysics, but that was done because I didn't want to reinvent all the ideas Chris Phillips put into writing SketchyPhysics and so that SketchyPhysics users wouldn't have hard time transitioning to MSPhysics.

            In MSPhysics, the mass (kg), force (N), torque (Nm), angular velocity (rad/s), and linear velocity (m/s) - are controled with the standard SI units. These values are proper, even with the world scale set to some value other than one, as behind the scenes they are scaled to maintain themselves in SI units. The parameters for joints, such as power, accel, damp, and friction, however, are controlleded with unknown units. While writing the custom joints, I didn't place close attension to the units, but I think they can be converted to the units you described in your post. Some testing needs to be done to figure out the ratios.

            By default the mass is calculated by taking the volume of an object, in m^3, and multiplying it by the density, in kg/m^3, which is by default 700 kg/m^3, the density of wood.

            To assign a particular mass to a body, in killograms, you can do it with the UI dialog:

            1. Select the desired body.
            2. Open the MSPhysics UI.
            3. Activate the Body Properties tab.
            4. Select weight control option and switch it to mass.
            5. Write the desired mass into the mass input box.

            The static and kinetic friciton coeffiences, which can also be assigned through the dialog, are not the actual coefficients. The actual coefficient is an average coeffiecent between the two touching bodies. For instance, if the floor has a static coefficient of 0.9 and kinetic of 0.7, and the touching body has a static coefficient of 0.4 and kinetic of 0.3, the actual static coefficient for the contact, would be (0.9+0.4)/2 and the actual kinetic coefficient would be (0.7+0.3)/2.

            The same concept applies to elasticity and softness. I'm no expert what the softness does, as I didn't write the physics engine, doing most of the calculations for my wrapper, but I think it controls how much energy is transfered durding collision, i.e an aditional parameter for elasticity.

            To control other physical properties, such as velocity, you need to assign a Ruby script to a group. This can be done by selecting a desired group, activating the Script tab in the MSPhysics UI, and writting some code in the editor. Here's a script for applying a particular velocity to an object whenever simulation starts:

            onStart {
              this.set_velocity(0,1,2) # x, y, z - the velocity vector
            }
            

            The velocity can also be applied every time the world is updated:

            onUpdate {
              this.set_velocity(4,5,6) # x, y, z - the velocity vector
            }
            

            And the velocity can also be recorded:

            onUpdate {
              # Get current velocity
              cv = this.get_velocity
              # Output it in the note
              note = sprintf("Velocity; (%.3f, %.3f, %.3f)", cv.x, cv.y, cv.z)
              simulation.display_note(note)
            }
            

            You may also apply force, torque, omega, and do other things with scripting. Check out this scripting documentation link:
            http://www.rubydoc.info/github/AntonSynytsia/MSPhysics/index

            Here is the exact link for all the functions available for a body:
            http://www.rubydoc.info/github/AntonSynytsia/MSPhysics/MSPhysics/Body

            Regards,
            Anton

            1 Reply Last reply Reply Quote 0
            • R Offline
              robint
              last edited by 11 Dec 2016, 12:18

              Thank you so much Anton, thats given me some homework!

              BTW I didn't wish to imply you were overwriting the previous SP. MSP is of course entirely yours started from scratch - brilliant stuff

              I'll be glad to pass any useful models I can generate back to you to pass around to other interested parties and perhaps help generate other instructional models

              Cheers

              Robin

              As one door closes another one slams in your face

              1 Reply Last reply Reply Quote 0
              • A Offline
                Anton_S
                last edited by 11 Dec 2016, 13:06

                Hi, Robin,

                I'm glad I could help.

                Best regards,
                Anton

                1 Reply Last reply Reply Quote 0
                • S Offline
                  Sjamon
                  last edited by 11 Dec 2016, 23:00

                  Dear Anton,

                  I just downloaded the plugin to make a simple cinematic / collision check on a folding workbench model, that is basically a deformable parallelogram.
                  Although I got the basic principle and manage to make singles hinges move as expected, any component is stuck as soon as it's linked to two hinges.

                  There's also a message reading "Requires MSPhysics 0.9.8+" in a corner of the screen, should I understand that it won't work unless I install something else ?

                  Thanks
                  Armand

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    Anton_S
                    last edited by 12 Dec 2016, 10:17

                    Hi, Armand,

                    A hinge with no parent groups will act stationary. In order for the hinge to move, it must have a parent group. What I think is going on in your model is that the hinges are top level groups. If you want a hinge to link two groups together, and still move, simply create a hinge joint within one of the groups andd then, using the joint connection tool, connect it to the other group. That way the hinge joint will have a parent body, which will allow it to move.

                    Check out this mini clip:
                    Movable Joints Example

                    The message is there so that people using your model would know that they need MSPhysics in order to run it.

                    Regards,
                    Anton

                    1 Reply Last reply Reply Quote 0
                    • gillesG Offline
                      gilles
                      last edited by 12 Dec 2016, 12:33

                      I think I have some issue with hinge when I link it to a parent:

                      Mac OSX 10.8.5, SU2015.


                      hinge.gif

                      " c'est curieux chez les marins ce besoin de faire des phrases "

                      1 Reply Last reply Reply Quote 0
                      • A Offline
                        Anton_S
                        last edited by 12 Dec 2016, 12:47

                        Hi, gilles,

                        To fix that, you have to select the joint, open MSPhysics UI, and check the "connected collide" option.

                        Regards,
                        Anton

                        1 Reply Last reply Reply Quote 0
                        • R Offline
                          robint
                          last edited by 12 Dec 2016, 13:23

                          @anton_s said:

                          Hi, Robin,

                          I'm glad I could help.

                          Best regards,
                          Anton

                          I made a simple mass/spring damper system as per model, but I get some odd results not like the damped sinusoid

                          Am I on the right track or have I made some basic errors

                          Also the block doesn't sit still on the plane but wanders off

                          I am also having difficulty tying in the UI with real values of spring rate N/m and damping c*velocity Ns/m

                          Any advice, most appreciated

                          Cheers
                          Robin

                          BTW I looked at the Ruby docs but couldnt tie up real units to the constants


                          classic spring damper

                          As one door closes another one slams in your face

                          1 Reply Last reply Reply Quote 0
                          • gillesG Offline
                            gilles
                            last edited by 12 Dec 2016, 13:46

                            @anton_s said:

                            Hi, gilles,

                            To fix that, you have to select the joint, open MSPhysics UI, and check the "connected collide" option.

                            Regards,
                            Anton

                            Works fine ๐Ÿ‘

                            A lot to dig in, I go back to the mine.

                            " c'est curieux chez les marins ce besoin de faire des phrases "

                            1 Reply Last reply Reply Quote 0
                            • A Offline
                              Anton_S
                              last edited by 12 Dec 2016, 15:51

                              Hi, Robin,

                              The block doesn't sit still probably because you disabled the friction. Enabling the friction checkbox option for the block and for the floor contacting the block will fix the wandering off behavior.

                              I will add an option to control accel and damp with the SI units in the upcoming release. At the moment, I figured that spring constant is roughly equals to (accel * 7 - damp), when spring joint stiffness is set to 1.0.

                              Edit: Ensure that both anuglar and linear damping for all bodies are set to zero. This improves the closeness.

                              Anton

                              1 Reply Last reply Reply Quote 0
                              • R Offline
                                robint
                                last edited by 12 Dec 2016, 22:17

                                Hi Anton

                                I'm sure I tried every way with the friction coeffs, and it didnt seem to help much, unless Im doing something wrong. If you could get real SI units into the spring damper model this would be fantastic. Classic maths leaves everything in normalised units which is really hard for students to translate into the real world - thats what MS physics is about. I try to encourage my student to abandon th suck-it-and-see approach in favour of understanding what is really happening and calculating the effect. I know that math is a real turn off for most users, but I try

                                cheers Robin

                                As one door closes another one slams in your face

                                1 Reply Last reply Reply Quote 0
                                • R Offline
                                  robint
                                  last edited by 13 Dec 2016, 11:51

                                  @anton_s said:

                                  Hi, Robin,

                                  The block doesn't sit still probably because you disabled the friction. Enabling the friction checkbox option for the block and for the floor contacting the block will fix the wandering off behavior.

                                  I will add an option to control accel and damp with the SI units in the upcoming release. At the moment, I figured that spring constant is roughly equals to (accel * 7 - damp), when spring joint stiffness is set to 1.0.

                                  Edit: Ensure that both anuglar and linear damping for all bodies are set to zero. This improves the closeness.

                                  Anton

                                  Yes indeed, improved action, I missed the friction box

                                  Herewith a revised model changing block mass from 0 - 0.5 kg gives a displacement of 0 - 1.0 so the spring rate is 2

                                  spring stiff 1 (what does this do?)
                                  Accel 1, damp 1.5 (gives critical damping approx)

                                  changing sample rate from 1/60 to 1/240 changes the whole model performance

                                  iterations 16 - improves stability

                                  the plane has a mass of 0.01kg, lowest i could get without instability

                                  So Ive actually got a spring damper that sort of behaves but it seems like the spring has inertial mass - an ideal spring should be zero mass and friction

                                  What do you think? Anything I can do to help (ruby dummy just now)

                                  Cheers

                                  Robin) ๐Ÿ˜›


                                  V 2

                                  As one door closes another one slams in your face

                                  1 Reply Last reply Reply Quote 0
                                  • A Offline
                                    Anton_S
                                    last edited by 13 Dec 2016, 12:21

                                    Hi, Robin,

                                    I just revised the spring joint to base on Hooke's law. Just need to adress a few other things before its ready for the release.

                                    Regards,
                                    Anton

                                    1 Reply Last reply Reply Quote 0
                                    • R Offline
                                      robint
                                      last edited by 13 Dec 2016, 14:00

                                      @anton_s said:

                                      Hi, Robin,

                                      I just revised the spring joint to base on Hooke's law. Just need to adress a few other things before its ready for the release.

                                      Regards,
                                      Anton

                                      Hi Anton

                                      It occured to me loking at the motor joint, that it would be neat to have control sliders on important coeffs, of spring rate, friction, and damping, help to speed up student experience

                                      BTW just seen some example in Sketchucation, blown away with the talent out there

                                      Hope my little exercises aren' t too dull

                                      Cheers

                                      Robin

                                      As one door closes another one slams in your face

                                      1 Reply Last reply Reply Quote 0
                                      • gillesG Offline
                                        gilles
                                        last edited by 15 Dec 2016, 09:11

                                        jansen.gif

                                        What am I doing wrong?


                                        THEO-JANSEN2.skp

                                        " c'est curieux chez les marins ce besoin de faire des phrases "

                                        1 Reply Last reply Reply Quote 0
                                        • A Offline
                                          Anton_S
                                          last edited by 15 Dec 2016, 09:49

                                          Hi, gilles,

                                          You just need to adjust motor joint properties. So, select the motor joint, open MSPhysics UI, and set Accel to 20, Damp to 10, and uncheck the Free Rotate checkbox option. This should make the motor more stronger.

                                          Anton

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 23
                                          • 24
                                          • 25
                                          • 26
                                          • 27
                                          • 45
                                          • 46
                                          • 25 / 46
                                          • First post
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement