Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.06 KB | None | 0 0
  1. ROND[] listRond;
  2. LIGNE[] listLigne;
  3.  
  4. void setup()
  5. {
  6.   size(500, 500);
  7.   frameRate(60);
  8.   fond();
  9.  
  10.   listRond = new ROND[18];
  11.   for (int i = 0 ; i < listRond.length ; i++)
  12.   {
  13.     listRond[i] = new ROND(80 + random(370), 80 + random(370), color(random(255), random(255), random(255), random(255)), 10 + random(100));
  14.   }
  15.   listLigne = new LIGNE[20];
  16.   for (int i = 0 ; i < listLigne.length ; i++)
  17.   {
  18.     listLigne[i] = new LIGNE(80 + random(370), 80 + random(370), color(random(255), random(255), random(255)), 1 + random(5));
  19.   }
  20. }
  21.  
  22. void draw()
  23. {
  24.   fond();
  25.   for (int i = 0 ; i < listRond.length ; i++)
  26.   {
  27.     listRond[i].mouv();
  28.     listRond[i].afficher();
  29.   }
  30.   for (int i = 0 ; i < listLigne.length ; i++)
  31.   {
  32.     listLigne[i].mouv();
  33.     listLigne[i].afficher();
  34.   }
  35. }
  36.  
  37. void fond()
  38. {
  39.   background(220, 220, 220);
  40.  
  41.   noStroke(); fill(255, 210, 80);
  42.   quad(500,0, 450,0, 0,350, 0, 550);
  43.   fill(0, 220, 130, 100);
  44.   quad(500,480, 500,300, 230,0, 150,0);
  45.  
  46.   stroke(0); noFill();
  47.   strokeWeight(20);
  48.   ellipse(250, 250, 420, 420);
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement