Reference+
Name
quadraticVertex()
Description
Specifies vertex coordinates for quadratic Bézier curves. Each call to quadraticVertex() defines the position of one control point and one anchor point of a Bézier curve, adding a new segment to a line or shape. The first time quadraticVertex() 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(); strokeWeight(16); beginShape(); vertex(80, 80); quadraticVertex(320, 80, 200, 200); endShape();
size(400, 400); noFill(); strokeWeight(16); beginShape(); vertex(80, 80); quadraticVertex(320, 80, 200, 200); quadraticVertex(80, 320, 320, 320); vertex(320, 240); endShape();
Syntax
quadraticVertex(cx, cy, x3, y3)
quadraticVertex(cx, cy, cz, x3, y3, z3)
Parameters
cx
(float)
the x-coordinate of the control pointcy
(float)
the y-coordinate of the control pointx3
(float)
the x-coordinate of the anchor pointy3
(float)
the y-coordinate of the anchor pointcz
(float)
the z-coordinate of the control pointz3
(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.