Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float theta, radius = 200, max=40, min=20;
- void setup() {
- size(800, 600);
- background(20);
- rectMode(CENTER);
- }
- void draw() {
- float x = 400+cos(theta)*radius;
- float y = 320+sin(theta)*radius;
- float sz = map(sin(theta*3),-1,1,min,max);
- fill(255,5);
- stroke(20,150);
- noStroke();
- ellipse(x,y,sz,sz);
- theta += .0523;
- max += .5;
- min += .1;
- if (max>160) max = 160;
- if (min>40) min = 40;
- }
- void keyPressed() {
- saveFrame("image-###.jpg");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement