bezier-forward-diff

1.0.1 • Public • Published

bezier-forward-diff

Bezier subdivision via forward differencing

install

npm install bezier-forward-diff

use

var bezier = require('./bezier');
var zeroes = require('zeroes');

var input = [ [ 0, 0, 0 ],
              [ 0, 0, 1 ],
              [ 0, 1, 1 ],
              [ 1, 1, 1 ] ];

var segments = 7;

// preallocate the result array
var result = zeroes( [ segments + 1, 3 ] ); // n + 1 points define n segments

bezier(result, input, segments);

console.log(result);

thanks

Forward Difference Calculation of Bezier Curves By Curtis Bartley, November 01, 1997

http://www.drdobbs.com/forward-difference-calculation-of-bezier/184403417?pgno=5

license

MIT

/bezier-forward-diff/

    Package Sidebar

    Install

    npm i bezier-forward-diff

    Weekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • maxharris9