Polygon union algorithm in 3D

803 Views Asked by At

Given 2 polygons, normally 2 triangles in 3D space that are coplanar and are either intersecting or sharing 2 vertices:

I have a problem understanding the algorithm to get the union of two polygons.

I found 2 questions already answered in stackoverflow but I don't fully get it:

Questions:

  • Can somebody explain me if I should remove the vertices that lies inside the polygon or not?
  • Can somebody explain me what are the graph (data structure) that I have to have in order to trace the edges?
  • Can somebody write the pseudocode for the algorithm?

triangles union