Coding Challenge #24: Perlin Noise Flow Field

Subscribers:
1,750,000
Published on ● Video Link: https://www.youtube.com/watch?v=BjoM9oKOAKY



Duration: 33:34
338,846 views
6,913


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







Tags:
noise
perlin
series
perlin noise
terrain
tutorial
terrain generation
procedural generation
2d perlin noise
perlin noise processing
nature of code
processing perlin noise
p5.js
p5js
p5.js tutorial
p5js noise
p5js perlin noise
flow fields
perlin noise flow field
noise()
random()
randomness
coding
flow
creative coding
coding challenge
javascript
javascript (programming language)