If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Course: Unlisted resources area > Unit 2

Lesson 1: ProcessingJS documentation

bezierVertex(cx1, cy1, cx2, cy2, x, y)

Used in conjunction with beginShape() and endShape() to draw shapes with bezier curves for sides. Each call to bezierVertex() defines the position of two control points and one anchor point of a Bezier 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. When using this function, do not specify a mode in beginShape().
Parameters:
NameDescription
cx1The x-coordinate of 1st control point
cy1The y-coordinate of 1st control point
cx2The x-coordinate of 2nd control point
cy2The y-coordinate of 2nd control point
xThe x-coordinate of anchor point
yThe y-coordinate of anchor point
Trying to use bezierVertex() to draw a shape? Check out this bezierVertex drawing tool.

Want to join the conversation?

No posts yet.