pick-point-in-triangle

1.0.1 • Public • Published

pick-point-in-triangle

experimental

Pick a random point in a triangle, derived from this reference.

Usage

NPM

var bunny   = require('bunny')
var cells   = bunny.cells
var positions = bunny.positions
var triangle = [positions[cells[0][0]], positions[cells[0][1]], positions[cells[0][2]]]
var point = require('pick-point-in-triangle')(triangle);

require("pick-point-in-triangle")(vertices)

Uniformly samples within a triangle given an array of 3 vertices.

Contributing

See stackgl/contributing for details.

License

MIT. See LICENSE.md for details.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i pick-point-in-triangle

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • ataber