首页 > 文档 > bezierPoint()贝塞尔切点
2017
07-28

bezierPoint()贝塞尔切点

Name bezierPoint()贝塞尔切点
Examples bezierPoint()贝塞尔切点 - 第1张  | Processing编程艺术

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

}

Description 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.

关键点 abcd 的贝塞尔曲线。参数 t 01之间变化, a d 是曲线上的点, b c 是控制点。这可以做一次与 x 坐标和第二次与 y 坐标得到的位置贝塞尔曲线在 t

Syntax bezierPoint(a, b, c, d, t)
Parameters
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

浮点数:值介于01之间

Returns float
Related bezier()
bezierVertex()
curvePoint()


最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。