My electromagnetic field simulator in p5.js

Code: https://editor.p5js.org/simontiger/sketches/nIwYhXLdj

Demo: https://editor.p5js.org/simontiger/present/nIwYhXLdj

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

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: https://youtu.be/GwnvLWnZN5o Code: https://editor.p5js.org/simontiger/sketches/obGZyfVze (Haven't figured out a way to put the astronaut inside the rocket yet though).