Coding Challenge #24: Perlin Noise Flow Field
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