Skip to content

ataber/triangle-quadrature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

triangle-quadrature

experimental

Gaussian quadrature for a triangle.

Usage

NPM

var bunny      = require('bunny')
var quadrature = require('triangle-quadrature')([bunny.positions[0], bunny.positions[1], bunny.positions[2])
console.log(quadrature) # <- {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.

About

Gaussian quadrature rule for triangle

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published