The next exciting step in writing his own code about spring force: Simon actually created an interface to allow anyone to build his own shape made of springs and particles! Simon put this project on GitHub and hosted it to make it accessible online.
The online interface to play with: https://simon-tiger.github.io/spring-animation-tool/
He also wrote the instructions himself and placed them in the GitHub Wiki: https://github.com/simon-tiger/spring-animation-tool/wiki/Intro
Videos of the project step by step:
Simon doesn’t consider this project finished. He wants to come up with a way to apply spring force to all the springs simultaneously to make sure the shape’s sides are equal in the final stage.
“Just recycling some building blocks here”, I heard Simon say Monday.
Simon put the project on GitHub the following day.
Direct link to the animation (click on the canvas to make the bubbles appear): https://simon-tiger.github.io/bubbles/
You can also both the code and play with the animation via the p5.js web editor (hit Download to get the animation on your computer): http://alpha.editor.p5js.org/simontiger/sketches/r1l_4Gg6l
A couple videos of the making of:
He started with Daniel Shiffman intro to Matter.js, downloaded it using GitBash and then went on by following further Matter.js tutorials on Daniel Shiffman’s channel. Simon built two physics simulations with static shapes and circular bodies: one resembling a waterfall and another resembling a dangling chain. The sketches involved constraints for mouse interaction. Simon also learned how to delete off-screen bodies from the physics world, removing them from both his particle array as well as Matter.world.
Simon has been trying different courses in JacaScript on Khan Academy, making some fun animations as part of tasks: