Challenges

Featured Challenge:
#184 — Elastic Collisions

What happens when two circles collide in a p5.js canvas? In this video, I examine the math and implement idealized elastic collisions in a JavaScript physics simulation. This video supplements the Nature of Code book series in Chapter 6 which uses 3rd party physics libraries to handle collisions rather than a direct implementation.

jul 12, 2024

Elastic Collisions

Filter by Language

Pick a language to filter

Filter by Topic

simulation

It's Genuary 2024! Watch as I attempt to build a falling sand simulation in p5.js using a grid of pixels and simple rules.

Falling Sand

Can I build an interactive 3D Rubik's cube in Processing? Yes! Someday I hope to return to this project and add an AI solver!

Rubik's Cube

In this two part challenge, I cover beginShape(), endShape(), and texture(), TRIANGLE_STRIP, QUAD_STRIP, and more. I combine these geometry functions with the Toxiclibs physics library to simulate a waving flag (with a unikitty image texture!)

Texturing Cloth Simulation

Boing! Using some particles and some springs with the Toxiclibs physics library, I create a 3D cloth simulation in Processing. Toxiclibs can now be downloaded from Processing's library manager.

3D Cloth with Toxiclibs

In this viewer submitted coding challenge, I program a cellular mitosis simulation in p5.js.

Mitosis Simulation