bezierPoint()

本参考资料用于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.

名称

bezierPoint()

示例
 noFill();

bezier(85, 20, 10, 10, 90, 90, 15, 80);


fill(255);

int steps = 10;


for (int i = 0;

i <= steps;

i++)
{  
float t = i /float(steps);


float x = bezierPoint(85, 10, 90, 15, t);


float y = bezierPoint(20, 10, 90, 80, t);


ellipse(x, y, 5, 5);


  } 
描述 Evaluates the Bezier at point t for points a, b, c, d. The parameter t varies between 0 and 1, a and d are points on the curve, and b and c are the control points. This can be done once with the x coordinates and a second time with the y coordinates to get the location of a bezier curve at t.
语法
bezierPoint(a, b, c, d, t)
参数
a float: coordinate of first point on the curve
b float: coordinate of first control point
c float: coordinate of second control point
d float: coordinate of second point on the curve
t float: value between 0 and 1
返回值 float
相关 bezier()
bezierVertex()
curvePoint()

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

bezierPoint()