# barycentric

> Converts points to barycentric coordinates

Latest version **1.0.1** (published 2014-08-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install barycentric
pnpm add barycentric
yarn add barycentric
bun add barycentric
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2014-08-25 |
| First published | 2013-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Mikola Lysenko |
| Maintainers | mikolalysenko |
| Keywords | simplex, triangle, tetrahedra, line, barycentric, coordinate, geometry |

## Links

- npm: https://www.npmjs.com/package/barycentric
- Repository: https://github.com/mikolalysenko/barycentric
- Issues: https://github.com/mikolalysenko/barycentric/issues
- npm.io page: https://npm.io/package/barycentric

## Dependencies (1)

- [robust-linear-solve](https://npm.io/package/robust-linear-solve.md) ^1.0.0

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2014-08-25
- 1.0.0 — 2014-08-25
- 0.0.0 — 2013-03-30

## 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

---
_Source: https://npm.io/package/barycentric · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
