Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ArrayList thingies = new ArrayList();
- float grid, sz, theta;
- int flip = -1;
- int stepx = 20;
- int stepy = stepx/5*3;
- int column, row;
- color bg = #490A3D; // #431126;
- color col1 = #BD1550; // #ECE3B7;
- color col2 = #F8CA00; // #DDB38F;
- void setup() {
- size(500, 300);
- background(bg);
- column = width/stepx;
- row = height/stepy;
- sz = column -2;
- rectMode(CENTER);
- for (int y=0; y<height; y+=row) {
- flip *= -1;
- for (int x=0; x<width;x+=column) {
- Thingie thingie = new Thingie(x, y, flip, theta);
- thingies.add(thingie);
- flip *= -1;
- theta += TWO_PI/stepx;
- }
- }
- }
- void draw() {
- background(bg);
- for (int i=0; i<thingies.size();i++) {
- Thingie thing = (Thingie) thingies.get(i);
- thing.display();
- }
- //if (frameCount % 3 == 0 && frameCount < 91) saveFrame("image-####.gif");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement