Bitmap/Bézier curves/Cubic: Difference between revisions
→{{header|J}}: left arg not used
m (→{{header|J}}: comments) |
(→{{header|J}}: left arg not used) |
||
Line 231:
NB.*getBezierPoints v Returns points for bezier curve given control points (y)
NB. eg:
NB. y is: y0 x0, y1 x1, y2 x2 ...
getBezierPoints=:
ctrlpts=. (/: {:"1) _2]\ y NB. sort ctrlpts for increasing x
xvals=. ({: ,~ {. + +:@:i.@<.@-:@-~/) ({:"1) 0 _1{ctrlpts
|