This question is pretty simple to state: given two linear functions on a polygon, I'm looking for a formula for the integral of their product which depends only on the values at the (unlabelled) edges and on the shape of the polygon. However, the motivation comes from a problem I've been investigating for a while, so I thought I might as well elaborate for the sake of context (the previous question in the series is here). My understanding of the problem is gradually progressing, and with it the way in which I formulate it. Quick recap:

I'm interested in variations of piecewise linear surfaces in ℝ^{3} (which need not be triangulated). Fixing the "combinatorial type" of a surface - i.e. the way vertices, edges and faces are joined together - I have found that the space of variations has dimension E + 3χ, with E the number of edges and χ the Euler characteristic. For surfaces homeomorphic to a sphere, we get E+6 with 6 dimensions corresponding to translations and rotations.

I would like to find an inner product on the space of variations, with the following caveat. There are operations which change the combinatorial structure of a surface but not its actual shape - such as adding a "flat" edge across a non-triangular face, or an edge of zero length at a vertex where more than three faces meet. In such cases there is a natural inclusion of the variations of the original surface into the variations of the new one, and I would like my inner product to be preserved under this inclusion.

I've been proceeding by analogy with the smooth case: each variation induces a unique normal vector field on every face, so we can take the pointwise product of these and then integrate. This inner product is intuitively consistent in the sense described in the previous paragraph.

Because variations must preserve linearity of the faces, the vector fields are linear on each face - so we can write them, and their product, in terms of the vertices or edges. In particular, for a triangular face the inner product is the average of the (pointwise) products on the centres of the edges, multiplied by the area of the face.

This is promising: for triangulated surfaces, I now have an expression which depends only on the edges. But I'm having trouble extending this to non-triangular faces. I've tried triangulating a polygon in various specific and generic ways, and so far all I've got is a mess. But maybe I'm being stupid. Any suggestions?