MENU

Fun & Interesting

Coding Challenge 124: Flocking Simulation

The Coding Train 348,643 6 years ago
Video Not Working? Fix It Now

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

Comment