def y_of_bezier(t, cy):
    """
    Returns the position of a cubic Bezier curve at t where t is in [0,1]
    """

    return (
        (1 - t) ** 3 * cy[0]
        + 3 * t * (1 - t) ** 2 * cy[1]
        + 3 * (t**2) * (1 - t) * cy[2]
        + t**3 * cy[3]
    )

    Returns the position of a cubic Bezier curve at t where t is in [0,1]
    
infinigen/core/util/imu.py