title: How do I get rid of extra images in my Processing animation?
body: <p>Language:  Processing 3.2.1</p>
  
  <p>I have an animation that should drop vertical lines over a background from the top of the screen to the bottom.</p>
  
  <p>When I run the animation for a while, I start getting extra diagonal lines (and some diagonal lines even move) across the screen.</p>
  
  <p>I would appreciate if someone could tell me why this is happening or how to fix it so there wouldn't be any extra diagonal lines.  Thanks.</p>
  
  <pre><code>int y = 0;
  
  void setup() {
    size(1000,700);
    fill(235,185,155);
    rect(385,600,230,220);
    ellipse(500,350,600,600);
    fill(255,255,255);
    ellipse(400,290,100,100);
    ellipse(600,290,100,100);
    fill(0,0,200);
    ellipse(400,290,55,55);
    ellipse(600,290,55,55);
    fill(0,0,0);
    ellipse(400,290,20,20);
    ellipse(600,290,20,20);
  }
  
  void draw() {
    fill(0,0,0);
    rect(0,y,30,35);
    rect(100,y,30,35);
    rect(200,y,30,35);
    rect(300,y,30,35);
    rect(400,y,30,35);
    rect(500,y,30,35);
    rect(600,y,30,35);
    rect(700,y,30,35);
    rect(800,y,30,35);
    rect(900,y,30,35);
    rect(996,y,30,35);
    if (y &lt;= 700) {
      y = y +1;
    }
  }
  </code></pre>
  
  <p>Here is a link to a screenshot of what it looks like on my screen:
  <a href="http://i1347.photobucket.com/albums/p708/lestillero/diagonallines_zpsagrou6dg.jpg" rel="nofollow">http://i1347.photobucket.com/albums/p708/lestillero/diagonallines_zpsagrou6dg.jpg</a></p>