Function anim::bezier_utils::solve_t_for_time_bisection
Function Documentation
-
double anim::bezier_utils::solve_t_for_time_bisection(const Point &p0, const Point &p1, const Point &p2, const Point &p3, double target_time, double t_min = 0.0, double t_max = 1.0, double precision = 1e-6, int max_iterations = 30)
Finds the parameter
twhose time component equalstarget_time, by bisection.Robust but slower fallback used when Newton-Raphson is unsuitable.
- Parameters:
p0, p1, p2, p3 – The cubic Bézier control points.
target_time – The time to solve for.
t_min, t_max – Search bounds for
t.precision – Absolute time error at which to stop.
max_iterations – Maximum bisection steps.
- Returns:
The parameter
tin [t_min,t_max].