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.
-
@csk So you're saying if you shove aside the random person in Nebraska the architecture simplifies itself to something with fewer layers?

@ChuckMcManis @csk that took some real cajones chuck haha!
-
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.
@csk Hah, just noticed that, if you click on the p5js link, itโs interactive! Awesome
-
@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.
-
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.
@csk This is fantastic!
-
@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.
@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)
-
@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.
-
@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)
@csk @topher_batty I feel like that is basically what all games do anyway. Also saves CPU.
-
-
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.
@csk This is incredibly satisfying to table-flip. My day needed this. Thank you.
-
@csk @topher_batty I feel like that is basically what all games do anyway. Also saves CPU.
@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/
-
@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/
@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.
-
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.
@csk excellent vibe coding simulator!
-
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.
@csk Turned out great! Thanks for sharing


-
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.
@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.
(editor.p5js.org)
-
@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.
(editor.p5js.org)
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.
-
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.
@csk Great!
When will we get a version with this?
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
Linux.Pizza (social.linux.pizza)
-
@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.
(editor.p5js.org)
@lenaschimmel That's amazing, thanks!
-
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.
@csk Magnificent!
-
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.
@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.
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/
Mastodon (mastodon.social)
-
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.