Write the fastest possible algorithm for computing the solid angle subtended by an arbitrary (flat, non-complex) polygon as seen from any point, with a side-discrimination (unit perpendicular vector provided).
Discuss necessity to write several versions for:
- Flat polygons
- 3d (non-flat) polygons that can, or cannot, be projected on a plane
- Direct computation ? planar projection ? sphere projection (non-euclidian geometry) ?
Possible strategy : decompose into triangles (with barycenter as common summit) and use exact formulation (see existing algo in tofu and this page :
https://en.wikipedia.org/wiki/Solid_angle
)
Inline that algorithm
Write the fastest possible algorithm for computing the solid angle subtended by an arbitrary (flat, non-complex) polygon as seen from any point, with a side-discrimination (unit perpendicular vector provided).
Discuss necessity to write several versions for:
Possible strategy : decompose into triangles (with barycenter as common summit) and use exact formulation (see existing algo in tofu and this page :
https://en.wikipedia.org/wiki/Solid_angle
)
Inline that algorithm