This function calculates the view factors of nTri triangular areas.
function PhiTri input Integer nTri "Number of triangle areas"; input Real a1[nTri]; input Real a2[nTri]; input Real a3[nTri]; input Real b1[nTri]; input Real b2[nTri]; input Real b3[nTri]; input Real c1[nTri]; input Real c2[nTri]; input Real c3[nTri]; input Integer r[nTri] "Normal directions of the triangular areas"; input Integer z[nTri] "Number of segments"; input Boolean viewFacComp "true: numerical compensation of the view factors (only for closed hulls), false: no numerical compensation of the view factors"; output Real PhiComp[nTri, nTri] "Compensated view factors of the triangular areas"; end PhiTri;