Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float x = 25;
- float y = 50;
- float z = 75;
- float a = 100;
- float b = 125;
- float c = 150;
- float e = 175;
- float f = 200;
- float g = 225;
- float d = 0;
- boolean going = false;
- line line;
- void setup() {
- fullScreen();
- //size(3000,3000);
- line = new line();
- }
- void draw() {
- noStroke();
- if ((mouseX > width/3) && (mouseY < height/3)) {
- background(100,200,255); //blue background
- } else if ((mouseX < width/3) && (mouseY > height/3)) {
- background(255,200,100);//yellow background
- } else if ((mouseX > width/3) && (mouseY > height/3)){
- background(100,255,200); //green background1
- } else if ((mouseX < width/3) && (mouseY < height/3)) {
- background(200,255,100);//green background2
- }
- if ((mouseX > width/3) && (mouseY < height/3)) {
- fill(255,200,100);
- ellipse(mouseX,mouseY,50,50);
- } else if ((mouseX < width/3) && (mouseY > height/3)) {
- fill(200,100,255);
- ellipse(mouseX,mouseY,50,50);
- } else if ((mouseX > width/3) && (mouseY > height/3)){
- fill(250,150,255);
- ellipse(mouseX,mouseY,50,50);
- }else if ((mouseX < width/3) && (mouseY < height/3)) {
- fill(200,255,250);
- ellipse(mouseX,mouseY,50,50);
- }
- stroke(255);
- if (d > width) {
- d= 0;
- }
- point(mouseX, mouseY);
- //height
- line(a, 0, d, height);
- line(b, 0, d, height);
- line(c, 0, d, height);
- line(x, 0, d, height);
- line(y, 0, d, height);
- line(z, 0, d, height);
- line(d, 0, z, height);
- line(d, 0, y, height);
- line(d, 0, x, height);
- line(d, 0, c, height);
- line(d, 0, b, height);
- line(d, 0, a, height);
- line(e, 0, d, height);
- line(d, 0, e, height);
- line(d, 0, f, height);
- line(f, 0, d, height);
- line(g, 0, d, height);
- line(d, 0, g, height);
- //widths
- line(0, a, width, d);
- line(0, d, width, a);
- line(0, b, width, d);
- line(0, d, width, b);
- line(0, c, width, d);
- line(0, d, width, c);
- line(0, e, width, d);
- line(0, d, width, e);
- line(0, f, width, d);
- line(0, d, width, f);
- line(0, g, width, d);
- line(0, d, width, g);
- line.drawline();
- noStroke();
- fill(0);
- ellipse(x,100,100,100);
- ellipse(x,200,100,100);
- ellipse(x,300,100,100);
- ellipse(x,400,100,100);
- ellipse(x,500,100,100);
- ellipse(x,600,100,100);
- ellipse(x,700,100,100);
- ellipse(x,800,100,100);
- ellipse(x,900,100,100);
- ellipse(x,1000,100,100);
- ellipse(x,1100,100,100);
- ellipse(x,1200,100,100);
- ellipse(x,1300,100,100);
- ellipse(x,1400,100,100);
- ellipse(x,1500,100,100);
- ellipse(x,1600,100,100);
- ellipse(x,1700,100,100);
- ellipse(x,1800,100,100);
- ellipse(x,1900,100,100);
- ellipse(x,2000,100,100);
- if (going) {
- if (x < width/2) {
- x = x + .5;
- }
- if (x < width) {
- d = d + 1; }
- fill(50);
- ellipse(y,100,100,100);
- ellipse(y,200,100,100);
- ellipse(y,300,100,100);
- ellipse(y,400,100,100);
- ellipse(y,500,100,100);
- ellipse(y,600,100,100);
- ellipse(y,700,100,100);
- ellipse(y,800,100,100);
- ellipse(y,900,100,100);
- ellipse(y,1000,100,100);
- ellipse(y,1100,100,100);
- ellipse(y,1200,100,100);
- ellipse(y,1300,100,100);
- ellipse(y,1400,100,100);
- ellipse(y,1500,100,100);
- ellipse(y,1600,100,100);
- ellipse(y,1700,100,100);
- ellipse(y,1800,100,100);
- ellipse(y,1900,100,100);
- ellipse(y,2000,100,100);
- if (going) {
- y = y + .6;
- }
- fill(100);
- ellipse(z,100,100,100);
- ellipse(z,200,100,100);
- ellipse(z,300,100,100);
- ellipse(z,400,100,100);
- ellipse(z,500,100,100);
- ellipse(z,600,100,100);
- ellipse(z,700,100,100);
- ellipse(z,800,100,100);
- ellipse(z,900,100,100);
- ellipse(z,1000,100,100);
- ellipse(z,1100,100,100);
- ellipse(z,1200,100,100);
- ellipse(z,1300,100,100);
- ellipse(z,1400,100,100);
- ellipse(z,1500,100,100);
- ellipse(z,1600,100,100);
- ellipse(z,1700,100,100);
- ellipse(z,1800,100,100);
- ellipse(z,1900,100,100);
- ellipse(z,2000,100,100);
- if (going) {
- z = z + .7;
- }
- fill(150);
- ellipse(a,100,100,100);
- ellipse(a,200,100,100);
- ellipse(a,300,100,100);
- ellipse(a,400,100,100);
- ellipse(a,500,100,100);
- ellipse(a,600,100,100);
- ellipse(a,700,100,100);
- ellipse(a,800,100,100);
- ellipse(a,900,100,100);
- ellipse(a,1000,100,100);
- ellipse(a,1100,100,100);
- ellipse(a,1200,100,100);
- ellipse(a,1300,100,100);
- ellipse(a,1400,100,100);
- ellipse(a,1500,100,100);
- ellipse(a,1600,100,100);
- ellipse(a,1700,100,100);
- ellipse(a,1800,100,100);
- ellipse(a,1900,100,100);
- ellipse(a,2000,100,100);
- if (going) {
- a = a + .8;
- }
- fill(200);
- ellipse(b,100,100,100);
- ellipse(b,200,100,100);
- ellipse(b,300,100,100);
- ellipse(b,400,100,100);
- ellipse(b,500,100,100);
- ellipse(b,600,100,100);
- ellipse(b,700,100,100);
- ellipse(b,800,100,100);
- ellipse(b,900,100,100);
- ellipse(b,1000,100,100);
- ellipse(b,1100,100,100);
- ellipse(b,1200,100,100);
- ellipse(b,1300,100,100);
- ellipse(b,1400,100,100);
- ellipse(b,1500,100,100);
- ellipse(b,1600,100,100);
- ellipse(b,1700,100,100);
- ellipse(b,1800,100,100);
- ellipse(b,1900,100,100);
- ellipse(b,2000,100,100);
- if (going) {
- b = b + .9;
- }
- fill(250);
- ellipse(c,100,100,100);
- ellipse(c,200,100,100);
- ellipse(c,300,100,100);
- ellipse(c,400,100,100);
- ellipse(c,500,100,100);
- ellipse(c,600,100,100);
- ellipse(c,700,100,100);
- ellipse(c,800,100,100);
- ellipse(c,900,100,100);
- ellipse(c,1000,100,100);
- ellipse(c,1100,100,100);
- ellipse(c,1200,100,100);
- ellipse(c,1300,100,100);
- ellipse(c,1400,100,100);
- ellipse(c,1500,100,100);
- ellipse(c,1600,100,100);
- ellipse(c,1700,100,100);
- ellipse(c,1800,100,100);
- ellipse(c,1900,100,100);
- ellipse(c,2000,100,100);
- if (going) {
- c = c + 1;
- }
- stroke(0);
- line(pmouseX, pmouseY, mouseX, mouseY); // draw the first line
- line(pmouseX-100, pmouseY-100, mouseX-100, mouseY-100);
- line(pmouseX+100, pmouseY+100, mouseX+100, mouseY+100);
- }
- }
- void mousePressed() {
- if (going) {
- going = false;
- } else {
- going = true;
- }
- }
Add Comment
Please, Sign In to add comment