
background ( 10, 80, 100) – By @AroundSkadri
By Adriano Sganzini
background ( 10, 80, 100)
I started my new passionate project the second day of school. The Idea was to become a master of coding! But I soon discovered that it was very boring and very long to learn properly. I will thus explain what I learned about coding.
First of all you need to download “Processing”, a free opensource sketchbook to learn how to code.
This program applies more to the context of visual art than to other fields.
https://processing.org/download/
when finished installing it, come back to this page.
“Processing” is a really simple basic program that will help you to understand how coding works and what you can do with it. It presents itself as a blank page that you have to fill with the code and a play button that generates the code.
Here are some examples that I created during this week of coding ,following the tutorial HelloProcessing
To see and discover the code ,copy and paste in processing,then click play.
Example 1
background ( 10, 80, 100);
size (500,500);
stroke(0);
fill(255,0,0);
rect(250,200,100,75);
stroke(0);
fill(125,100,0);
rect(100,200,200,5);
stroke(0);
fill(0,255,0);
rect(100,50,150,150);
Example 2
size(1000,1000);
background(random(255),random(255),random(255));
stroke(random(255),random(255),random(255));
fill(random(255),random(255),random(255));
rect(250,200,800,800);
stroke(random(255),random(255),random(255));
fill(random(255),random(255),random(255));
rect(250,200,300,300);
stroke(random(255),random(255),random(255));
fill(random(255),random(255),random(255));
rect(250,200,300,300);
stroke(random(255),random(255),random(255));
fill(random(255),random(255),random(255));
rect(0,0,250,200);
stroke(random(255),random(255),random(255));
fill(random(255),random(255),random(255));
ellipse(250,200,150,150);
these were two static examples of basic drawing with code. Now that you understand what you can do with the basics, let’s try the more interactive funny stuff.
example of drawing with code:
(click and move the mouse for drawing)
void setup() {
size(1000,1000);
background(255);
}
void draw() {
if (mousePressed) {
stroke(0);
fill(0);
ellipse(mouseX,mouseY,50,50);
}
}
example of random drawing with code:
(click and move the mouse for drawing)
void setup() {
size(1000,1000);
background(255);
}
void draw() {
if (mousePressed) {
stroke(random(500));
fill(random(255),random(255),random(255));
ellipse(mouseX,mouseY,random(300),random(300));
}
}
example of random drawing with code:
(move the mouse around and draw)
void setup() {
size(1000,1000);
background(random(255), random(255), random(255));
fill(random(255), random(255), random(255));
}
void draw() {
float diameter = random(50);
ellipse(mouseX, mouseY, diameter, diameter);
}
example of random drawing with code:
(click and move the mouse around and draw)
void setup () {
size (1000,1000);
}
void draw() {
if (mousePressed) {
stroke(255,255,255);
fill(random(255),random(255),random(255));
} else {
triangle(mouseX,mouseY,50,0,X,Y);
}
}
example or random drawing with code:
(click to reset background, move the mouse and draw)
void setup() {
size(1000, 1000);
background(0);}
void draw() {
if (mousePressed) {background(0);
}
else{
float pop= random(100);
fill(random(250),random(250),random(250));
ellipse(mouseX,mouseY,pop,pop);}
}
example of random drawing with code:
(click to reset background, move the mouse to draw)
void setup() {
size(1000,1000);
background(0,0,0);
stroke(255,255,255);
}
void draw() {
if(mousePressed) background(0);
line(mouseX,mouseY,0,0);
line(mouseX,mouseY,1000,0);
line(mouseX,mouseY,0,1000);
line(mouseX,mouseY,1000,1000);
line(mouseX,mouseY,500,0);
line(mouseX,mouseY,500,1000);
line(mouseX,mouseY,0,500);
line(mouseX,mouseY,1000,500);
}
This is only the base of coding. It’s still a long difficult road to go but It’s a road i want to pursue and improve on, everyday.
Basically with coding you can do everything. Here are some of my favourite artists that use processing or similar programs to code:
Quayola (http://www.quayola.com/ )
He is a London based visual artist that works on the balance between the real and the artificial.
Yunsil Heo & Hyunwoo Bang (http://everyware.kr/portfolio/contents/09_oasis/)
Demo Scene (https://www.youtube.com/watch?v=ZfuierUvx1A)
Some crazy nerd that creates 64k video
I hope i will one day be able to do as well some crazy stuff like those guys.I will keep working hard and maybe in a couple of months I will be able to use some less basic stuff to use in the adv industry.