1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-16 03:39:29 +08:00

Merge branch 'LmeSzinc:master' into 20230309

This commit is contained in:
Zuosizhu
2023-06-02 03:55:50 +08:00
committed by GitHub
15 changed files with 217 additions and 15 deletions

View File

@@ -74,7 +74,7 @@ def insert_swipe(p0, p3, speed=15, min_distance=10):
prev = (-100, -100)
for t in ts:
point = p0 * (1 - t) ** 3 + 3 * p1 * t * (1 - t) ** 2 + 3 * p2 * t ** 2 * (1 - t) + p3 * t ** 3
point = point.astype(np.int).tolist()
point = point.astype(int).tolist()
if np.linalg.norm(np.subtract(point, prev)) < min_distance:
continue