Learning Processing 1

As part of my University course and to get into Java I am learning Processing. Admittedly I was sceptical about this at first however I found this very fun and went away from the Workshop excited and eager to learn more. I learnt the basics of Processing and found it very similar to Javascript and CSS and I feel this helped with the learning curve. The codes were simple but showed an effect and the outcome was impressive to me for such a short space of time given my limited knowledge on it beforehand. I thoroughly enjoyed learning how to make processing draw shapes and lines as well as manipulate them through the size using a random value or a responsive amount such as height/2. During the lesson we explored using the mouse to manipulate where the lines were drawn and I went away and searched how to make something active or inactive upon a mouse click.

Untitled-1

An image showing the lines reacting to the mouse movement to draw (background removed for demonstration purposes).

I found it all very straight forward to manipulate as opposed to when I first learned HTML and CSS. The fact the commands are straight forward without much formatting made a difference in terms of enjoyment. I also like the complexity that can come, hooking into the Twitter API or making Motion Capture displays sounds really interesting and I cannot wait to dive into it.

The code after Lesson 1 is below:

void setup () {

size(640,400);

frameRate(60);
}
void draw() {
background(255);
//this is a point
strokeWeight(5);
stroke(255);
//point(random(0,width),random(0,height));
//this is a line
stroke(random(100,255),random(100,255),random(100,255));
strokeWeight(2);
line(mouseX,mouseY,random(0,width),random(0,height));
//this is a circle
strokeWeight(1);
stroke(random(0,255),random(0,255),random(0,255));
noFill();
//ellipse(random(0,width),random(0,height),100,100);
}

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