Nomenclature Predictably Misunderstood

    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.

    Install

    npm i pick-point-in-triangle

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • ataber