image thumbnail

closed_cubic_bsplin​e(P, varargin)

version 3.0.0.0 (1.94 KB) by Di Zhu
This is a function to draw a closed cubic B-Spline.

104 Downloads

Updated 26 May 2016

View License

This is a function to draw a closed cubic B-Spline, based on <Curves and Surfaces for Computer Graphics(2006)> by David Salomon (great book!), page 261 (closed cubic B-Spline curve).
usage:
closed_cubic_bspline(P,1) will compute and plot the closed B-Spline.
closed_cubic_bspline(P) will only compute the interpolated points.
notes:
In my program, I used a step of 1/100; if you need higher density, you could modify the value of nj (set to 100) on line 35.

Cite As

Di Zhu (2021). closed_cubic_bspline(P, varargin) (https://www.mathworks.com/matlabcentral/fileexchange/56965-closed_cubic_bspline-p-varargin), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!