Algorithm 6 Generate Bézier Curve Points |
-
1:
function GenerateBezierCurve(control_points, num_points)
-
2:
Create a list of evenly spaced values between 0 and 1
-
3:
Initialize as a zero matrix
-
4:
Number of control points minus 1
-
5:
for to do
-
6:
for to n do
-
7:
Calculate Bernstein polynomial
-
8:
-
9:
end for
-
10:
end for
-
11:
return
-
12:
end function
|