Advertisement
xeromino

typo

Nov 17th, 2014
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 KB | None | 0 0
  1. PGraphics pg;
  2. PFont f;
  3. int num=20000, frames = 20;
  4.  
  5. void setup() {
  6.   size(500, 300);
  7.   frameRate(5);
  8.  
  9.  
  10.   pg = createGraphics(width, height);
  11.   smooth(8);
  12.   f = createFont("Arial", 48, true);
  13.  
  14.   pg.beginDraw();
  15.   pg.background(#120930);
  16.   pg.fill(#FCBF05);
  17.   pg.textSize(180);
  18.   pg.textAlign(CENTER);
  19.   //pg.textFont(f,150);
  20.   pg.text("earth", pg.width/2, pg.height*.65);
  21.   pg.endDraw();
  22. }
  23.  
  24. void draw() {
  25.   background(#120930);
  26.   //image(pg, 0, 0);
  27.  
  28.   for (int i=0; i<num; i++) {
  29.     int x = int(random(width));
  30.     int y = int(random(height));
  31.     float sz = 5;
  32.     color col = pg.get(x, y);
  33.     fill(col);
  34.     stroke(col);
  35.     strokeWeight(3);
  36.     ellipse(x, y, sz, sz);
  37.   }
  38.  
  39.   //if (frameCount<=frames) saveFrame("image-###.gif");
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement