In this coding challenge, I visualize a Reaction Diffusion simulation using the Gray Scott model in JavaScript (with the p5.js library). Code: https://thecodingtrain.com/challenges/13-reaction-diffusion ๐น๏ธ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/govdEW5aE ๐ฅ Previous video: https://youtu.be/f0lkz2gSsIk?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH ๐ฅ Next video: https://youtu.be/0jjeOYMjmDU?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH ๐ฅ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH References: ๐ Karl Sims' Reaction Diffusion Tutorial: http://karlsims.com/rd.html ๐ 2D Array Tutorial: https://processing.org/tutorials/2darray/ ๐ My NOC class on Kadenze: https://www.kadenze.com/courses/the-nature-of-code/info Videos: ๐ด Livestream Archive: https://youtu.be/FYRINCEDVKI?t=6697s Related Coding Challenges: ๐ #85 The Game of Life: https://youtu.be/FWSR_7kZuYg ๐ #90 Floyd-Steinberg Dithering: https://youtu.be/0L2n8Tg2FwI ๐ #103 Fire Effect: https://youtu.be/X0kjv0MozuY Timestamps: 0:00 Introducing today's topic 0:36 The Gray-Scott model 1:41 Key pieces of the algorithm 4:24 Convolutions 7:01 2D arrays 9:00 The grid stores the amount of a and b chemicals across every pixel 10:30 Create another array to store the next generation 11:37 Dealing with the pixel array 12:55 Set the pixel colors based on the amount of a and b 16:14 Write a function to swap the current and next grid 19:30 Add the reaction diffusion formulas to the code 24:27 Time steps 27:29 Add the Laplace functions 33:45 Seed a whole area with b 36:37 Recap of the code and suggestions for creative possibilities 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://discord.gg/hPuGy2g ๐ 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 #math #reactiondiffusion #javascript #p5js