Examples |
noFill();
stroke(255, 102, 0);
line(85, 20, 10, 10);
line(90, 90, 15, 80);
stroke(0, 0, 0);
bezier(85, 20, 10, 10, 90, 90, 15, 80); noFill();
stroke(255, 102, 0);
line(30, 20, 80, 5);
line(80, 75, 30, 75);
stroke(0, 0, 0);
bezier(30, 20, 80, 5, 80, 75, 30, 75); |
Syntax |
bezier(x1, y1, cx1, cy1, cx2, cy2, x2, y2);
bezier(x1, y1, z1, cx1, cy1, cz1, cx2, cy2, cz2, x2, y2, z2); |
Parameters |
x1, y1, z1 |
int or float: coordinates for the first anchor point |
cx1, cy1, cz1 |
int or float: coordinates for the first control point |
cx2, cy2, cz2 |
int or float: coordinates for the second control point |
x2, y2, z2 |
int or float: coordinates for the second anchor point |
|