hexagon_monte_carlo, a MATLAB code which applies a Monte Carlo method to estimate the integral of a function over the interior of a hexagon.
The code currently only looks at the special case of the unit hexagon, although this can be easily extended to more general sizes, shapes, and orientations.
The code assumes that the hexagon has a "flat" top and bottom:
* * * * * *
The information on this web page is distributed under the MIT license.
hexagon_monte_carlo is available in a MATLAB version and an Octave version and a Python version.
hexagon_integrals, a MATLAB code which returns the exact value of the integral of a monomial over the interior of a hexagon in 2D.
hexagon_lyness_rule, a MATLAB code which computes one of 13 Lyness quadrature rules over the interior of the unit hexagon.
hexagon_stroud_rule, a MATLAB code which computes one of four Stroud quadrature rules over the interior of the unit hexagon.
matlab_monte_carlo, a MATLAB code which uses Monte Carlo sampling to estimate areas and integrals.