p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
Parameters
a Number: coordinate of first control point
b Number: coordinate of first point on the curve
c Number: coordinate of second point on the curve
d Number: coordinate of second control point
t Number: value between 0 and 1
So, the points on the curve are values 2 and 3, not 1 and 4. That would be more similar to the curve() function.
Nature of issue?
Most appropriate sub-area of p5.js?
Which platform were you using when you encountered this?
Details about the bug:
I’m pretty sure that the documentation for the
curvePoint()
function in p5.js is wrong. It is here: https://p5js.org/reference/#/p5/curvePointI think the parameters should be:
Parameters
a
Number: coordinate of first control pointb
Number: coordinate of first point on the curvec
Number: coordinate of second point on the curved
Number: coordinate of second control pointt
Number: value between 0 and 1So, the points on the curve are values 2 and 3, not 1 and 4. That would be more similar to the
curve()
function.Here's an example: https://editor.p5js.org/kll/sketches/BJYFW_hTQ
The original processing documentation is inconsistent, too: https://processing.org/reference/curvePoint_.html