Let's define a point O
with coordinates Xo, Yo, Zo
and a polygon ABCD
with coordinates (Xa,Ya,Za), (Xb,Yb,Zb), (Xc,Yc,Zc), (Xd,Yd,Z)
What is the most usual algorithmic way to compute the solid angle Ω
defined by the polyhedron ABCDO
?
Thank you
Rather simple method is to divide this pyramid into two tetrahedrons (for example, with common diagonal AC, if ABCD
is convex), then calculate solid angle for each tetrahedron
Ω = 2 * ArcTan(Dot(u1 X u2, u3) /(1 + Dot(u2,u3) + Dot(u1,u2) + Dot(u1,u3)))
where u1, u2, u3
- normalized (unit) vectors from O
to A, B, C
point (for 1st tetrahedron)
Look at the possible issues of this approach in Wiki