Integral of 2D Gaussian over triangle

946 Views Asked by At

I am interested in computing (numerically) the integral of a 2D Gaussian (with arbitrary mean and covariance matrix) over a triangle in the plane.

I would like the solution to work over a wide range of parameters (e.g. sharply peaked Gaussian within the triangle, broad Gaussian, anisotropic Gaussian that almost looks like a line crossing the triangle, etc.); therefore, trivial solutions such as a fixed quadrature rule over the triangle are not sufficient.

One approach I tried is to convert the problem into a 1D integral; it leads to an integral of the form

$$\int_{x_0}^{x_1} \exp(-a(x-b)^2) \mbox{erf}(x) dx$$

which does not appear to have an analytic solution, but a good approximation trick might exist.

My googling did not turn out anything useful, but I find it hard to believe that similar problems have not been studied by someone. Any pointers would be greatly appreciated!

1

There are 1 best solutions below

2
On BEST ANSWER

See this R package reference (which contains a reference to where the algorithm might be found).