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.
  • 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
                              • lenaschimmel@chaos.socialL lenaschimmel@chaos.social

                                @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 This user is from outside of this forum
                                cynthesistoday@sfba.socialC This user is from outside of this forum
                                cynthesistoday@sfba.social
                                wrote last edited by
                                #46

                                @lenaschimmel @csk

                                This one has a lot of optional ways to destabilize the system. Pick up a tiny block from the top, don't drop it, and watch the instability move through the carefully balanced system-- over and over.

                                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.

                                  rebootdeluxe@infosec.exchangeR This user is from outside of this forum
                                  rebootdeluxe@infosec.exchangeR This user is from outside of this forum
                                  rebootdeluxe@infosec.exchange
                                  wrote last edited by
                                  #47

                                  @csk Great!

                                  When will we get a version with this?

                                  Link Preview Image
                                  Late Night Owl (@latenightowl@social.linux.pizza)

                                  Attached: 1 image I haven't seen this variation of XKCD 2347 yet. Received from a friend, source unknown. #xkcd2347 #cloudflare #aws #ai

                                  favicon

                                  Linux.Pizza (social.linux.pizza)

                                  1 Reply Last reply
                                  0
                                  • lenaschimmel@chaos.socialL lenaschimmel@chaos.social

                                    @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)

                                    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
                                    #48

                                    @lenaschimmel That's amazing, thanks!

                                    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.

                                      perigee@rage.loveP This user is from outside of this forum
                                      perigee@rage.loveP This user is from outside of this forum
                                      perigee@rage.love
                                      wrote last edited by
                                      #49

                                      @csk Magnificent!

                                      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.

                                        warrickball@mas.toW This user is from outside of this forum
                                        warrickball@mas.toW This user is from outside of this forum
                                        warrickball@mas.to
                                        wrote last edited by
                                        #50

                                        @csk This interactive version is amazing!

                                        I just wanted to note that @ahl at least animated this for an episode of Oxide and Friends about the XZ backdoor.

                                        Link Preview Image
                                        Adam Leventhal (@ahl@mastodon.social)

                                        Attached: 1 image I was really pleased by this background image so wanted to talk about it briefly. The concept was (of course!) simple: the (in)famous xkcd graphic with the thankless Nebraskan removed https://xkcd.com/2347/

                                        favicon

                                        Mastodon (mastodon.social)

                                        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.

                                          enigmarotor@mastodon.bsd.cafeE This user is from outside of this forum
                                          enigmarotor@mastodon.bsd.cafeE This user is from outside of this forum
                                          enigmarotor@mastodon.bsd.cafe
                                          wrote last edited by
                                          #51

                                          @csk @jbz Brilliant !

                                          1 Reply Last reply
                                          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