def calculate_quadratic_bezier(points, t):
    """
    Points is a list of three points, P0, P1 and P2, in that order
    """
    P0, P1, P2 = points
    Bt = (1 - t) * ((1 - t) * P0 + t * P1) + t * ((1 - t) * P1 + t * P2)
    return Bt
