Previous Up Next

19.8.1  Bezier curves

The Bezier curve with the control points P0,P1,…,Pn is the curve parameterized by

n
∑
j=0
 
⎛
⎜
⎝
n,j
t
⎞
⎟
⎠
j


 
 (1−t)n−j Pj.

The bezier command plots Bezier curves.

Examples

bezier(1,1+i,2+i,3-i,plot)
bezier(point(0,0,0),point(1,1,0),point(0,1,1),plot)

To get the parameterization of the curve, use the parameq command (see Section 26.12.8).

Examples

parameq(bezier(1,1+i,2+i,3-i))
     
⎛
⎝
1−t⎞
⎠
3+3 t ⎛
⎝
1−t⎞
⎠
2 ⎛
⎝
1+i⎞
⎠
+3 t2 ⎛
⎝
1−t⎞
⎠
⎛
⎝
2+i⎞
⎠
+t3 ⎛
⎝
3−i⎞
⎠
          
parameq(bezier(point([0,0,0]),point([1,1,0]),point([0,1,1])))
     
⎡
⎣
2 t ⎛
⎝
1−t⎞
⎠
,2 t ⎛
⎝
1−t⎞
⎠
+t2,t2⎤
⎦
          

Previous Up Next