INTERNET ART: networks, performative programming, and web as context

Soccer

Leave a comment

screen-shot-2016-09-27-at-4-49-22-pm

My code:

Boolean soccer=false;

float ellipseX=(300);
float ellipseY=(300);
int eSize=(50);
float speed=random(-10,-20);

color black=color(0,0,0);
color white=color(255,255,255);
color green=color(27,179,22);
color red=color(255,0,0);
color blue=color(0,77,255);

void setup(){
size(600,600);
background(green);
}

void draw(){
float r=random(255);
background(green);

//soccer ball
stroke(black);
fill(white);
ellipse(ellipseX,ellipseY,eSize,eSize);

ellipseX=ellipseX+speed;

if((ellipseX>width-100||ellipseX<+100)){
speed=speed*(-1);
}

//left goal
stroke(black);
noFill();
line(90,260,100,340);
line(90,260,50,300);
line(100,340,50,380);
line(100,340,100,380);
line(50,300,50,380);

//right goal
stroke(black);
noFill();
line(510,260,500,340);
line(510,260,550,300);
line(500,340,550,380);
line(500,340,500,380);
line(550,300,550,380);
}

Leave a Reply

Please log in using one of these methods to post your comment:

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