Changeset View
Changeset View
Standalone View
Standalone View
mocap/mocap_tools.py
| Context not available. | |||||
| #value at pt t of a single bernstein Polynomial | #value at pt t of a single bernstein Polynomial | ||||
| def bernsteinPoly(n, i, t): | def bernsteinPoly(n, i, t): | ||||
| binomCoeff = binomDict[(n, i)] | binomCoeff = binomDict[(n, i)] | ||||
| return binomCoeff * pow(t, i) * pow(1 - t, n - i) | return binomCoeff * t ** i * (1 - t) ** (n - i) | ||||
| # fit a single cubic to data points in range [s(tart),e(nd)]. | # fit a single cubic to data points in range [s(tart),e(nd)]. | ||||
| def fitSingleCubic(data_pts, s, e): | def fitSingleCubic(data_pts, s, e): | ||||
| Context not available. | |||||