A Python implementation of the relaxed cubic spline curve
The relaxed cubic spline curve is best described in section 5 of the UCLA Math 149 Cubic Spline Curves document. This was created as part of the process of procedurally generating curves in a separate Unity project.
The reference document can be accessed here.
- The script takes two or more user-defined 2D coordinates and interpolates intermediate points using the Bernstein polynomial form of cubic Bezier curves
- All curves are connected smoothly, through the matching of first (tangent) and second (curvature) derivatives
- The number of intermediate draw points can be manually set by the user