From the course: Processing: Interactive Data Visualization

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Using Perlin noise

Using Perlin noise - Processing Tutorial

From the course: Processing: Interactive Data Visualization

Start my 1-month free trial

Using Perlin noise

In this movie, I want to introduce you to a special kind of random function in Processing called noise and this is actually what's called Perlin Noise. And Perlin noise was developed in the movie industry as a way of creating a very realistic and organic looking textures. In this example, I'm going to be using a very simple one-dimensional version of Perlin noise. Just to draw lines of different heights that you can also use it to create two-dimensional and three-dimensional shapes and textures as well. So, for this one, I'm just going to start by putting little comment up at the top and then I'm going to introduce a few variables. I'm going to have an integer variable that's going to determine the number of lines we draw in a picture. Then I'm going to have the height variable called X and we will simply declare without initializing. Then I have the variable Y that will be a float variable, and that's .05. Then I'll have another float variable that we will call noiseY. Okay so, these…

Contents