triangle-quadrature
Gaussian quadrature for a triangle.
Usage
var bunny = var quadrature = bunnypositions0 bunnypositions1 bunnypositions2console # <- positions: ... weights: ...
require("triangle-quadrature")(positions, [order = 5])
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
.
Contributing
See stackgl/contributing for details.
License
MIT. See LICENSE.md for details.