static int[] getSegment1(double angle, int ax, int ay, int xcount, int ycount) {
        int[] bounds = new int[3];
        switch((int)(angle / 90)) {
        case 0:
            if (xcount <  ax) {
                bounds[0] = 0; // Y3
                bounds[1] = -ay;
                bounds[2] = ycount;
            } else {
                bounds[0] = 1; // X1
                bounds[1] = 0;
                bounds[2] = ax;
            }
            break;
        case 1:
            if (xcount > -ax) {
                bounds[0] = 2; // X2
                bounds[1] = -ax;
                bounds[2] = xcount;
            } else {
                bounds[0] = 3; // Y2
                bounds[1] = 0;
                bounds[2] = -ay;
            }
            break;
        case 2:
            if (xcount < -ax) {
                bounds[0] = 4; // Y1
                bounds[1] = ay;
                bounds[2] = ycount;
            } else {
                bounds[0] = 5; // X3
                bounds[1] = 0;
                bounds[2] = -ax;
            }
            break;
        case 3:
            if (xcount >  ax) {
                bounds[0] = 6; // X0
                bounds[1] = ax;
                bounds[2] = xcount;
            } else {
                bounds[0] = 7; // Y0
                bounds[1] = 0;
                bounds[2] = ay;
            }
            break;
        }
        return bounds;
    }