Influences the shape of the Bézier curve segment in a custom shape. By default, this is 3; the other possible parameter is 2. This results in quadratic Bézier curves.
bezierVertex()
adds a curved segment to custom shapes. The Bézier curves it creates are defined like those made by the bezier() function. bezierVertex()
must be called between the beginShape() and endShape() functions. There must be at least one call to bezierVertex(), before a number of bezierVertex()
calls that is a multiple of the parameter set by bezierOrder(...) (default 3).
Each curve of order 3 requires three calls to bezierVertex
, so 2 curves would need 7 calls to bezierVertex()
: (1 one initial anchor point, two sets of 3 curves describing the curves) With bezierOrder(2)
, two curves would need 5 calls: 1 + 2 + 2.
Bézier curves can also be drawn in 3D using WebGL mode.
Note: bezierVertex()
won’t work when an argument is passed to beginShape().
Examples
Syntax
bezierOrder(order)
bezierOrder()