digital landscape

code-landscape-2jpgcode-land-2

int counter;
int interval = 10000;
float a;
float b;
float t;
float n;
float np;
float tp;
float f;
float h;
float LA;
float R;
float C;
float E;
float x;
float y;
float z;
float w;
float m;
float k;
void setup () {
size (500,600);
background (255);
a = 28;
b = 25;
t = 40;
n = 75;
tp = 49;
np = 49;
f = 33;
h = 25;
LA = 100;
R = 500;
C = 30;
E = 75;
x = 29;
y = 26;
z = 75;// wheel 1
w = 51;// wheel 1
m = 45; // wheel 2
k = 50; // wheel 2

}
void draw () {
fill (255,0,0);

counter ++;
stroke (0);
rect ( a, b, 60, 15,3); // board
ellipse (t,tp,15,15); // tail
ellipse (n,np,15,15); // nose
if (counter > 0 && counter < 400) {
a = a + 1;
}
if (counter > 0 && counter < 400) {
n = n +1;
}

if (counter > 0 && counter < 400) {
t = t + 1;
}
if (counter < 20 && counter < 400) {
b = b + 1;
}
if (counter < 20 && counter < 400) {
np = np + 1;
}
if (counter < 20 && counter < 400) {
tp = tp + 1;
}
if (counter > 400 && counter < 800) {
b = b + 1;
}
if (counter > 400 && counter < 800) {
np = np + 1;
}
if (counter > 400 && counter < 800) {
tp = tp + 1;
}
if (counter > 800 && counter < 1200) {
a = a – 1;
}
if (counter > 800 && counter < 1200) {
n = n -1;
}

if (counter > 800 && counter < 1200) {
t = t – 1;
}
rect ( x, y, 60, 15,3); // board
ellipse (z,w,15,15); // tail
ellipse (m,k,15,15); // nose
if ( counter > 0 && counter < 400) {
x = x + 1;
}
if ( counter > 0 && counter < 400) {
y = y + 1;
}
if ( counter > 0 && counter < 400) {
z = z + 1;
}
if ( counter > 0 && counter < 400) {
w = w + 1;
}
if ( counter > 0 && counter < 400) {
m = m + 1;
}
if ( counter > 0 && counter < 400) {
k = k + 1;
}
if (keyPressed){
if (key==’g’|| key==’G’ ){
fill(9,111,169);
}
}
if(mousePressed){
ellipse(f,h,20,20);
}
if (counter > 100 && counter < 500) {
f = f + 1;
}
if (counter > 500 && counter <800) {
h = h +1;

}
if (counter >1000 && counter < 1300) {
f = f-1;
}
if (keyPressed) {
if ( key==’f’ || key==’F’) {
stroke(255,0,0);
line (LA,R,40,60);
}
}
if (counter > 0 && counter < 1500) {
LA = LA + 2;
}
if (counter > 1500 && counter < 1800) {
R = R – 2;
}
if (keyPressed) {
if (key == ‘d’ || key == ‘D’) {
fill (mouseY,0,mouseX);
rect (mouseX,mouseY,24,50);
}
}
if (keyPressed){
if (key==’s’ || key==’S’) {
triangle(C, E, 58, 20, 86, 75);
}
}
if (counter > 0 && counter < 200) {
E = E + 1;
}
if (counter > 200 && counter < 600) {
C = C + 2;
}
}

void mouseDragged () {
stroke (82,78,79);
line (mouseX, mouseY, 20,20);
}

 

Advertisements
This entry was posted in Interactive and tagged , . Bookmark the permalink.

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