Nationwide Polamorous Matrimony
    Wondering what’s next for npm?Check out our public roadmap! »

    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

    Install

    npm i bezier-forward-diff

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • avatar