Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int x = 100;
- int y = 100;
- void setup() {
- size(800, 800);
- background(0, 0, 255);
- frameRate(30);
- }
- void draw() {
- background(100, 0, 200);
- // Start with i as 1
- int i = 0;
- //while i is less than the width of the window
- while (i < width) {
- noStroke();
- float distance = abs(mouseX - i);
- fill(distance);
- rect(i, 0, 10, height);
- //Increase i by 10
- i += 50;
- // Set ellipse to center
- ellipseMode(CENTER);
- //drawBunny(100, 100, 64, color(255));
- //}
- ////Drawing Bunny
- //void drawBunny(int x, int y, x/2, y/2) {
- //Bunny head
- fill(255);
- ellipse(400,400,250,250);
- //ellipse(mouseX, mouseY-30, 550, 550);
- //Bunny ears
- fill(255,192,203);
- ellipse(300,245,50,170);
- //ellipse(mouseX-200, mouseY-330, 110, 312);
- fill(255,192,203);
- ellipse(495,245,50,170);
- //ellipse(mouseX+200, mouseY-330, 110, 312);
- //Bunny eyes
- fill(0,0,0);
- ellipse(340,385,45,45);
- //ellipse(mouseX-114, mouseY+1, pmouseX-500, pmouseY + -200);
- fill(0,0,0);
- ellipse(454,385,45,45);
- //ellipse(mouseX+139, mouseY+7, pmouseX+-500, pmouseY + -200);
- //Bunny nose
- fill(0,0,0);
- ellipse(400,426,70,50);
- //ellipse(mouseX-(-13), mouseY-(-116), -80, 78);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement