Coding Challenge #124: Flocking Simulation
In this coding challenge, I create a flocking simulation in JavaScript based on Craig Reynolds "boids" algorithm. Code: https://thecodingtrain.com/challenges/124-flocking-simulation
πΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/ry4XZ8OkN
π₯ Previous video: https://youtu.be/7gNzMtYo9n4?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Next video: https://youtu.be/Mm2eYfj0SgA?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
π Craig Reynolds' Paper on Boids: https://www.red3d.com/cwr/boids/
π Autonomous Agents - Nature of Code: https://natureofcode.com/book/chapter-6-autonomous-agents/
π The Computational Beauty of Nature: https://mitpress.mit.edu/books/computational-beauty-nature
Videos:
π Original Boids Simulation: https://youtu.be/86iQiV3-3IA
β‘οΈ Vectors - The Nature of Code: https://youtu.be/bKEaK7WNLzM
πͺ Autonomous Steering Agents: https://youtu.be/P_xJMH8VvAE
π΄ Coding Train Live 162: https://youtu.be/qtUV-DoSOpk?t=1350s
Related Coding Challenges:
π #69 Evolutionary Steering Behaviors: https://youtu.be/flxOkx0yLrY
Timestamps:
0:00 Introduction to flocking!
2:07 What are boids?
2:33 Creating a system of boids
7:06 Discussing the flocking algorithm
7:38 Alignment!
21:48 Cohesion!
28:37 Separation!
37:00 Things to try!
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
π 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
#flocking #creativecoding #autonomousagents #processing #p5js