Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js.

In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js.

Scheduled Pinned Locked Moved Uncategorized
53 Posts 44 Posters 172 Views
  • 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.
  • csk@mathstodon.xyzC csk@mathstodon.xyz

    In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js. It suddenly occurred to me that I had never seen anybody put together this particular demo before, and I realized it had to be done. Messy source code at https://editor.p5js.org/isohedral/full/vJa5RiZWs.

    loke@functional.cafeL This user is from outside of this forum
    loke@functional.cafeL This user is from outside of this forum
    loke@functional.cafe
    wrote last edited by
    #26

    @csk Sometimes I wonder if this isn't the right solution to the software problem.

    1 Reply Last reply
    0
    • csk@mathstodon.xyzC csk@mathstodon.xyz

      In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js. It suddenly occurred to me that I had never seen anybody put together this particular demo before, and I realized it had to be done. Messy source code at https://editor.p5js.org/isohedral/full/vJa5RiZWs.

      robinhouston@mathstodon.xyzR This user is from outside of this forum
      robinhouston@mathstodon.xyzR This user is from outside of this forum
      robinhouston@mathstodon.xyz
      wrote last edited by
      #27

      @csk Ha! I saw this on HN earlier, and didn’t realise it was you. Very nice.

      csk@mathstodon.xyzC 1 Reply Last reply
      0
      • csk@mathstodon.xyzC csk@mathstodon.xyz

        In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js. It suddenly occurred to me that I had never seen anybody put together this particular demo before, and I realized it had to be done. Messy source code at https://editor.p5js.org/isohedral/full/vJa5RiZWs.

        t36s@social.ordinal.gardenT This user is from outside of this forum
        t36s@social.ordinal.gardenT This user is from outside of this forum
        t36s@social.ordinal.garden
        wrote last edited by
        #28

        @csk Excellent work here.

        1 Reply Last reply
        0
        • robinhouston@mathstodon.xyzR robinhouston@mathstodon.xyz

          @csk Ha! I saw this on HN earlier, and didn’t realise it was you. Very nice.

          csk@mathstodon.xyzC This user is from outside of this forum
          csk@mathstodon.xyzC This user is from outside of this forum
          csk@mathstodon.xyz
          wrote last edited by
          #29

          @robinhouston Yeah, it's really making the rounds! I must tip my hat to the people who came over to show their earlier demos of the same idea -- it really was hard to believe that nobody had thought to do this before.

          1 Reply Last reply
          0
          • csk@mathstodon.xyzC csk@mathstodon.xyz

            In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js. It suddenly occurred to me that I had never seen anybody put together this particular demo before, and I realized it had to be done. Messy source code at https://editor.p5js.org/isohedral/full/vJa5RiZWs.

            bredroll@mas.toB This user is from outside of this forum
            bredroll@mas.toB This user is from outside of this forum
            bredroll@mas.to
            wrote last edited by
            #30

            @csk bravo!

            1 Reply Last reply
            0
            • mttaggart@infosec.exchangeM mttaggart@infosec.exchange shared this topic
            • csk@mathstodon.xyzC csk@mathstodon.xyz

              In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js. It suddenly occurred to me that I had never seen anybody put together this particular demo before, and I realized it had to be done. Messy source code at https://editor.p5js.org/isohedral/full/vJa5RiZWs.

              chuckmcmanis@chaos.socialC This user is from outside of this forum
              chuckmcmanis@chaos.socialC This user is from outside of this forum
              chuckmcmanis@chaos.social
              wrote last edited by
              #31

              @csk So you're saying if you shove aside the random person in Nebraska the architecture simplifies itself to something with fewer layers? 😆

              demofox@mastodon.gamedev.placeD 1 Reply Last reply
              0
              • chuckmcmanis@chaos.socialC chuckmcmanis@chaos.social

                @csk So you're saying if you shove aside the random person in Nebraska the architecture simplifies itself to something with fewer layers? 😆

                demofox@mastodon.gamedev.placeD This user is from outside of this forum
                demofox@mastodon.gamedev.placeD This user is from outside of this forum
                demofox@mastodon.gamedev.place
                wrote last edited by
                #32

                @ChuckMcManis @csk that took some real cajones chuck haha!

                1 Reply Last reply
                0
                • csk@mathstodon.xyzC csk@mathstodon.xyz

                  In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js. It suddenly occurred to me that I had never seen anybody put together this particular demo before, and I realized it had to be done. Messy source code at https://editor.p5js.org/isohedral/full/vJa5RiZWs.

                  grwster@mastodon.socialG This user is from outside of this forum
                  grwster@mastodon.socialG This user is from outside of this forum
                  grwster@mastodon.social
                  wrote last edited by
                  #33

                  @csk Hah, just noticed that, if you click on the p5js link, it’s interactive! Awesome

                  1 Reply Last reply
                  0
                  • rolandog@todon.euR rolandog@todon.eu

                    @Humus @csk hmm, maybe turn it into an awareness-building game (a la tower defense games) where you must fend-off hackers trying to topple the whole tower over and whack knowledge into capitalists'/politicians' heads that treat the ecosystem as a black-box; boss level: secure funding without caving into three-letter agencies pressuring the dev to sneak vulnerabilities.

                    csk@mathstodon.xyzC This user is from outside of this forum
                    csk@mathstodon.xyzC This user is from outside of this forum
                    csk@mathstodon.xyz
                    wrote last edited by
                    #34

                    @rolandog @Humus Pull Request: The Game

                    1 Reply Last reply
                    0
                    • csk@mathstodon.xyzC csk@mathstodon.xyz

                      In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js. It suddenly occurred to me that I had never seen anybody put together this particular demo before, and I realized it had to be done. Messy source code at https://editor.p5js.org/isohedral/full/vJa5RiZWs.

                      michael@social.chrisco.meM This user is from outside of this forum
                      michael@social.chrisco.meM This user is from outside of this forum
                      michael@social.chrisco.me
                      wrote last edited by
                      #35

                      @csk This is fantastic!

                      1 Reply Last reply
                      0
                      • bloody_albatross@chaos.socialB bloody_albatross@chaos.social

                        @csk Register the mousemove handler on the window object, then you will get the events even when the mouse moves out of the window/frame while dragging.

                        csk@mathstodon.xyzC This user is from outside of this forum
                        csk@mathstodon.xyzC This user is from outside of this forum
                        csk@mathstodon.xyz
                        wrote last edited by
                        #36

                        @bloody_albatross If we're talking about improving the code, then I'd be more interested in the question of how to get a stable tower to stand up in a physics sim without bouncing all over the place and collapsing spontaneously. In this demo I use a cheap hack of freezing all the blocks until you actually click on one of them. Presumably it's really hard to get this working correctly (cc @topher_batty)

                        bloody_albatross@chaos.socialB 1 Reply Last reply
                        0
                        • glowl@chaos.socialG glowl@chaos.social

                          @csk i like how there seems to be no friction and despite what block you klick, after some duration everything crumbles, even if you do not move the cursor while klicking.

                          elexia@catcatnya.comE This user is from outside of this forum
                          elexia@catcatnya.comE This user is from outside of this forum
                          elexia@catcatnya.com
                          wrote last edited by
                          #37

                          @glowl @csk okay that is very funny actually.

                          elexia@catcatnya.comE 1 Reply Last reply
                          0
                          • csk@mathstodon.xyzC csk@mathstodon.xyz

                            @bloody_albatross If we're talking about improving the code, then I'd be more interested in the question of how to get a stable tower to stand up in a physics sim without bouncing all over the place and collapsing spontaneously. In this demo I use a cheap hack of freezing all the blocks until you actually click on one of them. Presumably it's really hard to get this working correctly (cc @topher_batty)

                            bloody_albatross@chaos.socialB This user is from outside of this forum
                            bloody_albatross@chaos.socialB This user is from outside of this forum
                            bloody_albatross@chaos.social
                            wrote last edited by
                            #38

                            @csk @topher_batty I feel like that is basically what all games do anyway. Also saves CPU.

                            topher_batty@mastodon.acm.orgT 1 Reply Last reply
                            0
                            • elexia@catcatnya.comE elexia@catcatnya.com

                              @glowl @csk okay that is very funny actually.

                              elexia@catcatnya.comE This user is from outside of this forum
                              elexia@catcatnya.comE This user is from outside of this forum
                              elexia@catcatnya.com
                              wrote last edited by
                              #39

                              @glowl @csk everything just slowly sliding

                              1 Reply Last reply
                              0
                              • csk@mathstodon.xyzC csk@mathstodon.xyz

                                In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js. It suddenly occurred to me that I had never seen anybody put together this particular demo before, and I realized it had to be done. Messy source code at https://editor.p5js.org/isohedral/full/vJa5RiZWs.

                                swachter@toot.bostonS This user is from outside of this forum
                                swachter@toot.bostonS This user is from outside of this forum
                                swachter@toot.boston
                                wrote last edited by
                                #40

                                @csk This is incredibly satisfying to table-flip. My day needed this. Thank you.

                                1 Reply Last reply
                                0
                                • bloody_albatross@chaos.socialB bloody_albatross@chaos.social

                                  @csk @topher_batty I feel like that is basically what all games do anyway. Also saves CPU.

                                  topher_batty@mastodon.acm.orgT This user is from outside of this forum
                                  topher_batty@mastodon.acm.orgT This user is from outside of this forum
                                  topher_batty@mastodon.acm.org
                                  wrote last edited by
                                  #41

                                  @bloody_albatross @csk Paul Kry even had a paper where they sort of generalize the freezing idea to merging together collections of rigid bodies whose relative motion is small enough. https://eulaliecoevoet.github.io/AdaptiveMerging/

                                  topher_batty@mastodon.acm.orgT 1 Reply Last reply
                                  0
                                  • topher_batty@mastodon.acm.orgT topher_batty@mastodon.acm.org

                                    @bloody_albatross @csk Paul Kry even had a paper where they sort of generalize the freezing idea to merging together collections of rigid bodies whose relative motion is small enough. https://eulaliecoevoet.github.io/AdaptiveMerging/

                                    topher_batty@mastodon.acm.orgT This user is from outside of this forum
                                    topher_batty@mastodon.acm.orgT This user is from outside of this forum
                                    topher_batty@mastodon.acm.org
                                    wrote last edited by
                                    #42

                                    @bloody_albatross @csk I'm not sure of the latest and greatest in academic rigid body stacking, but I've used Danny Kaufman's 2008 staggered projections scheme successfully for one paper: https://www.cs.ubc.ca/labs/sensorimotor/projects/sp_sigasia08/KSJP08.pdf Downside is you usually need to start bringing in better LCP or QP solvers.

                                    1 Reply Last reply
                                    0
                                    • csk@mathstodon.xyzC csk@mathstodon.xyz

                                      In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js. It suddenly occurred to me that I had never seen anybody put together this particular demo before, and I realized it had to be done. Messy source code at https://editor.p5js.org/isohedral/full/vJa5RiZWs.

                                      xchaos@f.czX This user is from outside of this forum
                                      xchaos@f.czX This user is from outside of this forum
                                      xchaos@f.cz
                                      wrote last edited by
                                      #43

                                      @csk excellent vibe coding simulator!

                                      1 Reply Last reply
                                      0
                                      • csk@mathstodon.xyzC csk@mathstodon.xyz

                                        In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js. It suddenly occurred to me that I had never seen anybody put together this particular demo before, and I realized it had to be done. Messy source code at https://editor.p5js.org/isohedral/full/vJa5RiZWs.

                                        dadmin@mastodon.socialD This user is from outside of this forum
                                        dadmin@mastodon.socialD This user is from outside of this forum
                                        dadmin@mastodon.social
                                        wrote last edited by
                                        #44

                                        @csk Turned out great! Thanks for sharing 😆👍

                                        1 Reply Last reply
                                        0
                                        • csk@mathstodon.xyzC csk@mathstodon.xyz

                                          In my online undergraduate P5.js course, students are about to begin the module on motion and physics, including a bit of physics simulation using Matter.js. It suddenly occurred to me that I had never seen anybody put together this particular demo before, and I realized it had to be done. Messy source code at https://editor.p5js.org/isohedral/full/vJa5RiZWs.

                                          lenaschimmel@chaos.socialL This user is from outside of this forum
                                          lenaschimmel@chaos.socialL This user is from outside of this forum
                                          lenaschimmel@chaos.social
                                          wrote last edited by
                                          #45

                                          @csk Wonderful!

                                          I made your code even messier by introducing a small... let's say "typographic" improvement:

                                          p5.js Web Editor

                                          A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.

                                          favicon

                                          (editor.p5js.org)

                                          cynthesistoday@sfba.socialC csk@mathstodon.xyzC 2 Replies Last reply
                                          1
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups