4.1: Particle System Simulation - The Nature of Code @TheCodingTrain
4.1: Particle System Simulation - The Nature of Code  @TheCodingTrain
Uploaded March 2021 | Updated September 2026, 1 week ago
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: thecodingtrain.com/tracks/the-nature-of-code-2/noc/4-particles/1-particle-system

πŸ•ΉοΈ p5.js Web Editor Sketch: editor.p5js.org/codingtrain/sketches/QRzgzQLnQ

πŸŽ₯ Next video: youtu.be/wDYD3JVtOys?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
πŸŽ₯ All videos: 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: youtu.be/UcdigVaIYAk
πŸŽ₯ Simulating Forces: youtu.be/Uibl0UE4VH8
πŸŽ₯ Arrays of Objects: youtu.be/fBqaA7zRO58
πŸŽ₯ Fireworks!: youtu.be/CKeyIbT3vXI
πŸŽ₯ Array Functions: filter(): youtu.be/qmnH5MT_luk
πŸŽ₯ Removing Objects from Arrays: 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: thecodingtrain.com
πŸ‘Ύ Share Your Creation! thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: github.com/CodingTrain/Suggestion-Box
πŸ’‘ GitHub: github.com/CodingTrain
πŸ’¬ Discord: thecodingtrain.com/discord
βœͺ Nebula: go.nebula.tv/codingtrain
πŸ’– Membership: youtube.com/thecodingtrain/join
πŸ›’ Store: standard.tv/codingtrain
πŸ–‹οΈ Twitter: twitter.com/thecodingtrain
πŸ“Έ Instagram: instagram.com/the.coding.train

πŸŽ₯ Coding Challenges: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Intro to Programming: youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

πŸ”— p5.js: p5js.org
πŸ”— p5.js Web Editor: editor.p5js.org
πŸ”— Processing: processing.org

πŸ“„ Code of Conduct: github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecodingtrain.com/issues/new

#forbeginners #javascript #p5js
4.1: Particle System Simulation - The Nature of CodeCoding Train 2022 in Review, Plans for 2023Why Language Models Surprise YouCoding Challenge #97: The Book of Pi - Part 1Coding Challenge #140: Pi Approximation with Leibniz SeriesCoding Challenge 165: Slide Puzzle5.5 Wander Steering Behavior - The Nature of CodeCoding Train Stickers 2023 Last Call!More Nature of Code Chapter 2, + 3D Fractals?Welcome (again) to the New Studio - Topics TBDFlocking rule 4? #genuary19Did I finish Nature of Code?
The Coding Train |

4.1: Particle System Simulation - The Nature of Code

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER