Coding Challenge #24: Perlin Noise Flow Field

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024

Комментарии • 297

  • @emilybjoerk
    @emilybjoerk 7 лет назад +260

    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.

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +97

      Really great point, thank you.

    • @PhilBoswell
      @PhilBoswell 7 лет назад +17

      A minor extra optimisation could be to save the calculated vector in the flowfield array so that particles in the same square can share it, assuming that wiping the array on each cycle doesn't slow things down again.

    • @drewjamesandre
      @drewjamesandre 6 лет назад +6

      Hey Emily, I see what you mean here! Nice tip.
      There is a lot of empty space that isn't actually touched by any particle, and it would make sense for each particle to calculate the vector of the "cell" it is currently occupying.
      I'm confused about one thing though. If the flow vector is only calculated once per particle, it seems like it would become less of a "flow field" and more of individual particles moving along a perlin noise defined 2d path, totally separate from other particles. Is that how you see it? So if two particles are close to each other, it may loose that appearence of a flow field?

    • @Moll-ayyy
      @Moll-ayyy 6 лет назад +4

      Drew André I'm not totally sure, but I'd imagine that all the particles would still behave like they all exist in the same flow field because they all access the same noise space, and the zoff variable would be changed globally. I think.

    • @3i33i
      @3i33i 6 лет назад

      ill do it soon

  • @RicoGalassi
    @RicoGalassi 5 лет назад +32

    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

    • @IARRCSim
      @IARRCSim Год назад

      Definitely. It is great he's sharing on youtube too, though. youtube reaches a lot more people and mostly people who are actually looking for content like his. Computer science students often need to take whatever class they're in if they want to graduate so the level of enthusiasm for what is taught tends to be lower.

  • @J_Abad
    @J_Abad 7 лет назад +81

    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

  • @abara5678
    @abara5678 7 лет назад +19

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

  • @Algebrodadio
    @Algebrodadio 7 лет назад +82

    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.

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +39

      Oh, this is a very good and important point, thank you!!

    • @Algebrodadio
      @Algebrodadio 7 лет назад +2

      I love these videos - don't change a thing!

    • @erispe
      @erispe 3 года назад +3

      Is this why the particles are getting stuck at the canvas border?

    • @ColinPaddock
      @ColinPaddock 5 дней назад

      Using a 3d Perlin evaluated on a toroidal surface could potentially help here. Or continuously creating new particles at random locations as particles fall off of the edges.

  • @adilrabbani3562
    @adilrabbani3562 6 лет назад +11

    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.

  • @70TakeAway1
    @70TakeAway1 7 лет назад +3

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

  • @marco_gallone
    @marco_gallone 5 лет назад +5

    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!

  • @likeyou3317
    @likeyou3317 5 лет назад +3

    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..

  • @mctuble
    @mctuble 7 лет назад +1

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

  • @theetherbelow
    @theetherbelow Год назад

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

  • @rebnoz5356
    @rebnoz5356 7 лет назад +4

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

    • @JesseUnderscoreMartin
      @JesseUnderscoreMartin 7 лет назад +2

      Philip Merian Why not start learning now? Daniel has a ton of great videos for beginners!

    • @kenan2386
      @kenan2386 3 года назад

      @@JesseUnderscoreMartin Yea i agree Rebnoz should learn coding! Its not hard and is more than good to learn!

  • @leberkassemmel
    @leberkassemmel 7 лет назад +48

    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!

    • @sallerc
      @sallerc 7 лет назад +11

      Wow, that's dedication... I couldn't bare to watch anything in 144p :)

    • @leberkassemmel
      @leberkassemmel 7 лет назад +1

      salle rc Yes. But imo it is not worth 50$ a month more just to watch them in 360p...

    • @sallerc
      @sallerc 7 лет назад +1

      Michi Lo Ah I see. That's expensive, where do you live?

    • @leberkassemmel
      @leberkassemmel 7 лет назад +1

      salle rc Germany. Bavarian Forest. Nowhere near other civilisation.

    • @sallerc
      @sallerc 7 лет назад +1

      Didn't realize it's that expensive in Germany, but guess the "nowhere near civilization"-part has something to do with it :) You should move to Sweden, I pay like 15EUR/month for a 100MBit connection.

  • @onnio7998
    @onnio7998 2 года назад +3

    I got wayy into optimizing this. I can simulate 50 000 particles for 500 iterations in a second. The color of the traces can be dynamically changed. Thinking of making a video of it at some point.

    • @krccmsitp2884
      @krccmsitp2884 2 года назад +1

      Would be great to see that video and code.

  • @stephenwalsh1006
    @stephenwalsh1006 8 лет назад +7

    Thank you very much for this series! You are a very talented teacher

  • @Yutte3k
    @Yutte3k 2 года назад +1

    Not sure if someone has said this yet, A problem that I've seen is that when you draw the line from prevPoint to pos, there's some overlap of the lines, which if you're using alpha will produce circles at each of the points where the line is drawn. If you have a maxspeed which all of the particles reach, they end up creating dots at a uniform distance from each other.
    A fix that I think works is to add "strokeJoin(MITIR)" which makes all of the points at which the strokes join a flat line instead.

  • @danielk1560
    @danielk1560 4 года назад +2

    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!

    • @px64
      @px64 4 года назад +2

      I was running in 4k with half a particle, same with me! , no lag at all..

  • @ilustrado7291
    @ilustrado7291 7 лет назад +203

    I can't stop watching your videos man!

    • @ilustrado7291
      @ilustrado7291 7 лет назад +2

      ProCactus Hahaha! Exactly, my man. These concepts and ideas are really interesting - and his energy and enthusiasm reminds me of the "perfect" college professor. Hehe. He's really fun.
      I remember 2 quotes: "The secret to creativity is knowing how to hide your sources" and "Steal like an artist". We'll stand on the shoulders of giants! ;)

    • @ilustrado7291
      @ilustrado7291 7 лет назад

      ***** ProCactus Hahaha! Nice! If you guys are on github (which is a must), you can upload your codes there so that we can all learn together. ;) Have fun guys!

    • @abara5678
      @abara5678 7 лет назад +2

      Me neither and i have never even written one bit in any Coding Language =)

    • @HenriqueMRocamora
      @HenriqueMRocamora 7 лет назад

      I KNOW THAT FEEL

    • @hiperesp
      @hiperesp 5 лет назад

      Me2 haha

  • @anthonyikedakolar9375
    @anthonyikedakolar9375 7 лет назад +5

    dude you are blowing my mind

  • @SpringySpring04
    @SpringySpring04 3 года назад

    I can't get over the fact that there are random sitcom laughter clips playing in the background at some points of the video lol

  • @Hyuts
    @Hyuts 5 лет назад +2

    I like the video as fast as my cursor can get to the button. Succinct as always. Thank you.

  • @dawnstar24
    @dawnstar24 3 месяца назад

    25:42 the people laughing in background feels like he is doing a comedy skit.

  • @kairotox
    @kairotox 5 лет назад +2

    I was trying to figure out a way to make the smoke like lines fade over time, and I'm not really a programmer, so I'm really just spitballing here, but one option might be to have the smoke draw on a transparent white layer that also draws every time the program draws. So every time it's adding a bit of white to everything that wasn't just drawn, eventually making old lines fade out. There's probably a better way to do it, and I'm not sure if my way would even work.

  • @meikurogame9595
    @meikurogame9595 7 лет назад

    I swear to God I want that t-shirt so bad hahaha. You're always so fun and interesting to watch, keep up!

  • @deenchen4822
    @deenchen4822 7 месяцев назад

    The way the particles are limited with a maximum speed reminds me of how light is limited as the object with the maximum speed in the world.

  • @definty
    @definty 3 года назад

    You could use the Simplex Noise algorithm its more effcient and does the same thing.

  • @johankarlsson20
    @johankarlsson20 7 лет назад +1

    All my Simplex Noise Flow Field creations as CodePen TV: codepen.io/tv/Dwgqqd

  • @stanger963
    @stanger963 6 лет назад +8

    "There's a bunch of few different things" xD

  • @thomaswaller4517
    @thomaswaller4517 8 лет назад +1

    That is a really nice program. Good job mate.

    • @TheCodingTrain
      @TheCodingTrain  8 лет назад

      Thank you!

    • @thomaswaller4517
      @thomaswaller4517 8 лет назад

      I have a question, I want to build a Indie game, with sound, and good graphics, and I want to code the whole engine myself, not use unity or anything, what language should I be using for such task? It's a Puzzle Platformer, and some creature like enemies will be in the game.

  • @kevnar
    @kevnar 6 лет назад

    The crux.
    Such a great word.

  • @aurelianobuendia24
    @aurelianobuendia24 7 лет назад +40

    Im the only one hearing those creepy laughs ?

    • @zahidahmed586
      @zahidahmed586 6 лет назад +2

      AHHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHA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AHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHHAHAHAHHAHAHAHAHHAHAHAHAHAHHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAH

    • @marcthompson647
      @marcthompson647 5 лет назад

      No you aren't

    • @pflintaryan8336
      @pflintaryan8336 4 года назад

      i think they are having party next door.

  • @Pingoooeen
    @Pingoooeen 3 года назад

    Love it!
    Even though what you did in the end was pointless

  • @brothajonze
    @brothajonze 2 года назад +1

    Just brutal watching this guy fumble and stumble over text that brackets his life.

  • @lemonlordminecraft
    @lemonlordminecraft 7 лет назад

    I went back and watched them. Now I'm here.

  • @JohnDoe_1237
    @JohnDoe_1237 6 лет назад

    0:06 omg nice, this looks great
    :D

  • @alexandralazarevski3265
    @alexandralazarevski3265 7 лет назад +1

    where is this video on wind flows based on geo locations! !! Dying to see this!

  •  6 лет назад +1

    25:00 the force is strong with this one

  • @yasiin_miim
    @yasiin_miim 4 месяца назад

    8:57
    you are a great loving tecaher Daniel :)))

  • @alexpraturlon1873
    @alexpraturlon1873 7 лет назад

    +Danial Shiffman Love the videos. I enjoy following along using processing and learning a bunch including the converting from P5 to processing.

  • @karanverma1
    @karanverma1 8 лет назад

    thanks a lot for such amazing stuff... looking forward for upcoming videos

  • @ResanChea
    @ResanChea 5 лет назад +3

    do you do these tutorials for the processing version? because i want to start learning processing more but most of the interesting projects are on p5js

  • @jialiu518
    @jialiu518 7 лет назад

    n dimension Perlin noise = the sound of minds being blown right now

  • @torwine4895
    @torwine4895 2 года назад

    Thanks a lot :-)
    Now i make beautifull pictures in Java.
    That's a nice playground.

  • @stephendelacruzone
    @stephendelacruzone 9 месяцев назад

    Wow! 🤩

  • @gm_000
    @gm_000 7 лет назад +5

    I do not understand 25:30 - Why do the vectors mostly point toward left? And why multiplying by 4? If noise returns between 0 and 1 and we multiply by 2PI we should have already the correct values... What am I missing?

    • @ronnetgrazer362
      @ronnetgrazer362 5 лет назад

      When the increment variable was set to 1, all the tiles were mid grey. He then changed it to 0.1, and he got more variation, but nowhere near a range between black and white.

    • @iminni3459
      @iminni3459 5 лет назад +2

      The values tend to be around 0.5 so if you multiply by 2PI they will tend to be around PI (which is the left direction).

    • @Kitulous
      @Kitulous 5 лет назад

      @@iminni3459 Does this have to do something with the Gaussian distribution?

    • @iminni3459
      @iminni3459 5 лет назад

      @@Kitulous maybe I'm not really sure

  • @umarfarooque8500
    @umarfarooque8500 4 года назад

    i challenge you make random moving particle and make attraction each other like gravity

  • @NinJaTurtleSplinter
    @NinJaTurtleSplinter 7 лет назад +9

    21:20 for a second i thought hes not wearing pants

    • @redpepper74
      @redpepper74 4 года назад

      Oslo Cloonson Yep, I did a double-take too. Deception 100

  • @emrenitim83
    @emrenitim83 3 года назад

    Thank you, great video

  • @SunroseStudios
    @SunroseStudios 2 года назад

    when the particles wrap you're updating their position before you set the previous one
    we know we're like 6 years late but just fyi

  • @bono95zg
    @bono95zg 7 лет назад

    love how detalied the tutorial is haha

  • @kocaksaid
    @kocaksaid 7 лет назад +4

    "We need to talk, meet at this camera. Actually never mind."
    -Shiffman 2017

  • @danrobinson1729
    @danrobinson1729 8 лет назад +2

    This is so rad. I'm loving your books Dan.

  • @arunprabhu8120
    @arunprabhu8120 4 года назад

    Sorry for such a silly query, but shouldn't zoff be incremented outside the y loop?

  • @emergingbits
    @emergingbits Год назад

    my computer just lags when I try to follow these instructions line by line midway through the video. not entirely sure how others are doing.

  • @tobyzxcd
    @tobyzxcd 7 лет назад +12

    This was Uploaded on my birthday, Man... June 27th is an awesome day

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +2

      +Toby Brooks happy belated!

    • @tobyzxcd
      @tobyzxcd 7 лет назад

      Thanks Dan, and Thanks for the Great Video !

    • @WhiteIce2112
      @WhiteIce2112 7 лет назад

      Toby Brooks we share the same birthday.

  • @kennys1881
    @kennys1881 6 лет назад

    @0:38 the good feeling when u really do it..

  • @reidzuckerman
    @reidzuckerman 5 лет назад

    Referring to 6:50 I wasn't able to get a new angle to change the vectors. All it displays is the lines shown at 6:45 no matter what I put in p5.Vector.fromAngle(). I have P5 imported correctly. Did anyone else run into this issue?

    • @TheCodingTrain
      @TheCodingTrain  5 лет назад

      Would you mind asking at discourse.processing.org/! It's a better platform for Processing and p5.js related code questions. You can share code there easily! Feel free to link from here to your post.

  • @nukiolbartes6279
    @nukiolbartes6279 3 года назад

    Whats the algorithm for the audio background noise?

  • @robogaming3045
    @robogaming3045 5 лет назад +1

    And remember kids: Shiffman is a particle

  • @skydeng1647
    @skydeng1647 8 лет назад

    learn a lot, thank you !!!

  • @linchen7258
    @linchen7258 5 лет назад

    Thank you soooo much!! I really like Perlin noise! And I tried to follow the processing you upload in the Github...Can I ask why the effect is different from the version of p5js? sorry about the stupid question, I am just the beginner...

  • @PrivateIsleProductions
    @PrivateIsleProductions 7 лет назад

    excellent work

  • @bevkcan
    @bevkcan 7 лет назад +2

    I want to do a colorful version in 3d space that rotates around the origin. Welp, time to learn processing.

    • @bevkcan
      @bevkcan 7 лет назад +1

      I made some sort of cube that has set length random directed 3d lines in every scl in every axis. I did not use a vector however, but it seems my lines tend to be aligned on a plane. I could post my code here if anyone is interested. I don't think I succesfully made a vector field but I can't really inspect it properly. I think what I made is layers of 2D vector (well they aren't vectors but lines) fields. You also need to download the peasycam library to rotate around. I don't know why I'm writing all this considering nobody cares.

    • @bevkcan
      @bevkcan 7 лет назад +5

      DUDE I MADE IT! It's so damn SATISFYING to see 3d vectors wander over time! I mapped every vector's hue to the perlin noise in its coordinates. It currently lacks particle systems but I think I got this. Not too bad for my first procesing program lol

    • @bevkcan
      @bevkcan 7 лет назад +1

      Carlos Valencia I uploaded a short clip on my channel come take a look

  • @nane1890
    @nane1890 8 лет назад

    omg! you're awesome!!!

  • @polacknil5047
    @polacknil5047 Год назад

    Does this mean processing is way more efficient than P5 ?

  • @Robag21
    @Robag21 7 месяцев назад

    How is this possible to export it in SVG file format?

  • @bernard7685
    @bernard7685 4 года назад

    Where's the starting code, I would like to code along.

  • @connerverret6443
    @connerverret6443 5 лет назад

    At around 13:30 of the video, what does the line this.acc.mult(0); do? I know that it is multiplying the acceleration vector by a zero scalar, but what does that actually do?

    • @TheCodingTrain
      @TheCodingTrain  5 лет назад

      I cover this in section 2.3 of nature of code! natureofcode.com/book/chapter-2-forces/

  • @l.5987
    @l.5987 10 месяцев назад

    Does anybody have the code for the processing sketch?

  • @kps2642
    @kps2642 7 лет назад

    i like your videos man , but i am too busy with with c++, can i do this in c++ ? i do plan to learn JS in the future

  • @butzenmummel5093
    @butzenmummel5093 7 лет назад +1

    Is there a way to delete the drawn pixels after an amount of time, so you can run an infinite animation and create some kind of "snakes"

    • @raphschru9865
      @raphschru9865 7 лет назад

      Yeah, you would have to decrease regularly the pixels' luminosity by drawing a new point over each of them, with the luminosity of the pixel in question minus a certain gradient

    • @jacobcowan3599
      @jacobcowan3599 7 лет назад

      Alternatively, draw over the entire screen with the background color but a very small alpha, so rather than clearing it's fading the old

  • @nicolasgaritagoitia5536
    @nicolasgaritagoitia5536 3 года назад

    why do the points disappear over time? I'm at 25:07 of the the video

  • @mohamedmhmood2940
    @mohamedmhmood2940 7 лет назад +3

    انت انسان مبدع

    • @jesuschrist6979
      @jesuschrist6979 7 лет назад +3

      mohamed mhmood ALLAN SNACKBAR

    • @giganooz
      @giganooz 7 лет назад

      Jesus Christ Lol ur the best

  • @ariseyhun2085
    @ariseyhun2085 7 лет назад +1

    Is the code to this in the processing version avaiable anywhere?

  • @Mustafaismail22
    @Mustafaismail22 7 лет назад

    thanks 😘

  • @Shockszzbyyous
    @Shockszzbyyous 7 лет назад

    Your awesome

  • @musicdudejoe263
    @musicdudejoe263 4 года назад

    I'm confused, can you use function draw() in say notepad, or is it something specifically used within p5?

  • @ThEsOuNdInYoU
    @ThEsOuNdInYoU 7 лет назад

    i like your videos, but preview of your finished work could be longer, because right not it to short i think.

  • @MrLemonsplash
    @MrLemonsplash 5 лет назад +2

    "So I'm moving through time a little bit too quickly".
    This is a normal quote from a completely normal person that didn't use drugs 10:40 minutes ago

  • @michaeldere2892
    @michaeldere2892 7 лет назад

    Im new to this, how do I get started? I know some js, but willing to learn more.

  • @iNuchalHead
    @iNuchalHead 2 года назад

    8:33 Does The Coding Train have a laugh track? (EDIT: That was not intended as pun.)

  • @devilkhan8
    @devilkhan8 4 года назад

    i was following along i wrote the code
    var increment = 0.01;
    var scale = 20;
    var cols, rows;
    function setup(){
    createCanvas(200,200);
    cols = floor(width / scale);
    rows = floor(height / scale);

    }
    function draw (){

    var yoffset = 0;
    for (var y = 0; y < rows; y++)
    {
    var xoffset = 0;
    for (var x = 0; x < cols; x++)
    {
    var index = (x + y * width) * 4;
    var r = noise(xoffset, yoffset) * 255;
    xoffset += increment;
    fill(random(255));
    rect(x * scale, y * scale, scale, scale);
    }
    yoffset += increment;
    }
    yet for some reason i could not get the cubes to show

  • @eotikurac
    @eotikurac 8 лет назад

    my rectangles have some kind of a freaky shadow on the inside of the right edge.

  • @bastibob660
    @bastibob660 4 года назад

    Can i see the code for the processing version anywere?
    I tries myself and it works but doesent look as cool as in the version in the video and i want to check whats diffrent
    Sry for my bad english

    • @kentcollins4570
      @kentcollins4570 4 года назад

      Try thecodingtrain.com/CodingChallenges/024-perlinnoiseflowfield.html

    • @bastibob660
      @bastibob660 4 года назад

      Thank you🙏

  • @pflintaryan8336
    @pflintaryan8336 4 года назад

    if u have not watch my videos on Perlin noise , go watch and come back ! In the same line , ha ! u are back!

  • @toastyPredicament
    @toastyPredicament 2 года назад

    What am I supposed to not do about it

  • @beaverjoe9171
    @beaverjoe9171 6 лет назад

    I change the background to black and the line to red looks like blood vein. Thats cool but i need many time to understand

  • @realcygnus
    @realcygnus 7 лет назад

    Top Notch

  • @luiska49
    @luiska49 5 лет назад

    he didnt use it as thumbnail

  • @whatever13579
    @whatever13579 Год назад

    I feel like people are making perlin noise in the background

  • @user-sk4xb7fz4p
    @user-sk4xb7fz4p 6 лет назад +1

    this is awesome
    does anybody know a lib for python to do some similar drawing ?
    I do love this channel but I prefer to use py

    • @JonnyDaenen
      @JonnyDaenen 5 лет назад

      PyProcessing: it's the Python version of Processing. see py.processing.org

  • @arpandhatt6011
    @arpandhatt6011 5 лет назад

    webassembly to the rescue

  • @oguzyardmc8551
    @oguzyardmc8551 6 лет назад

    Okey I liked

  • @benfriedman9620
    @benfriedman9620 2 года назад

    33:21 when a man enters a woman’s bathroom 😂

  • @logy80
    @logy80 7 лет назад

    WOW

  • @rezaooivala
    @rezaooivala 6 лет назад

    Can you please share the code of the Processing version as well please

    • @TheCodingTrain
      @TheCodingTrain  6 лет назад

      Can you file a github issue at github.com/CodingTrain/website if it is not available there?

  • @jackepner9984
    @jackepner9984 2 года назад

    Won't run... looked over the whole tutorial, went to your github, getting errors... none of the functions you are calling for particles[i] are recognized...

    • @qualle987123
      @qualle987123 2 месяца назад

      You had p5.js installed, right?

  • @BrotherSquid
    @BrotherSquid 7 лет назад

    Is this a hair generator?

  • @micky2be
    @micky2be 4 года назад

    The background noise is so perturbing

  • @xxwaldi
    @xxwaldi 6 лет назад

    edges function can be simplified:
    this.pos.x = this.pos.x % width;
    this.pos.y = this.pos.y % height;