Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int num = 50;
- float r;
- float theta;
- int ox, oy;
- color ccol = #C70025;
- void setup() {
- size(900, 600);
- background(255);
- noFill();
- ox = width/2;
- oy = height/2;
- r = height/4;
- drawVCircle();
- }
- void draw() {
- }
- void drawVCircle() {
- stroke(ccol, 200);
- strokeWeight(random(1, 4));
- beginShape();
- for (int i=0; i < num; i++) {
- theta = random(TAU);
- float x = ox + sin(theta)*r;
- float y = oy + cos(theta)*r;
- vertex(x, y);
- }
- endShape();
- }
- void mouseClicked() {
- drawVCircle();
- }
- void keyPressed() {
- save(random(1234)+".jpg");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement