Processing
This week we learnt about processing (What is is, how to use it and how it can be used).
We first started off by creating an account on openprocessing.org.
Here is a link to my account on there : Abigail - OpenProcessing
After making an account we made our first sketch. The default sketch code draws circles where you move the mouse:
function setup(){ //function is called when the sketch is setup.
createCanvas(windowWidth,windowHeight); //sets canvas to screen size.
background (100) //creates a background with the colour of 100, a 255 here would be white and 0 would be black, so 100 is inbetween.
}
function draw(){
ellipse(mouseX,mouseY,20,20); //draws a oval with the size 20 by 20 pixels, at the point of the mouse.
}
We then explored how to edit this code and how we could change the shape. There was also a button which looks like a bookmark which gives you links to informative pages (including examples) about the different options for the available code terms.
We also needed to remember to add comments with // to reference what the code does and where you found it.
There is also a button to create a fork, a fork creates a new copy of the sketch which you can edit. This is helpful for saving different versions of a sketch.
Throughout the 3 lessons we learnt how we could create shapes/lines with the code, how to add images/videos (including webcam video) and how we could incorporate sound.
We also got a chance to experiment with the code to create something different. For example there was a code which created 3 circles which expanded whenever you clicked. I made it so that the circles went on their own by adding an if statement when the smallest circle was a certain size. I also incorporated a colour changing effect from another script and I experimented with having the circles controlled by sound and there being multiple circles.
Comments
Post a Comment