barycentric

1.0.1 • Public • Published

barycentric

Computes the location of a point in a simplex in barycentric coordinates (aka areal coordinates).

Usage

Install using npm:

npm install barycentric

And then use as follows:

var barycentric = require("barycentric")
 
console.log(barycentric([[0,0], [0,1], [1,0]], [0.5, 0.5]))
//Prints:
//
//  [0, 0.5, 0.5]
//

Credits

(c) 2013 Mikola Lysenko. MIT License

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    322,813
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    322,813
  • 1.0.0
    3
  • 0.0.0
    8

Package Sidebar

Install

npm i barycentric

Weekly Downloads

74,595

Version

1.0.1

License

MIT

Last publish

Collaborators

  • mikolalysenko