title: Determining the cut of any given polygon and pyramid
body: <p>I am trying to implement in C++ a function that determines the cut of any given polygon and pyramid.</p>
  
  <p>This has actually turned out to be far simpler than I had first imagined.</p>
  
  <p>Firstly for each edge of the pyramid, test line-plane intersection (the given polygon is a plane, made up of 3 points). This will result in the new vertices at the cutting plane.</p>
  
  <p>Secondly, since the polygon is not an infinite plane one needs to test for line-line intersection between the polygon edges (three) and each of the edges.</p>