Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Random;
- Random generator;
- color c;
- void setup() {
- size(800, 800);
- colorMode(HSB, 360, 100, 100);
- background(#000000);
- generator = new Random();
- }
- void draw() {
- float meanX = width/2;
- float meanY = height/2;
- float rdnX = (float) generator.nextGaussian();
- float rdnY = (float) generator.nextGaussian();
- float sd = 10;
- float x = meanX + rdnX*sd;
- float y = meanY + rdnY*sd;
- float meanC = 180;
- float rdnC = (float) generator.nextGaussian();
- float sdC = 100;
- c = color(meanC+rdnC*sdC, 90, 90);
- fill(c,150);
- stroke(#ffffff, 100);
- noStroke();
- ellipse(x, y, 50, 50);
- }
- void keyPressed() {
- save(random(2123)+".jpg");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement