Learn creative coding writing simple programs

88. Change pixels using the pixels array

Short review of arrays. We create an array, count how many items it has, print one of the items and also modify one of them.
Then we move onto the pixels array, which allows us to manipulate the graphics by using an array. It probably sounds more complicated than using point(), get() and set(), but it's also much faster. In some cases we will want to use this method. To show an example of using the pixels array we fill the whole screen with random pixels, and we do this inside the draw() function, so we get an animated effect which runs very fast, much faster than updating pixels using point().

Tags: pixels, loadPixels, updatePixels

Code editor

You can make changes to the code below. Then
Below you can ask and answer questions related to this video. If your question is unrelated to the video, please post it at the Processing Forum as I'm unable to help with all of your programs and still have enough free time to eat and sleep :)
comments powered by Disqus