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


Leave a comment

Basketball

Here is my picture (can’t get one of all the balls because they hate me)screen-shot-2016-09-22-at-3-59-49-pm

And here is my code

float x=700;
float y=700;
float cw=150;
float r=random(1,100);
int eA=0;
int eB=5;
int eC=5;
int eD=0;
int ey=460;
int ey2=470;
int ey3=480;
int ey4=490;
int eSpeed=10;
int eSize=50;
color red=color(255,0,0);
color black=color(0,0,0);
color white=color(255,255,255);
color orange=color(255,145,0);
color bbfloor=color(181,132,68);
color bboard=color(218,243,242);
void setup(){
size(700,650);
noStroke();
}
void draw(){
background(white);

//floor
fill(bbfloor);
rect(0,550,700,100);

//bb board
fill(bboard);
rect(520,100,150,150);
line(600,250,600,560);
fill(red);
rect(560,170,60,50);
fill(bboard);
rect(570,180,40,30);
noFill();
ellipse(580,240,100,eSize);

//bball
fill(orange);
ellipse(mouseX,mouseY,50,50);

//flying balls
stroke(black);
fill(orange);
//top ball
ellipse(eA,ey,eSize,eSize);
//middle ball
ellipse(eB,ey2,eSize,eSize);
//middle ball
ellipse(eC,ey3,eSize,eSize);
//eC=eA+eSpeed;
//bottom ball
ellipse(eD,ey4,eSize,eSize);
//eD=eD+eSpeed;

if(mousePressed==true){
eA=eA+eSpeed;
eB=eB+eSpeed;
eC=eC+eSpeed;
eD=eD+eSpeed;
ey=ey-eSpeed;
ey2=ey2+2-eSpeed;
ey3=ey3+4-eSpeed;
ey4=ey4+8-eSpeed;
} else{
eA=eA;
eB=eB;
eC=eC;
eD=eD;
}

if(keyPressed==true){
eA=eA-eSpeed;
eB=eB-eSpeed;
eC=eC-eSpeed;
eD=eD-eSpeed;
ey=ey+eSpeed;
ey2=ey2-2+eSpeed;
ey3=ey3-4+eSpeed;
ey4=ey4-8+eSpeed;
} else{
eA=eA;
eB=eB;
eC=eC;
eD=eD;
}

//stick person
fill(white);
stroke(black);
ellipse(50,400,70,70);
line(50,435,50,540);
line(50,540,40,600);
line(50,540,60,600);
line(50,450,100,430);
line(50,450,100,440);
}

Advertisements


Leave a comment

Flashing Lights & Moving Objects

float w = 800;
float h = 800;
float circlesize =50;

float rectX=0;
float rectY=height/2;
float rectW = 50;
float rectH =50;
float rectSpeed = 1;

float Growth = 2;

float ellipseX=width/2;
float ellipseY=0;
float eSize = 50;
float eSpeed = 6;

color r = color(100,0,0);
color green = color(0,255,0);
color redish = color(200,0,0);
color yellow = color(200,200,0);
color b = color(0,0,255);
color black = color(0,0,0);
color white = color(255,255,255);
color pizza = color(100,100,0);

//PImage img;

float x= 400;
float y= 400;
float cw = 150;

String s = “I have to do some”;

void setup(){
size(400,400);
noStroke();
background(white);
frameRate(6);
//img = loadImage(“frog.png”);
}
void draw(){
float r = random(1,255);
float green = random(1,255);
float b = random(1,255);
fill(r,green,b);
ellipse(mouseX,mouseY, cw,cw);
//background(white);
strokeWeight(4);
stroke(pizza);
fill(r);
ellipse(mouseX,mouseY, 50, 50);
line(mouseX,mouseY, pmouseX,pmouseY);
//image(img,mouseX,mouseY, 10,10);
rect(0,height/2, 50, 50);
ellipse(width/2, 0, 6, 50);

textSize(24);
text(“Homework!”,50,100);
text(s,100,50);
rectX = rectX + rectSpeed;
ellipseY = ellipseY + eSpeed;

rectW = rectW + Growth;
eSize = eSize + Growth;

}
void mousePressed(){
fill(yellow);
ellipse(mouseX,mouseY, 50, 50);

}

void keyPressed(){
//background(green);
println(key);
}


Leave a comment

Processing Help

I’m not sure if anyone is struggling with this processing stuff as much as I am but I just found that there’s some tutorials on Lynda.  If you are an Art and Tech major this site can help you greatly through out your time here at OSU and beyond. The only draw back is that you have to go to a library or the Digital Union here on campus to access it for free.

https://www.lynda.com/Processing-training-tutorials/1402-0.html