Drawing Software

PNG_FRAME_0000_Screen-Shot-2015-09-29-at-1.49.35-PM PNG_FRAME_0003_Screen-Shot-2015-09-29-at-1.52.00-PM PNG_FRAME_0004_Screen-Shot-2015-09-29-at-1.50.36-PM PNG_FRAME_0005_Screen-Shot-2015-09-29-at-1.50.05-PM PNG_FRAME_0006_Screen-Shot-2015-09-29-at-1.45.59-PM PNG_FRAME_0007_Screen-Shot-2015-09-29-at-1.46.17-PM PNG_FRAME_0008_Screen-Shot-2015-09-29-at-1.46.36-PM PNG_FRAME_0009_Layer-0

boolean backgroundDraw = true;

// for bubble generator
int bubbleNumber = 0;
int bubbleCounter = 0;
int [] bubbleX = new int [50];
int [] bubbleY = new int [50];
int [] bubbleOpacity = new int [50];
int [] bubbleSize = new int [50];
float bubbleDecider;
float r;
float g;
float b;
color [] bubbleColors = new color[50];
boolean bubbleAppear = true;

// for bubble move
int moveX = 0;
int moveY = 0;
int moveCounter = 0;

// for color change
boolean colorChange = true;
int colorChangeCounter = 0;
int tempRed = 0;
int tempBlue = 0;
int tempGreen = 0;

void setup (){
background (0);
size (1200,700);
while (bubbleCounter < 50){
bubbleX [bubbleCounter] = 0;
bubbleY [bubbleCounter] = 0;
bubbleOpacity [bubbleCounter] = 0;
bubbleColors [bubbleCounter] = color (0);
bubbleSize [bubbleCounter] = 10;
bubbleCounter++;
}
bubbleCounter = 0;
}

void draw (){
if (backgroundDraw)
background (0);
bubbleDecider = random (0, 7);

//START COLOR CHANGE

if (colorChange){
fill (255);
textSize (15);
text (“COLOR CHANGE MODE”, 5,15);
fill (100);
textSize (15);
text (“MOVE MODE”, 5,30);
}
else {
fill (100);
textSize (15);
text (“COLOR CHANGE MODE”, 5,15);
fill (255);
textSize (15);
text (“MOVE MODE”, 5,30);
}

if (colorChange && keyPressed){
if (keyCode == LEFT){
tempRed = 10;
tempGreen = -5;
tempBlue = -5;
}
if (keyCode == UP){
tempRed = -5;
tempGreen = 10;
tempBlue = -5;
}
if (keyCode == RIGHT){
tempRed = -5;
tempGreen = -5;
tempBlue = 10;
}
while (colorChangeCounter < bubbleNumber){
bubbleColors [colorChangeCounter] = color (red(bubbleColors [colorChangeCounter]) + tempRed,
green(bubbleColors [colorChangeCounter]) + tempGreen,
blue(bubbleColors [colorChangeCounter]) + tempBlue);
if (keyCode != LEFT && keyCode != UP && keyCode != RIGHT)
break;
colorChangeCounter++;
}
tempRed = 0;
tempGreen = 0;
tempBlue = 0;
colorChangeCounter = 0;
}

//END COLOR CHANGE

//START BUBBLE MOVE

if (!colorChange && keyPressed){
if (keyCode == LEFT)
moveX = -5;
else if (keyCode == RIGHT)
moveX = 5;
else if (keyCode == UP)
moveY = -10;
else if (keyCode == DOWN)
moveY = 7;
while (moveCounter < bubbleNumber){
if (keyCode != LEFT && keyCode != UP && keyCode != RIGHT && keyCode != DOWN)
break;
bubbleX [moveCounter] += moveX;
bubbleY [moveCounter] += moveY;
moveCounter++;
}
moveX = 0;
moveY = 0;
moveCounter = 0;
}

//END BUBBLE MOVE

//START BUBBLE GENERATOR

if (bubbleAppear){
if (bubbleDecider < 1 && bubbleNumber < 50){
bubbleX [bubbleNumber] = int (random (0,1201));
bubbleY [bubbleNumber] = 800;
bubbleOpacity [bubbleNumber] = int(random (100,256));
r = random (55,255);
g = random (55,255);
b = random (55,255);
bubbleColors [bubbleNumber] = color (r,g,b);
bubbleSize [bubbleNumber] = int(random (10, 80));
bubbleNumber ++;
}
while (bubbleNumber != bubbleCounter){
fill (bubbleColors [bubbleCounter]);
noStroke ();
ellipse (bubbleX [bubbleCounter],
bubbleY [bubbleCounter],
bubbleSize [bubbleCounter],
bubbleSize [bubbleCounter]);
bubbleY [bubbleCounter] -= 10;
bubbleCounter++;
}
bubbleCounter = 0;
if (bubbleY [0] < -70){
while (bubbleCounter < bubbleNumber-1){
bubbleX [bubbleCounter] = bubbleX [bubbleCounter+1];
bubbleY [bubbleCounter] = bubbleY [bubbleCounter+1];
bubbleOpacity [bubbleCounter] = bubbleOpacity [bubbleCounter+1];
bubbleColors [bubbleCounter] = bubbleColors [bubbleCounter+1];
bubbleSize [bubbleCounter] = bubbleSize [bubbleCounter+1];
bubbleCounter++;
}
bubbleCounter = 0;
bubbleNumber–;
}
}

//END BUBBLE GENERATOR

}

void keyReleased(){
if (colorChange){
if (keyCode == DOWN)
backgroundDraw = !backgroundDraw;
}
}

void mousePressed (){
colorChange = !colorChange;
colorChangeCounter = 0;
moveCounter = 0;
}

Advertisements

About barberne

an animation student at alfred state from rochester
This entry was posted in Digital Art, Time-Based and tagged , . Bookmark the permalink.