Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PGraphics pg;
- PFont f;
- int num=20000, frames = 20;
- void setup() {
- size(500, 300);
- frameRate(5);
- pg = createGraphics(width, height);
- smooth(8);
- f = createFont("Arial", 48, true);
- pg.beginDraw();
- pg.background(#120930);
- pg.fill(#FCBF05);
- pg.textSize(180);
- pg.textAlign(CENTER);
- //pg.textFont(f,150);
- pg.text("earth", pg.width/2, pg.height*.65);
- pg.endDraw();
- }
- void draw() {
- background(#120930);
- //image(pg, 0, 0);
- for (int i=0; i<num; i++) {
- int x = int(random(width));
- int y = int(random(height));
- float sz = 5;
- color col = pg.get(x, y);
- fill(col);
- stroke(col);
- strokeWeight(3);
- ellipse(x, y, sz, sz);
- }
- //if (frameCount<=frames) saveFrame("image-###.gif");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement