Runs multidimensional B-spline interpolation on the input points.
(points, u, k, s)
| 517 | return poses, u, n_frames, u_keyframes |
| 518 | |
| 519 | def interp(points, u, k, s): |
| 520 | """Runs multidimensional B-spline interpolation on the input points.""" |
| 521 | sh = points.shape |
| 522 | pts = np.reshape(points, (sh[0], -1)) |
| 523 | k = min(k, sh[0] - 1) |
| 524 | tck, u_keyframes = scipy.interpolate.splprep(pts.T, k=k, s=s, per=periodic) |
| 525 | new_points = np.array(scipy.interpolate.splev(u, tck)) |
| 526 | new_points = np.reshape(new_points.T, (len(u), sh[1], sh[2])) |
| 527 | return new_points, u_keyframes |
| 528 | |
| 529 | |
| 530 | if n_buffer is not None: |
no outgoing calls
no test coverage detected