Excel B-spline Calculator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The AutoCAD spline command uses NURBS (Non-uniform Rational B-splines) as the mathematical definition of a smooth curve. If you create a spline using the CV (Control Vertex) method you will get a 3rd degree B-spline. Using the splinedit command you can edit the spline and get the more complex NURBS spline.
I wanted to improve my understanding of the math behind B-splines and eventually NURBS. With that goal in mind I created an Excel custom function to create a B-spline for a series of CVs. The function can be used to create 3rd degree or other degree B-splines.
The attached Excel macro enabled file contains a custom BSpline function that will reproduce the initial spline you get in AutoCAD when you specify a series of CVs. The function is:
BSpline(u,degree,CVs)
where u is the independent variable of the spline with a range of 0 to (degree + number of CVs + 1) and CVs is an array of the x, or y, or z coordinates of the control points.
Here’s an example Excel worksheet that uses the function to obtain points on the spline.
... and the corresponding spline in AutoCAD.
If you are new to parametric spline math and would like to know more I think a good place to start is with Bezier splines. The attached document provides an introduction to Bezier splines that is light (I think) on the math.
I hope you find this of interest.
Lee