PcurvePoint
processing
Evaluates the curve at point t for points a, b, c, d. The parameter t may range from 0 (the start of the curve) and 1 (the end of the curve). a and d are points on the curve, and b and c are the control points. This can be used once with the x coordinates and a second time with the y coordinates to get the location of a curve at t.
Link to original Processing doc
PcurvePoint is available since version 1.0.0.
See also
Signatures
Examples
// @preview image
//draw ellipses along the curve
300 200 '2D3' PGraphics
255 Pbackground
4 PstrokeWeight
16 PtextSize
50 'x1' STORE
100 'x2' STORE
150 'x3' STORE
200 'x4' STORE
250 'x5' STORE
300 'x6' STORE
100 'y1' STORE
130 'y2' STORE
80 'y3' STORE
85 'y4' STORE
130 'y5' STORE
100 'y6' STORE
$x1 $y1 Ppoint
$x2 $y2 Ppoint
$x3 $y3 Ppoint
$x4 $y5 Ppoint
2 PstrokeWeight
0xffff0000 Pstroke
$x1 $y1 $x2 $y2 $x3 $y3 $x4 $y4 Pcurve
0 10
<%
10.0 / 't' STORE
$x1 $x2 $x3 $x4 $t PcurvePoint 'x' STORE
$y1 $y2 $y3 $y4 $t PcurvePoint 'y' STORE
0xff009f00 Pfill
PnoStroke
'CENTER' PellipseMode
$x $y 5 5 Pellipse
%> FOR
Pencode