Processing, for loops, image processing and if statements

tinting images:

Screen Shot 2014-10-24 at 15.00.01Screen Shot 2014-10-24 at 14.59.46  Screen Shot 2014-10-24 at 15.01.49

getting to grips with for loops

int s=20;

void draw(){

for(int y =0; y<height; y=y+s){
for(int x =0; x<width; x=x+s){

This for loops creates a grid of rectangles to create pixels.


processing tutorials for pixels:

Screen Shot 2014-10-24 at 15.35.41 Screen Shot 2014-10-24 at 15.43.51

using the pixelated image above, I used:

if (mousePressed && mouseButton== LEFT || key==’i’){
} else {

to change the image to another image when clicked or by pressing the i button.


Screen Shot 2014-10-24 at 16.18.05 Screen Shot 2014-10-24 at 16.17.57


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s