My electromagnetic field simulator in p5.js.
Code: https://editor.p5js.org/simontiger/sk...
Demo: https://editor.p5js.org/simontiger/pr...
Press "1" for positive charge, "2" for negative charge, "R" to run.
Press "3" and "4" to create magnetic fields/ press "0" to erase them.
Press Shift+1 and Shift+2 for "lazy particles".
This project was inspired by the game/explanation "The Electric Shocktopus" on TestTubeGames.com: https://testtubegames.com/shocktopus_...
I also love their other games, like "Why Do Astronauts Float?" (on gravity) and "Bond Breaker" (on chemical bonds). Check out my other TestTubeGames-inspired project Floating Astronaut at:
• Floating Astronaut
https://editor.p5js.org/simontiger/sk...
(Haven't figured out a way to put the astronaut inside the rocket yet though).