This algorithm is described in detail in "Preconditioning of spectral methods via Birkhoff interpolation" (see Publications). An example of its usage is presented here.
See the preprint "A provably robust algorithm for triangle-triangle intersections in floating point arithmetic" for more information (filed under Publications). A working example is presented here.
An update (13.7.2023) to the subfunction TriIntersect, which calculates the intersection of triangles. This verison is significantly faster.