Starting from Nature of Code 4.1.
Like with springs, very similar, but using my own Vector class and not putting as many variables/magic numbers/drawing function in the class.
Instructions
- Click to move the emitter.
Video and Example Code
- https://www.youtube.com/watch?v=syR0klfncCk&list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM&index=32
- https://editor.p5js.org/codingtrain/sketches/QRzgzQLnQ
Coding Train Link
- https://thecodingtrain.com/tracks/the-nature-of-code-2/noc/4-particles/1-particle-system
Links discussed in this video:
- Particle Systems - A Technique for Modeling a Class of Fuzzy Objects: https://cal.cs.umbc.edu/Courses/CS6967-F08/Papers/Reeves-1983-PSA.pdf
Other videos mentioned in this video:
- Simple Particle System - Coding Challenge #78: https://youtu.be/UcdigVaIYAk
- Simulating Forces - Nature of Code 2.1: https://youtu.be/Uibl0UE4VH8
- Arrays of Objects - p5.js Tutorial 7.3: https://youtu.be/fBqaA7zRO58
- Fireworks! - Coding Challenge #27: https://youtu.be/CKeyIbT3vXI
- Array Functions: filter(): https://youtu.be/qmnH5MT_luk
- Removing Objects from Arrays - p5.js Tutorial 7.5: https://youtu.be/tA_ZgruFF9k
TODO
- Random Shuffle: https://www.w3docs.com/snippets/javascript/how-to-randomize-shuffle-a-javascript-array.html