def nine_grid(width, height, center):
    """
    传入眼眶矩形的宽度和高度与眼球中心点， 返回眼球中心点在九宫的哪个位置
    :param width: 眼眶矩形的宽度
    :param height: 眼眶矩形的高度
    :param center: 眼球中心的坐标
    :return:  返回根据眼球中心坐标得到的眼球中心所在的九宫格位置
    """
    width_trisection = int(width / 3)
    height_trisection = int(height / 3)
    if (center['x'] < width_trisection) & (center['y'] < height_trisection):
        return 0
    elif (center['x'] > width_trisection * 2) & (center['y'] <
        height_trisection):
        return 2
    elif center['y'] < height_trisection:
        return 1
    elif (center['x'] < width_trisection) & (center['y'] > 
        height_trisection * 2):
        return 6
    elif (center['x'] > width_trisection * 2) & (center['y'] > 
        height_trisection * 2):
        return 8
    elif center['y'] > height_trisection * 2:
        return 7
    elif center['x'] < width_trisection:
        return 3
    elif center['x'] > width_trisection * 2:
        return 5
    else:
        return 4
