Elastic Rope with Obstacle Collision
By giving the points of a chain some inertia and by replacing a fixed-distance constraint by projections towards the desired link length, one can get a stretchy rope. Smash the rope into the other objects and watch them interact.
Touch the screen or move the mouse around to start and interact. Note that scrolling with a touchscreen requires to touch ouside the canvas area.
The code can be found at https://github.com/sven-hoek/interactive_animations/.
Inspired by Sublucid Geometry’s blog post.