4.1: Particle System Simulation - The Nature of Code
Welcome to Chapter 4 of The Nature of Code: Particle Systems! I begin by coding a simple particle system in p5.js. I convert the Mover class into a Particle class, add a lifetime property, and organize a collection of particles into an array. Code: https://thecodingtrain.com/tracks/the-nature-of-code-2/noc/4-particles/1-particle-system
πΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/QRzgzQLnQ
π₯ Next video: https://youtu.be/wDYD3JVtOys?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
References:
π Particle Systems - A Technique for Modeling a Class of Fuzzy Objects: https://cal.cs.umbc.edu/Courses/CS6967-F08/Papers/Reeves-1983-PSA.pdf
Videos:
π₯ Simple Particle System: https://youtu.be/UcdigVaIYAk
π₯ Simulating Forces: https://youtu.be/Uibl0UE4VH8
π₯ Arrays of Objects: https://youtu.be/fBqaA7zRO58
π₯ Fireworks!: https://youtu.be/CKeyIbT3vXI
π₯ Array Functions: filter(): https://youtu.be/qmnH5MT_luk
π₯ Removing Objects from Arrays: https://youtu.be/tA_ZgruFF9k
Timestamps:
0:00 Welcome to chapter 4!
0:24 What is a particle system?
1:24 What do we have to code?
2:01 Let's make a particle class!
2:46 Adding a lifetime property.
3:41 Many particles!
5:16 Emitting particles.
5:51 Removing finished particles from the array.
7:59 Let's make a few tweaks to this system?
8:55 What's next?
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
π Website: http://thecodingtrain.com/
πΎ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
π© Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
π‘ GitHub: https://github.com/CodingTrain
π¬ Discord: https://thecodingtrain.com/discord
βͺ Nebula: https://go.nebula.tv/codingtrain
π Membership: http://youtube.com/thecodingtrain/join
π Store: https://standard.tv/codingtrain
ποΈ Twitter: https://twitter.com/thecodingtrain
πΈ Instagram: https://www.instagram.com/the.coding.train/
π₯ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π p5.js: https://p5js.org
π p5.js Web Editor: https://editor.p5js.org/
π Processing: https://processing.org
π Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new
#forbeginners #javascript #p5js