Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikolalysenko/barycentric
Converts points to barycentric coordinates
https://github.com/mikolalysenko/barycentric
Last synced: about 2 months ago
JSON representation
Converts points to barycentric coordinates
- Host: GitHub
- URL: https://github.com/mikolalysenko/barycentric
- Owner: mikolalysenko
- License: mit
- Created: 2013-03-30T16:00:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-08-25T22:15:10.000Z (over 10 years ago)
- Last Synced: 2024-10-20T14:27:56.569Z (2 months ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
barycentric
===========
Computes the location of a point in a simplex in [barycentric coordinates](http://en.wikipedia.org/wiki/Barycentric_coordinate_system#Generalized_barycentric_coordinates) (aka [areal coordinates](http://mathworld.wolfram.com/BarycentricCoordinates.html)).Usage
=====
Install using npm:npm install barycentric
And then use as follows:```javascript
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