Skip to content

Commit

Permalink
update Bspline
Browse files Browse the repository at this point in the history
  • Loading branch information
sldai committed Sep 3, 2021
1 parent ce72bf8 commit cf6253e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 27 deletions.
48 changes: 24 additions & 24 deletions Planning/Curve/B_spline.ipynb

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions Planning/Curve/B_spline.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,10 @@ def splineInterp():
spl = BSpline(knots, ctrl_pts)
interp_result = np.array([spl.DeBoor(t)
for t in np.linspace(0, K-1, num=100)]).T

plt.plot(points[:, 0], points[:, 1], 'ok',
label='Passing points', markerfacecolor='red')
plt.plot(points[:, 0], points[:, 1], 'sk',
label='Passing points', markerfacecolor='darkorange')
plt.plot(ctrl_pts[:, 0], ctrl_pts[:, 1], '--ok',
label='Control polygon', markerfacecolor='red')
plt.plot(interp_result[0], interp_result[1],
linewidth=2, c="cyan", label="Interpolated curve")
plt.legend()
Expand Down
Binary file modified Planning/figure/BSplineInterp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cf6253e

Please sign in to comment.