MCPcopy Index your code
hub / github.com/processing/processing / curvePoint

Method curvePoint

core/src/processing/core/PGraphics.java:3443–3455  ·  view source on GitHub ↗

( begin auto-generated from curvePoint.xml ) Evalutes the curve at point t for points a, b, c, d. The parameter t varies between 0 and 1, a and d are the control points, and b and c are the points on the curve. This can be done once with the x coordinates and a second time with the y coordinates to

(float a, float b, float c, float d, float t)

Source from the content-addressed store, hash-verified

3441 * @see PGraphics#bezierPoint(float, float, float, float, float)
3442 */
3443 public float curvePoint(float a, float b, float c, float d, float t) {
3444 curveInitCheck();
3445
3446 float tt = t * t;
3447 float ttt = t * tt;
3448 PMatrix3D cb = curveBasisMatrix;
3449
3450 // not optimized (and probably need not be)
3451 return (a * (ttt*cb.m00 + tt*cb.m10 + t*cb.m20 + cb.m30) +
3452 b * (ttt*cb.m01 + tt*cb.m11 + t*cb.m21 + cb.m31) +
3453 c * (ttt*cb.m02 + tt*cb.m12 + t*cb.m22 + cb.m32) +
3454 d * (ttt*cb.m03 + tt*cb.m13 + t*cb.m23 + cb.m33));
3455 }
3456
3457
3458 /**

Callers

nothing calls this directly

Calls 1

curveInitCheckMethod · 0.95

Tested by

no test coverage detected