Upcoming SlideShare
×

# Kwp2 100107

900 views

Published on

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
900
On SlideShare
0
From Embeds
0
Number of Embeds
26
Actions
Shares
0
14
0
Likes
0
Embeds 0
No embeds

No notes for slide
• ### Kwp2 100107

1. 1. // void setup(){ size(400,400); fill(31,127,255); noStroke(); } void draw(){ background(0,0,25); ellipse(mouseX, mouseY, 40, 40); }
2. 2. void setup(){ size(400,400); fill(31,127,255); noStroke(); } void draw(){ background(0,0,25); ellipse(mouseX, mouseY, 40, 40); ellipse(width-mouseX, mouseY, 40, 40); }
3. 3. void setup(){ size(400,400); fill(31,127,255); noStroke(); } void draw(){ background(0,0,25); ellipse(mouseX, mouseY, 40, 40); ellipse(width-mouseX, mouseY, 40, 40); ellipse(mouseX, height-mouseY, 40, 40); ellipse(width-mouseX, height-mouseY, 40, 40); }
4. 4. // boolean pressed = false; void setup(){ size(400,400); fill(31,127,255); noStroke(); } void draw(){ background(0,0,25); // if(pressed){ ellipse(mouseX, mouseY, 40, 40); } } // void mousePressed(){ pressed = true; } // void mouseReleased(){ pressed = false; }
5. 5. // boolean pressed = false; void setup(){ size(400,400); fill(31,127,255); noStroke(); background(0,0,25); } void draw(){ // if(pressed){ ellipse(mouseX, mouseY, 40, 40); } } // void mousePressed(){ pressed = true; } // void mouseReleased(){ pressed = false; }
6. 6. boolean pressed = false; void setup(){ size(400,400); fill(31,127,255); noStroke(); background(0,0,25); } void draw(){ if(pressed){ ellipse(mouseX, mouseY, 10, 10); ellipse(width-mouseX, mouseY, 10, 10); ellipse(mouseX, height-mouseY, 10, 10); ellipse(width-mouseX, height-mouseY, 10, 10); } } void mousePressed(){ pressed = true; } void mouseReleased(){ pressed = false; }
7. 7. boolean pressed = false; void setup(){ size(400,400); noStroke(); background(0,0,25); } void draw(){ if(pressed){ fill(31,127,255,100); ellipse(mouseX, mouseY, 10, 10); fill(255,31,127,100); ellipse(width-mouseX, mouseY, 10, 10); fill(31,255,127,100); ellipse(mouseX, height-mouseY, 10, 10); fill(31,255,255,100); ellipse(width-mouseX, height-mouseY, 10, 10); } } void mousePressed(){ pressed = true; } void mouseReleased(){ pressed = false;
8. 8. boolean pressed = false; int count; void setup(){ size(400,400); noStroke(); colorMode(HSB,360,100,100,100); background(0); } void draw(){ if(pressed){ fill(count%360,80,80,20); ellipse(mouseX, mouseY, 20, 20); ellipse(width-mouseX, mouseY, 20, 20); ellipse(mouseX, height-mouseY, 20, 20); ellipse(width-mouseX, height-mouseY, 20, 20); } count = count + 1; } void mousePressed(){ pressed = true; } void mouseReleased(){ pressed = false;