File Exchange

image thumbnail

Connecting a set of points with smoothly connected cubic Bezier segments

version 1.0.0.0 (4.73 KB) by Aaron Wetzler
Smoothly connecting a set n-d points using cubic Bezier ssegments

6 Downloads

Updated 13 Dec 2009

View License

I have always been trying to find code in Matlab that enables one to smoothly connect arbitrary points in 2d or 3d with a smoothness condition and until recently couldnt find anything. We covered the theory in one of my classes and after working through it and some searching on the net I found a free open license C# version on codeProject.com.

This is my Matlab version taken from there with the addition that it can be applied to points in any dimensions. The smoothness condition is simply the requirement that the first and second derivatives be equal at the joins of each segment. This does not guarantee that there will be no loops. A better version would make the smoothness requirement on the curvature.

If there is enough of a demand I will create a function that uses curvature conditioning. In the meantime however the code works well on most nicely chosen set of data points meaning that it is useful for design, not analysis.

Comments and Ratings (1)

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