title: balls moving away from cursor project in processing
body: <p>I am trying to make a program that uses an array to display 100 balls and vectors to make these balls move away from the cursor. I commented out of the vectors due to my lack of knowledge, but still all 100 balls are stuck in the top left corner when I use the processing ide. This same code (without vectors) works on repl.it using processing.</p>
  <pre><code>{
    float x;
    float y;
    float r1;
    float b1;
    float g1;
    float d;
    float xSpeed;
    float ySpeed;
    /*PVector mouseLocation;
    PVector ballLocation;
    PVector ballVelocity;
    PVector repulsionForce;
    float distanceFromMouse = repulsionForce.mag();*/
    
    ball(float x,float y)
    {
     
      d = random(10,30);
      r1= random(0,255);
      b1= random(0,255);
      g1= random(0,255);
      xSpeed = random(-4,4);
      ySpeed = random(-4,4);
     /* PVector mouseLocation = new PVector(mouseX,mouseY);
      PVector ballLocation = new PVector(x,y);
      PVector ballVelocity = new PVector(xSpeed,ySpeed);
       PVector repulsionForce = PVector.sub(ballLocation,mouseLocation); */
     
    
    }
    void render()
    {
      fill(r1,g1,b1);
      ellipse(x,y,d,d);
    }
    void move()
    {
      //ballLocation.add(ballVelocity);
      x = x + xSpeed;
      y = y + ySpeed;
    }
    void bounce()
    {
      if(x &gt; width - d/2)
      {
        xSpeed = -xSpeed;
      }
  
      if(x &lt; 0 + d/2)
      {
        xSpeed = -xSpeed;
      }
  
      if(y &gt; height - d/2)
      {
        ySpeed = -ySpeed;
      }
  
      if(y &lt; 0 + d/2)
      {
        ySpeed = -ySpeed;
      }
    }
    void curs()
    {
      
      /* if (distanceFromMouse &lt; 100) {
       repulsionForce.normalize();
       repulsionForce.mult(map(distanceFromMouse, 0, 100, 2, 0));
       ballVelocity.add(repulsionForce);
      }
      ballLocation.add(repulsionForce); */
    }
  }
  
  ball[] balls = new ball[100];
  float x;
  float y;
  void setup()
  {
    size(600, 400);
    x = random(0,width);
    y = random(0,height);
    for(int i=0; i &lt; 100; i++)
    {
      balls[i] = new ball(x,y);
    }
  }
  
  void draw()
  {
    background(50);
    for(int i = 0; i &lt; 100; i++)
    {
      balls[i].render();
      balls[i].move();
      balls[i].bounce();
      balls[i].curs();
    }
  }```
  
  </code></pre>