I have a 3D mesh composed of tessellating triangles. I would like to perform an integral over the surface of this mesh of the form:
Where $R(\Omega)$ is the radius at a given angle and $f(\Omega)$ is an arbitary function. I have a method implemented but it is giving large errors.
My method is as follows, is there anything obviously wrong about it?
For each triangular face:
- Calculate the value of $fR$ at each vertex of the face.
- Calculate the average of these three values to find the average value of $fR$ across the face.
- Multiply this value by the solid angle covered by the face.
- Sum up this result for all of the faces in the mesh.
I implemented this from scratch and I thought it should work. Has anyone done anything similar and if so am I overlooking something?