Reference+
Name
bezierVertex()
Description
Specifies vertex coordinates for Bézier curves. Each call to bezierVertex() defines the position of two control points and one anchor point of a Bézier curve, adding a new segment to a line or shape. The first time bezierVertex() is used within a beginShape() call, it must be prefaced with a call to vertex() to set the first anchor point. This function must be used between beginShape() and endShape() and only when there is no MODE parameter specified to beginShape(). Using the 3D version requires rendering with P3D (see the Environment reference for more information).
Examples
size(400,400); noFill(); beginShape(); vertex(120, 80); bezierVertex(320, 0, 320, 300, 120, 300); endShape();
size(400,400); beginShape(); vertex(120, 80); bezierVertex(320, 0, 320, 300, 90, 300); bezierVertex(200, 320, 240, 100, 120, 80); endShape();
Syntax
bezierVertex(x2, y2, x3, y3, x4, y4)
bezierVertex(x2, y2, z2, x3, y3, z3, x4, y4, z4)
Parameters
x2
(float)
the x-coordinate of the 1st control pointy2
(float)
the y-coordinate of the 1st control pointz2
(float)
the z-coordinate of the 1st control pointx3
(float)
the x-coordinate of the 2nd control pointy3
(float)
the y-coordinate of the 2nd control pointz3
(float)
the z-coordinate of the 2nd control pointx4
(float)
the x-coordinate of the anchor pointy4
(float)
the y-coordinate of the anchor pointz4
(float)
the z-coordinate of the anchor point
Return
void
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.