Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float[] x = new float [10];
- float[] y = new float [10];
- int[] clr = new int [10];
- color[] c = new color [3];
- void setup () {
- size(400, 400, P2D);
- background(0);
- noStroke();
- ellipse(width/2, height/2, 180, 180);
- for (int i = 0; i < x.length; i++) {
- c[0] = color(255, 0, 0);
- c[1] = color(0, 255, 0);
- c[2] = color(0, 0, 255);
- x[i] = random(1, 50);
- y[i] = random(60, 100);
- clr[i] = c[int(random(3))];
- }
- }
- void draw() {
- blendMode(BLEND);
- fill(255, 10);
- ellipse(width/2, height/2, 180, 180);
- blendMode(SUBTRACT);
- for(int i = 0; i < x.length; i++) {
- fill(clr[i]);
- ellipse(width/2+cos(x[i])*70, height/2+sin(y[i])*70, 160, 160);
- x[i] = x[i] + 0.02;
- y[i] = y[i] + 0.04;
- }
- //saveFrame("cirlce_blend-######.png");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement