Coding Challenge #24: Perlin Noise Flow Field

Subscribers:
1,740,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)