Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int frms = 120;
- float theta;
- void setup() {
- size(540, 540);
- }
- void draw() {
- background(34);
- noStroke();
- textAlign(CENTER, CENTER);
- for (int j=0; j<10; j++) {
- for (int i=0; i<10; i++) {
- float offSetX = PI/10*i;
- float offSetY = j*PI;
- float x = map(i, 0, 9, width*.2, width*.8);
- float y = map(j, 0, 9, height*.2, height*.8);
- float offSet = map(dist(x, y, width/2, height/2), 0, width/2, 0, PI);
- float ts = map(sin(theta+offSetY), -1, 1, 15, 25);
- float alpha = map(ts,15,25,25,255);
- fill(238, alpha);
- textSize(ts);
- text(i, x, y);
- }
- }
- theta -= TWO_PI/frms;
- if (frameCount<=frms) saveFrame("image-###.gif");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement