Programming Challenge No. 132: Fluid Simulation

Programming Challenge No. 132: Fluid Simulation

HomeThe Coding TrainProgramming Challenge No. 132: Fluid Simulation
Programming Challenge No. 132: Fluid Simulation
ChannelPublish DateThumbnail & View CountDownload Video
Channel AvatarPublish Date not found Thumbnail
0 Views
In this video I follow Mike Ash's fluid simulation tutorial and port Jos Stam's algorithm and code "Real-time fluid dynamics for games" to Processing (Java). Code: https://thecodingtrain.com/challenges/132-fluid-simulation

️ p5.js Web Editor sketch: https://editor.p5js.org/codingtrain/sketches/9kVfB4BF2

Previous video: https://youtu.be/0j86zuqqTlQ?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
Next video: https://youtu.be/bl3nc_a1nvs?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
GitHub Issue: https://github.com/CodingTrain/Rainbow-Topics/issues/178
Real-time fluid dynamics for games: http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf
MSAFluid: https://www.memo.tv/msafluid/
Lily pad: https://github.com/weymouth/lily-pad
Fluid simulation for dummies: https://mikeash.com/pyblog/fluid-simulation-for-dummies.html

Video:
Why Laminar Flow is AWESOME: https://youtu.be/y7Hyc3MRKno
What do we know about turbulence?: https://youtu.be/_UoTTq651dE
Perlin noise: https://youtu.be/Qf4dIN99e2w
Livestream archive: https://youtu.be/_LyC2l8g0R8

Related coding challenges:
#24 Perlin noise flow field: https://youtu.be/BjoM9oKOAKY
#102 2D Water Wave: https://youtu.be/BZUdGqeOD0w
#103 Fire effect: https://youtu.be/X0kjv0MozuY

Time stamp:
0:00 Introduction
0:59 Topic suggestion by deardanielxd
3:30 Mike Ash's Fluid for Dummies thesis
6:42 Incompressible fluid
8:45 Speed field
9:12 Dye density
11:14 Port the code to Processing
15:47 addDensity() function
19:34 Diffuse
23:35 Project
25:52 Advect
30:17 Setting boundaries
33:05 Mirror speed in boundary layers
36:19 Time setting function
38:58 Render Density
Add 44:10 fade
46:40 Add Perlin noise
48:00 PAdd vector
50:35 Summary and next steps
52:22 Adjustments to the code

Edited by Mathieu Blanchette
Animations by Jason Heglund
Music by 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
Shop: https://standard.tv/codingtrain
️ Twitter: https://twitter.com/thecodingtrain
Instagram: https://www.instagram.com/the.coding.train/

Programming Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
Introduction 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 automatically generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new

#fluidsimulation #turbulentfluidflow #processing

Please take the opportunity to connect with your friends and family and share this video with them if you find it useful.