BezierSpline


a Bezier spline joins each point to the next by specifying control points.


The number of control points determines the order of that segment:

0 : linear

1 : quadratic

2 : cubic


Like other splines the points and control points may be multi-dimensional.


BezierSpline(

point,

  controlPoints,

point2,

  controlPoints2,

...

pointN,

  controlPointsN,

 

isClosed

)


Alternates points and lists of controlPoints


The gui:


click a knot to select that segment

double click to create a point after the selected segment

control-double click to create a control point in the selected segment



(

b = BezierSpline(

0@0,

  [],

1@1,

  [],

false

);

b.gui


)


b.asCompileString




(

b = BezierSpline(

0@0,

  [0.2@0.4],

1@1,

  [],

false

);


b.gui


)




(


b = BezierSpline(

0@0,

  [ 0.2@0.4, 0.5@0.9  ],

1@1,

  [],

false

);


b.gui(nil,1000@300)


)



// issue: specs with step should not quantize the plotting

// just the point selection

(


b = BezierSpline(

Point(0.0,-30.0),

  [ ],

Point(1.0,30),

  [],

false

);


g = b.gui(nil,1000@300,ControlSpec(-44,44),ControlSpec(0,8,step:0.25));

)


(

b = BezierSpline(

0@0,

  [ 0.2@0.4, 0.5@0.9  ],

1@1,

  [],

false

);


g = b.gui(nil,1000@300);

g.spec = ControlSpec(0,1,step:0.1);

g.setDomainSpec( ControlSpec(0,8,step:0.25) );

)


(


b = BezierSpline(

Point(0.0,-30.0),

  [ ],

Point(1.0,30),

  [],

false

);


g = b.gui(nil,1000@300);

g.spec = ControlSpec(-44,44);

g.domainSpec = ControlSpec(0,8,step:0.25);

)