bezier()

本参考资料用于Processing 3.0+。 如果你使用的是前一版本,请在使用软件帮助菜单内的参考资料。. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.

名称

bezier()

示例
 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);

描述 Draws a Bezier curve on the screen. These curves are defined by a series of anchor and control points. The first two parameters specify the first anchor point and the last two parameters specify the other anchor point. The middle parameters specify the control points which define the shape of the curve. Bezier curves were developed by French engineer Pierre Bezier. Using the 3D version requires rendering with P3D (see the Environment reference for more information).
语法
bezier(x1, y1, x2, y2, x3, y3, x4, y4) bezier(x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4)
参数
x1 float: coordinates for the first anchor point
y1 float: coordinates for the first anchor point
z1 float: coordinates for the first anchor point
x2 float: coordinates for the first control point
y2 float: coordinates for the first control point
z2 float: coordinates for the first control point
x3 float: coordinates for the second control point
y3 float: coordinates for the second control point
z3 float: coordinates for the second control point
x4 float: coordinates for the second anchor point
y4 float: coordinates for the second anchor point
z4 float: coordinates for the second anchor point
返回值 void
相关 bezierVertex()
curve()

Updated on October 2, 2018 05:02:08pm EDT

bezier()