Gaussian quadrature for a triangle.
var bunny = require('bunny')
var quadrature = require('triangle-quadrature')([bunny.positions[0], bunny.positions[1], bunny.positions[2])
console.log(quadrature) # <- {positions: [...], weights: [...]}
Computes Gaussian quadrature for a triangle defined by positions
(three vec3s). Optionally, you can set a custom order, higher implying greater accuracy. To actually integrate using these quadrature points, simply take a sum of your integrand at positions
weighted by weights
.
See stackgl/contributing for details.
MIT. See LICENSE.md for details.