Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. /*****************************
  2. SKETCH PROCESSING
  3. REALIZZATO DAGLI STUDENTI ISIA
  4. SPECIALISTICA EDITORIA 2015/16
  5. STEFANIA BORASCA
  6. CARLO BUSTREO
  7. GIADA MARSON
  8. TOMMASO ???
  9. VERONICA GARDINALI
  10. *****************************/
  11.  
  12. void setup() {
  13. size(400, 300);
  14. }
  15.  
  16.  
  17. void draw() {
  18. background(0);
  19. rectMode(CENTER);
  20. stroke (pmouseX, pmouseY, 176);
  21. rect(200, 150, 350, 250);
  22.  
  23.  
  24. if (mousePressed == true)
  25. {
  26. for (int x = 50; x <= width-50; x += 20) {
  27. for (int y = 50; y <= height-50; y+=20) {
  28. strokeWeight(3);
  29. stroke(pmouseX, pmouseY, 176);
  30. point(x+2.5, y+2.5);
  31.  
  32. }
  33. }
  34.  
  35.  
  36. } else {
  37.  
  38. for (int x = 50; x <= width-50; x += 20) {
  39. for (int y = 50; y <= height-50; y+=20) {
  40. stroke(pmouseX, pmouseY, 176);
  41. strokeWeight(3);
  42. line(x+5, y-5, x-5, y+5);
  43. }
  44. }
  45. }
  46.  
  47. fill (0);
  48. ellipse(mouseX, mouseY,20,20);
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement