Loading...

Learn programming 39: The candy-space. Understanding noise() with 1 parameter

2,126 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Sep 13, 2011

[Comments and more videos at funprogramming.org]

Fun programming with Processing, episode 39. When we use noise() with one parameter Processing assumes the missing two parameters are 0. We present noise as a function that picks up candies from inside a box. To locate each candy we need to give noise() three parameters: x, y and z. We are used to x and y now from working with the screen. The z represents the depth, so we no longer are limited to the display surface, but we can imagine objects behind the display and objects in front of the display.
This imaginary candy space is full of candies of different colors. Each time our program starts, Processing fills the candy space with candies. But the space has a unique property: candies next to each other are similar in color. You will not find a blue candy next to a green candy. That's the reason why, if you want to get slowly changing colors out of noise(), you should choose candies that are close to each other. That means changing the noise() parameters slowly, in steps smaller than 0.03. With larger increments you probably get very different values out of noise().

Comments are disabled for this video.
When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...