xxxxxxxxxx
//INSPIRED BY ALEX FRYE https://www.openprocessing.org/sketch/196203
//AND JI HYUN KIM https://www.openprocessing.org/sketch/71994
//AND ELLIPSE MAP CODE https://www.openprocessing.org/sketch/540110
//Leaves
Leaves [] leafy = new Leaves [30];
Leaves [] leafy2 = new Leaves [30];
Leaves [] leafy3 = new Leaves [30];
Leaves [] leafy4 = new Leaves [30];
Leaves [] leafy5 = new Leaves [30];
Leaves [] leafy6 = new Leaves [30];
Leaves [] leafy7 = new Leaves [30];
Leaves [] leafy8 = new Leaves [30];
Leaves [] leafy9 = new Leaves [30];
Leaves [] leafy10 = new Leaves [30];
Leaves [] leafy11 = new Leaves [30];
Leaves [] leafy12 = new Leaves [30];
Leaves [] leafy13 = new Leaves [30];
Leaves [] leafy14 = new Leaves [30];
Leaves [] leafy15 = new Leaves [30];
Leaves [] leafy16 = new Leaves [30];
Leaves [] leafy17 = new Leaves [30];
Leaves [] leafy18 = new Leaves [30];
Leaves [] leafy19 = new Leaves [30];
Leaves [] leafy20 = new Leaves [30];
Leaves [] leafy21 = new Leaves [30];
//Trees
Tree [] newTrees = new Tree [1];
Tree treely;
Tree treely2;
Tree treely3;
//Leaf Colors
//#8CDE82 = Light green
//#5CA054 = Pale green
//#43893A = Dark green
//#BEF5B7 = Lightest green
void setup() {
size(800, 800);
smooth();
//Tree
treely = new Tree ();
treely2 = new Tree ();
treely3 = new Tree ();
//size(displayWidth, displayHeight);
for (int i=0; i<leafy.length; i++) {
leafy[i] = new Leaves();
}
for (int i=0; i<leafy2.length; i++) {
leafy2[i] = new Leaves();
}
for (int i=0; i<leafy3.length; i++) {
leafy3[i] = new Leaves();
}
for (int i=0; i<leafy4.length; i++) {
leafy4[i] = new Leaves();
}
for (int i=0; i<leafy5.length; i++) {
leafy5[i] = new Leaves();
}
for (int i=0; i<leafy6.length; i++) {
leafy6[i] = new Leaves();
}
for (int i=0; i<leafy7.length; i++) {
leafy7[i] = new Leaves();
}
for (int i=0; i<leafy8.length; i++) {
leafy8[i] = new Leaves();
}
for (int i=0; i<leafy9.length; i++) {
leafy9[i] = new Leaves();
}
for (int i=0; i<leafy10.length; i++) {
leafy10[i] = new Leaves();
}
for (int i=0; i<leafy11.length; i++) {
leafy11[i] = new Leaves();
}
for (int i=0; i<leafy11.length; i++) {
leafy12[i] = new Leaves();
}
for (int i=0; i<leafy13.length; i++) {
leafy13[i] = new Leaves();
}
for (int i=0; i<leafy14.length; i++) {
leafy14[i] = new Leaves();
}
for (int i=0; i<leafy15.length; i++) {
leafy15[i] = new Leaves();
}
for (int i=0; i<leafy16.length; i++) {
leafy16[i] = new Leaves();
}
for (int i=0; i<leafy17.length; i++) {
leafy17[i] = new Leaves();
}
for (int i=0; i<leafy18.length; i++) {
leafy18[i] = new Leaves();
}
for (int i=0; i<leafy19.length; i++) {
leafy19[i] = new Leaves();
}
for (int i=0; i<leafy20.length; i++) {
leafy20[i] = new Leaves();
}
for (int i=0; i<leafy21.length; i++) {
leafy21[i] = new Leaves();
}
strokeWeight(0);
fill(0);
}
void draw() {
for (int y = 1; y < 200; y += 30){
fill(y+35,y+91,y+140); //Sky blue
noStroke();
rect(-1, y, width, height);
for (int i=0; i<leafy.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy[i].move();
leafy[i].display();
}
leafy[i].move();
leafy[i].display();
}
}
float Sun = map(mouseX, 0, width, 50, 200);
fill(247, 245, random(122,162));
ellipse(400, 150, Sun, Sun);
noFill();
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy2.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy2[i].move();
leafy2[i].x = 200;
leafy2[i].y = 200;
leafy2[i].display();
}
leafy2[i].move();
leafy2[i].x = 100;
leafy2[i].y = 100;
leafy2[i].display();
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy3[i].move();
leafy3[i].x = 200;
leafy3[i].y = 200;
leafy3[i].display();
}
leafy3[i].move();
leafy3[i].x = 100;
leafy3[i].y = 100;
leafy3[i].display();
leafy3[i].leafColor = (#5CA054); //Green
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy4[i].move();
leafy4[i].x = 200;
leafy4[i].y = 200;
leafy4[i].display();
}
leafy4[i].move();
leafy4[i].x = 100;
leafy4[i].y = 100;
leafy4[i].display();
leafy4[i].leafColor = (#8CDE82); //Lightest green
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy5[i].move();
leafy5[i].display();
}
leafy5[i].move();
leafy5[i].x = 480;
leafy5[i].y = 430;
leafy5[i].display();
leafy5[i].leafColor = (#5CA054); //Green
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy6[i].move();
leafy6[i].display();
}
leafy6[i].move();
leafy6[i].x = 450;
leafy6[i].y = 450;
leafy6[i].display();
leafy6[i].leafColor = (#8CDE82); //Lightest green
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy7[i].move();
leafy7[i].display();
}
leafy7[i].move();
leafy7[i].x = 490;
leafy7[i].y = 550;
leafy7[i].display();
leafy7[i].leafColor = (#43893A);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy8[i].move();
leafy8[i].display();
}
leafy8[i].move();
leafy8[i].x = 600;
leafy8[i].y = 550;
leafy8[i].display();
leafy8[i].leafColor = (#43893A);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy9[i].move();
leafy9[i].display();
}
leafy9[i].move();
leafy9[i].x = 600;
leafy9[i].y = 450;
leafy9[i].display();
leafy9[i].leafColor = (#5CA054);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy10[i].move();
leafy10[i].display();
}
leafy10[i].move();
leafy10[i].x = 600;
leafy10[i].y = 350;
leafy10[i].display();
leafy10[i].leafColor = (#5CA054);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy11[i].move();
leafy11[i].display();
}
leafy11[i].move();
leafy11[i].x = 600;
leafy11[i].y = 280;
leafy11[i].display();
leafy11[i].leafColor = (#8CDE82);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy12[i].move();
leafy12[i].display();
}
leafy12[i].move();
leafy12[i].x = 700;
leafy12[i].y = 600;
leafy12[i].display();
leafy12[i].leafColor = (#43893A);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy13[i].move();
leafy13[i].display();
}
leafy13[i].move();
leafy13[i].x = 700;
leafy13[i].y = 500;
leafy13[i].display();
leafy13[i].leafColor = (#43893A);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy14[i].move();
leafy14[i].display();
}
leafy14[i].move();
leafy14[i].x = 700;
leafy14[i].y = 400;
leafy14[i].display();
leafy14[i].leafColor = (#5CA054);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy15[i].move();
leafy15[i].display();
}
leafy15[i].move();
leafy15[i].x = 700;
leafy15[i].y = 300;
leafy15[i].display();
leafy15[i].leafColor = (#8CDE82);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy16[i].move();
leafy16[i].display();
}
leafy16[i].move();
leafy16[i].x = 670;
leafy16[i].y = 220;
leafy16[i].display();
leafy16[i].leafColor = (#BEF5B7);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy17[i].move();
leafy17[i].display();
}
leafy17[i].move();
leafy17[i].x = 450;
leafy17[i].y = 580;
leafy17[i].display();
leafy17[i].leafColor = (#BEF5B7);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy18[i].move();
leafy18[i].display();
}
leafy18[i].move();
leafy18[i].x = 100;
leafy18[i].y = 50;
leafy18[i].display();
leafy18[i].leafColor = (#BEF5B7);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy19[i].move();
leafy19[i].display();
}
leafy19[i].move();
leafy19[i].x = 200;
leafy19[i].y = 500;
leafy19[i].display();
leafy19[i].leafColor = (#BEF5B7);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy19[i].move();
leafy19[i].display();
}
leafy20[i].move();
leafy20[i].x = 200;
leafy20[i].y = 600;
leafy20[i].display();
leafy20[i].leafColor = (#5CA054);
}
noFill(); //Sky blue
rect(-1, -1, width+100, height+100);
for (int i=0; i<leafy3.length; i++) {
if (i<250) {
stroke(255, 255, 255);
strokeWeight(50);
leafy21[i].move();
leafy21[i].display();
}
leafy21[i].move();
leafy21[i].x = 200;
leafy21[i].y = 650;
leafy21[i].display();
leafy21[i].leafColor = (#43893A);
}
treely.display();
rotate(0.3);
treely2.display();
treely2.x = -250;
treely2.y = 150;
rotate(0.5);
treely3.display();
treely3.x = -400;
treely3.y = -400;
}
//put class into a new tab
//make new ints for x and y to make new clusterse