hexagon_integrals


hexagon_integrals, a MATLAB code which returns the exact value of the integral of any monomial over the interior of a hexagon.

The code assumes that the hexagon has a "flat" top and bottom:

            *   *
          *       *
            *   *
    

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

hexagon_integrals is available in a MATLAB version and an Octave version and a Python version.

Related Data and Programs:

hexagon_integrals_test

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_integrals, a MATLAB code which returns the exact value of the integral of any monomial over the surface or interior of some geometric object, including a line, quadrilateral, box, circle, disk, sphere, ball and others.

Reference:

  1. SF Bockman,
    Generalizing the Formula for Areas of Polygons to Moments,
    American Mathematical Society Monthly,
    Volume 96, Number 2, February 1989, pages 131-132.
  2. Carsten Steger,
    On the calculation of arbitrary moments of polygons,
    Technical Report FGBV-96-05,
    Forschungsgruppe Bildverstehen, Informatik IX,
    Technische Universitaet Muenchen, October 1996.

Source Code:


Last revised on 31 October 2022.