public float getX(float percent) {
    // No movement
    if(pattern[0] == 0) { return (float)(0+offset[0]); }
    // left to right
    if(pattern[0] == 1) { return (float)(percent*600.0-50.0+offset[0]); }
    // Right to left
    if(pattern[0] == 2) { return (float)(percent*-600.0+50.0+offset[0]); }
    // donno
    // This last one is essentially the else.
    return (float)0;
  }