In this coding challenge, I visualize a Reaction Diffusion simulation using the Gray Scott model in JavaScript (with the p5.js library). Code: thecodingtrain.com/challenges...
🕹️ p5.js Web Editor Sketch: editor.p5js.org/codingtrain/s...
🎥 Previous video: • Coding Challenge #12: ...
🎥 Next video: • Coding Challenge #14: ...
🎥 All videos: • Coding Challenges
References:
📖 Karl Sims' Reaction Diffusion Tutorial: karlsims.com/rd.html
📓 2D Array Tutorial: processing.org/tutorials/2dar...
📕 My NOC class on Kadenze: www.kadenze.com/courses/the-n...
Videos:
🔴 Livestream Archive: • Live Stream #39: Q&A a...
Related Coding Challenges:
🚂 #85 The Game of Life: • Coding Challenge #85: ...
🚂 #90 Floyd-Steinberg Dithering: • Coding Challenge #90: ...
🚂 #103 Fire Effect: • Coding Challenge #103:...
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: thecodingtrain.com/
👾 Share Your Creation! thecodingtrain.com/guides/pas...
🚩 Suggest Topics: github.com/CodingTrain/Sugges...
💡 GitHub: github.com/CodingTrain
💬 Discord: / discord
💖 Membership: ru-vid.comjoin
🛒 Store: standard.tv/codingtrain
🖋️ Twitter: / thecodingtrain
📸 Instagram: / the.coding.train
🎥 Coding Challenges: • Coding Challenges
🎥 Intro to Programming: • Start learning here!
🔗 p5.js: p5js.org
🔗 p5.js Web Editor: editor.p5js.org/
🔗 Processing: processing.org
📄 Code of Conduct: github.com/CodingTrain/Code-o...
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecod...
#math #reactiondiffusion #javascript #p5js
10 июл 2024