def quadratic_bezier_curve(t, p0, p1, p2): return (1.0 - t) ** 2.0 * p0 + 2.0 * (1.0 - t) * t * p1 + t ** 2.0 * p2