• fullscreen
  • class_08032012_forloop_circles.pde
  • int x;
    int y;
    
    void setup() {
      size(500, 500);
      smooth();
      noStroke();
      //one: create integer; two: test; third: do once per loop at the end
      x = 350;
      y = 0;
      for (int i = 0; i < 500; i += 40) {
        x -= 25;
        ellipse(i, 250, x/8, x/8);
      }
      for (int i = 0; i < 500; i += 40) {
        y +=25;
        ellipse(250, i, y/8, y/8);
      }
    }
    
    void draw() {
    }
    
    

    code

    tweaks (0)

    about this sketch

    This sketch is running as Java applet, exported from Processing.

    license

    advertisement

    Emily Fuhrman

    for loop - circles

    Add to Faves Me Likey@!
    You must login/register to add this sketch to your favorites.

    You need to login/register to comment.