Adds a Bézier curve segment to a custom shape.

`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. The curved segment uses the previous vertex as the first anchor point, so there must be at least one call to vertex() before `bezierVertex()`

can be used.

The first four parameters, `x2`

, `y2`

, `x3`

, and `y3`

, set the curve’s two control points. The control points "pull" the curve towards them.

The fifth and sixth parameters, `x4`

, and `y4`

, set the last anchor point. The last anchor point is where the curve ends.

Bézier curves can also be drawn in 3D using WebGL mode. The 3D version of `bezierVertex()`

has eight arguments because each point has x-, y-, and z-coordinates.

Note: `bezierVertex()`

won’t work when an argument is passed to beginShape().

## Examples

## Syntax

`bezierVertex(x2, y2, x3, y3, x4, y4)`

`bezierVertex(x2, y2, z2, x3, y3, z3, x4, y4, z4)`

## Parameters

x-coordinate of the first control point.

y-coordinate of the first control point.

x-coordinate of the second control point.

y-coordinate of the second control point.

x-coordinate of the anchor point.

y-coordinate of the anchor point.

z-coordinate of the first control point.

z-coordinate of the second control point.

z-coordinate of the anchor point.