Processing 2.0 – Test 1

Here was my first attempt during a work session.

The first section show the setup of the page. I have set the size too 640×480 with the colour rate to be in HSB (Hue, Saturation, Brightness) and a fast frame rate of 25 frames per second.

// this is my first sketch// void setup (){ size(640,480); frameRate(25); colorMode(HSB, 100); }

The void draw section turns it into an animation rather than a still image. I have placed into e background here so the background reloads itself with each frame change.However i have added ‘random’ so it is different each time. Throughout the code their is mistakes and a lot of mess which I need to go through to improve.

void draw(){ background(random(0,100),random(50,100),100); strokeWeight (12); point(width/2,height/2); strokeWeight (3); //stroke(255,255,0); noStroke(); ellipse(mouseX,mouseY,random(width),random(height)); // drawing an ecllipse fill(random(0,100),random(50,100),100); ellipse(width/2,height/2,300,300);

Lines position set to ‘mouseX’ and ‘mouseY’ means the position will move where the mouse is on the canvas.

strokeWeight(40); stroke(random(0,100),random(0,250),100); line(mouseX,mouseY,random(width),random(height)); //point and text that moves to a random postition on the canvas – current point random strokeWeight(5); fill(random(0,100),random(50,100),100); //point(random(0,width),random(0,height)); text(“SWAG”,random(0,width),random(0,height)); if (keyPressed) { if (key == ‘ ‘) { background(random(0,100),random(50,100),100); } }

To save each frame and make a small video of my interactive graphic I added this last section of code.

saveFrame(“myimage####.png”); }

Here is a small clip of the processing interactive graphic finished.

!!PLEASE DONT WATCH IF YOU’RE EPILEPTIC!!

myimage0001(2) from Hayley Vice on Vimeo.

This piece interests me though the crazy change of colours and the curiosity it gives you because you don’t know what to expect next.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s