public float getY(float percent) {
    // No movement
    if(pattern[1] == 0) { return (float)(0+offset[1]); }
    // Top to bottom
    if(pattern[1] == 1) { return (float)(percent*600.0-50.0+offset[1]); }
    // Moves downward, stops for a while, then continues on downward
    if(pattern[1] == 2) { 
      if(percent < .3) {
        return (float)(-(Math.pow(percent*100.0-30.0,2)/5.0)+150+offset[1]);
      }
      else if(percent < .6) {
        return (float)(150+offset[1]);
      }
      else {
        return (float)(Math.pow(percent*100.0-60.0,2)/2.0+150+offset[1]);
      }
    }
    // Goes until it hits 150. Stops forever.
    if(pattern[1] == 3) {
      if(position[1] < 150) {
        return (float)(position[1]+1);
      }
      else {
        return position[1];
      }
    }
    // This last one is essentially the else.
    return (float)0;
  }