Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you draw a bezier curve in Matlab

Tags:

matlab

bezier

What's the Matlab way to draw a Bezier curve ? Do you have to prgoram it yourself ?

I am not looking for a user made routine, but am asking if Matlab offers a standard way to draw them.

like image 881
Edelcom Avatar asked Dec 30 '22 01:12

Edelcom


1 Answers

With the Curve Fitting Toolbox, Matlab supports B-splines, which are a generalization of Bézier curves. A rational B-spline with no internal knots is a Bézier spline.

For example

p = spmak([0 0 0 1 1 1],[1 0;0 1]);
fnplt(p)

would plot a Bézier curve with control points at (0,0),(1,0),(1,1),(0,1).

like image 168
blutfink Avatar answered Jan 05 '23 00:01

blutfink