If I had a triangular mesh surface, it could be rendered according to whatever computer graphics does to render it, and done properly only the front most triangles would be visible.
What I am interested in is something similar to the rendering problem in concept, but I don't want a bitmap image. What i want is the list of 2D polygons that results when projecting a 3D triangular mesh onto a plane, and what I need are the actual vertices and edges of the resulting 2D mesh.
In addition to projecting triangles that are completely visible onto a plane which is trivial, it would also mean not including triangles that are completely covered, but also clipping triangles that are partly covered, possibly into polygons with >3 edges.
In a naive sense, I could simply project every triangle into the plane, tracking the z-value of each one, and then compare every triangle to every other polygon for overlap and then do clipping and ignoring as necessary. But then this would go as N^2 and I have to do this procedure many times and would be concerned about computational cost.
While I have found many things about operations on triangular meshes such as rendering, simplifying, performing booleans, etc. I haven't seen this exactly. If there is a library for doing this, or a reference that discusses how to do it, I would be grateful for a reference.