Developing in Processing

Progress with Processing is moving fast! This week we have been looking at more complex geometry creation using rotation, if and for statements and arrays. Rotation is one of the best way in ways to get complex and complicated structures with a small amount of code. By using a series of loops and iterations of a simple rotating shape like a square, arch or triangles. The key principle from trying loops and rotate shapes I can take away is that a simple shape can be used to build up far more complex structures.

In terms of the code to produce images the for loops were key to its production

void draw(){
pushMatrix();
translate(width/2, height/2);
rotate(r);
noFill();
rect(sq,100, 50,50);
r=(r+1);
sq=(sq+180)%200;
popMatrix();
}

Key parts of the codes I have learnt from this exercise is:

Translate: This is where the (0,0) on the axis is positioned

Push/pop matrix: This is the opposite of translate and puts the axis centre back to the top left hand corner

Loops: This is where a value is changed when the code runs and 2nd, 3rd, and so on

Rotating different shapes at different speeds creates range outer and internal angles. The layering up of different amounts of shapes creates darks and lights within the image giving the geometry more depth and fluidity. Rotating shapes like triangles gave unusual results. Like a range of stepped lines which seemed to between each section. This is something witch I didn’t expect to be produced and is a fanatic feature of this type of generative images that you don’t exactly know what’s going to be produced.

Exporting images from processing is relatively simple and can be done in a range of different ways. A simple more easily controlled way is to use mouse clicked to activate the capture of the screen. Alternative ways like capturing on a certain frame or a range of frames to create a video is possible. The images are then stored in the saved folder for easy access. This is the way that I used the mouse button to capture the images.

if (mousePressed) {
if (mouseButton==CENTER) {
save(“myoutput#.jpg”);
}
}

From this I’m going to look at some other methods and exercises to expand my knowledge of processing. I would like to look at other ways in which to manipulate shapes like sound or movement to see what kind of abstract art I can produce.

Leave a Reply