Coding Challenge #24: Perlin Noise Flow Field

preview_player
Показать описание


References:

Videos:

Related Coding Challenges:

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

#perlinnoise #arrays #p5js
Рекомендации по теме
Комментарии
Автор

You are computing the whole vector field every frame even though you only use a fraction of the vectors. Give the perlin noise function as an argument to the vector follow function and compute the flow vector once per particle instead. It should improve your performance significantly and make it independent of the resolution and only depend on the number of particles.

emilybjoerk
Автор

I can't stop watching your videos man!

ilustrado
Автор

Instead of setting a max speed you could create a viscous friction force so that it's proportional to the particle's speed, that way everything will behave more like a fluid

J_Abad
Автор

Just watching some of your older videos Dan. Makes me wish I had you as a comp sci professor in college. I would've loved it so much more

RicoGalassi
Автор

When your particles 'wrap around', you're giving their position space a toric symmetry. But the perlin noise doesn't have the same symmetry so it will be discontinuous at the boundary of the canvas.

Algebrodadio
Автор

Man i love this guy´s attitude and character =). So excited about what he is doing and a real sense of humor!

abara
Автор

I'm feeling so pleased with myself right now, because I followed through the first two thirds of the tutorial and then took it from there and came up with a lot of Dan's solutions by myself. I feel like a big boy who just used the toilet without any help for the first time.

frmcf
Автор

I'm an accounting major but can't seem to stop watching your videos even though I understand absolutely nothing. Great work.

TakeAway
Автор

"Ugh you're back, great!" gotta love Shiffman <3

vaguebrownfox
Автор

Hey Dan! I like watching all your videos and wish I had a teacher like you at my University. You explain the most convoluted of things in a very fun and easy way. Taking them part by part. I am really thinking of applying for the Masters program at NYU after watching your videos.

adilrabbani
Автор

Was looking for inspiration for generative art for pen plotting and this video is still useful, 6 years later. Thank you!

theetherbelow
Автор

This was my favourite illusion yet! This would look so cool if it were a candle blow out animation. You should keep it exactly as is but delete (or let the alpha fade out over time) previous points so that it creates a more dynamic smoke effect!

marco_gallone
Автор

This is the most beautiful thing I've seen this day, shame on me that I haven't checked all of the coding challenges yet..

likeyou
Автор

I like you. You make your code big enough, so even with a resolution of 144p i can still read it.

I know, i should get faster internet. But it is so expensive!

leberkassemmel
Автор

Just your quick sketch looks really cool. And the rest, too.

phoebebaker
Автор

I don't know anything about programming, but stil I'm watching your videos, because you're so excited about it. 😅

rebnoz
Автор

These are by far my favorite coding videos and are getting me interested again in coding. Thank you for that.

mctuble
Автор

This is the funnest code-related channel out

gloverelaxis
Автор

Thank You! Great video. Fortunately, I didn't have these performance issues... Was running it on 1920x1080 at 5 particles and got stable 80 fps!

danielk
Автор

I just found this channel and learned so much already. I think Perlin Noise is my new favorite thing and can't wait to start playing with it!

ya
join shbcf.ru