a port of the Processing Visualization Language
Name

bezierPoint()

Examples
example pic
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.

Syntax
bezierPoint(a,b,c,d,t)
Parameters
a int or float: coordinate of first point on the curve
b int or float: coordinate of first control point
c int or float: coordinate of second control point
d int or float: coordinate of second point on the curve
t float: value between 0 and 1
Returns None
Usage Web & Application
Related bezier()
bezierVertex()
curvePoint()

This reference is licensed under the CC BY-NC-SA 2.0 license:

Creative Commons License
Fork me on GitHub