I.5: Perlin Noise – The Nature of Code

In this video I discuss the concept of “Perlin” noise, how it differs from regular “noise” (i.e. randomness) and how to make use of it in Processing.

The Nature of Code


Read along:

Help us caption & translate this video!






26 responses to “I.5: Perlin Noise – The Nature of Code”

  1. Rosemary Fortanely Avatar

    "It's random, but it'll be smooth, so people like it" what I imagined myself as in middle school

  2. Darius Duesentrieb Avatar

    Everything's gonna be okay

  3. تشيهايا تشان Avatar

    ×) i am not lying if i say i love you man , you are incurably awesome
    keep going

  4. Altamash Khan Avatar

    I absolutely love your videos and your style of teaching!!!! One question–> On applying Perlin noise to the Random walker example from one of your previous videos, it turned out that the random walker is biased towards the (-ve,-ve) quadrant, i.e bottom left quadrant. Any explanations.

  5. Brian Link Avatar

    Great energy, you really understand the math and its thought.

    Could you explain the noise function? Not so much its implementation but how and why it works?
    The only thing that limits your vision is how far you can see.

  6. Martin C Avatar

    Anyone looking for a lesson on the map() function can find it here: https://www.youtube.com/watch?v=nicMAoW6u1g
    It's in p5.js, and I haven't used it in Processing yet, but the syntax seems very similar.

    Also, Dan, your videos are great! I'm taking programming this semester and your videos helped me catch up to the rest of the class in processing in a very short time. (they all learned it with this teacher last year, but I had a different teacher, we learned Visual Basic instead)

    Now I'm just here for fun; programming might be what I pursue in university, and I have my teacher to thank for that, so thank you.

  7. Matthieu Batard Avatar

    12:00 so funny your head follows the ball

  8. Kfir Zvi Avatar

    I guess you know that by now, but I'm going to say that anyway – your videos are really helpful and interesting!
    This video inspired me to build a 2D random terrain generator and it looks pretty cool. Thanks a lot 🙂

  9. David James ASMR Avatar

    //Here's a cute little spray painting applet using the mouse position and Perlin noise.

    //Have fun!

    Blotch p;

    void setup() {
    size(600, 600);
    p = new Blotch();


    void draw() {


    class Blotch {
    float x = width/2;
    float y = height/2;
    float z;
    float t = 0;

    void display() {
    ellipse(x, y, 10,10);

    void paint() {

    float z = noise(t);
    float r = noise(t);
    z = map(z, 0, 1, 0, 200);
    r = map(r, 0, 1, 0, 200);
    x = mouseX-20 + random(z);
    y = mouseY-20 + random(r);

    x = constrain(x, 0, width -1);
    y = constrain(y, 0, height -1);
    t+= 0.2;

  10. Aj Stark Avatar

    Sir I'm a little confused.. with that contineous animation(changing frames without writing a loop statement). Is that based on "Processing" platform or the programming language you are using?????

  11. Shockszzbyyous Avatar

    I made a rainbow perlin thingy! 😀

  12. Mohamed Alezzabi Avatar

    Thank you, this is great

  13. Ilustrado Avatar

    Wow, I never thought that the founder of the 'Perlin Noise' is an NYU professor (thought he's from the 18th century or something). Hopefully, we'll have something like "Shiffman Methodology" or something in the near future.. hehehehe.. Aw yeas.

  14. Sohaib Arif Avatar

    Here is something I made with perlin noise by mistake.

  15. Lasse Munk Avatar

    Hi Daniel,

    Just watched this video. Very entertaining – you seem like a warm hearted human being hehe 🙂

    Thanks a lot for sharing!

  16. Miscellaneus Avatar

    What is the difference between perlin noise (in Processing) and brownian motion(used in SuperCollider)?

    P.S.: your tutorials are great, I learned to code with your videos, Thanks!!!

  17. Julian Abhari Avatar

    I'm programming this in Java, how do you create the noise function? Is it just a normal function with an int parameter and it returns a ran between 0 and 1?

  18. Rainbowzombay Avatar

    Thanks so much! I came from Khan Academy, I couldn't understand it much until I actually watched a video instead of reading it xD

  19. DLC ENERGY Avatar

    Is there a tutorial on the algorithm in the noise function?
    If anyone has a link to some example code, or whatever, that'd be awesome…

  20. David Martens Avatar

    He Daniel, thanks for the emotion and energy! Coding videos can use some;) Just started reading on your site. Great great stuff! We are having a seminar (here in the design-school in Cologne) about code and nature, using processing. I was introduced to coding in the nicest way possible. Keep going!

  21. Jeffrey Cordova Avatar

    I liked the high level explanation! I have a feeling I'll be watching a few more of your videos.

  22. HollowBit Avatar

    Fun and well explained, just wish I could see the noise and map functions.

Leave a Reply

Your email address will not be published. Required fields are marked *