Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float x, theta, sz;
- int num = 45;
- color[] palette = {
- #FF0000, #00FF00, #0000FF
- };
- void setup() {
- size(500, 500);
- background(0);
- noStroke();
- //blendMode(SCREEN);
- }
- void draw() {
- background(0);
- translate(width/2, height/2);
- for (int i=0; i<num; i++) {
- float offSet = i*(TWO_PI/num);
- fill(255,150);
- pushMatrix();
- rotate(offSet);
- x = map(sin(offSet+theta), -1, 1, -100, 180);
- sz = map(sin(offSet+theta),-1,1,30,70);
- ellipse(x, 0, sz, sz);
- popMatrix();
- }
- theta += 0.0523;
- //if (frameCount%2==0 && frameCount<121) saveFrame("image-###.gif");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement