In this coding challenge, I use Perlin noise to create a two-dimensional flow field with the p5.js library. Code: https://thecodingtrain.com/challenges/24-perlin-noise-flow-field
๐น๏ธ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/vDcIAbfg7
๐ฅ Previous video: https://youtu.be/ksRoh-10lak?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ฅ Next video: https://youtu.be/RkuBWEkBrZA?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ฅ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
๐ p5.js noise() reference: https://p5js.org/reference/#/p5/noise
Videos:
๐ด Livestream Archive: https://youtu.be/sor1nwNIP9A
๐ฅ My videos about Perlin Noise: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6bgPNQAdxQZpJuJCjeOr7VD
Related Coding Challenges:
๐ #11 3D Terrain Generation with Perlin Noise in Processing: https://youtu.be/IKB1hWWedMk
๐ #132 Fluid Simulation: https://youtu.be/alhpH6ECFvQ
๐ #C4 - Coding in the Cabana Worley Noise: https://youtu.be/4066MndcyCk
Timestamps:
0:00 Introduction
0:35 Two dimensional Perlin noise
2:02 Scale
5:08 Create a vector
5:45 Draw vector as a line
7:09 Random angle
8:10 Flow field
9:24 N-dimensional Perlin noise
9:53 Add zoff
11:56 Add Particle class
15:26 Add particles
16:26 Add edges()
17:34 Have particles be affected by vectors
18:34 Flowfield array
21:00 Follow()
22:56 Set magnitude of vectors
26:42 Add alpha
27:36 Store particle's previous position
27:56 Draw line between current and previous position
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
#perlinnoise #arrays #p5js