Assume you have a triangle in the plane defined by its three vertices at $(x_0,y_0)$, $(x_1,y_1)$, and $(x_2,y_2)$. Is there a general expression for the moments of the triangle, where the moments are defined as averages by the following expression:
$$\langle x^n y^m \rangle = \frac{1}{A}\int_\triangle x^n y^m \, dA $$
Integrating manually to compute the first few moments, one can obtain:
$$\langle x \rangle = \frac{1}{3} \left(x_0+x_1+x_2\right) $$
$$\langle x^2 \rangle = \frac{1}{6} \left(x_0^2+x_1^2+x_2^2+x_0 x_1+x_0 x_2+x_1 x_2\right) $$
$$\langle x y \rangle = \frac{1}{12}\left(2 x_0 y_0+x_1 y_0+x_2 y_0+x_0 y_1+2 x_1 y_1+x_2 y_1+x_0 y_2+x_1 y_2+2 x_2 y_2 \right)$$
Is it possible to obtain a closed form expression for general $n$ and $m$ using combinations of the coordinates?
EDIT:
Can the same be done for line segments defined by their endpoints $(x_0,y_0)$ and $(x_1,y_1)$? Again the first few moments in this case are:
$$\langle x \rangle = \frac{1}{2} \left(x_0+x_1\right) $$ $$ \langle x^2 \rangle = \frac{1}{3} \left(x_0^2+x_0 x_1+x_1^2\right) $$ $$ \langle x^3 \rangle = \frac{1}{4} \left(x_0^3+x_0^2 x_1+x_0 x_1^2+x_1^3\right) $$ $$ \langle x y \rangle = \frac{1}{6} \left(2 x_0 y_0+x_1 y_0+x_0 y_1+2 x_1 y_1\right) $$ $$ \langle x^2 y \rangle = \frac{1}{12} \left( 3 x_0^2 y_0+2 x_0 x_1 y_0+x_1^2 y_0+x_0^2 y_1+2 x_0 x_1 y_1+3 x_1^2 y_1\right)$$