title: Testing tetrahedron-triangle intersection
body: <p>I want to determine whether a given triangle intersects a tetrahedron. I do not want to compute the solution polygon(if it exists) itself. Is there any library/package/published <em>practical</em> algorithm which can be used to solve this problem <em>directly</em>(unlike my attempt below)?</p>
  
  <p>I think as a last resort I will have to use standard polygon-polygon intersection algorithm implementations to solve this problem <em>indirectly</em>.</p>
  
  <p><strong>My attempt on this problem:</strong><br>
  I thought of breaking it into the problem of polygon-polygon intersection. So for each triangular face(say <code>T1</code>) of the tetrahedron and the given triangle <code>T2</code>, I thought of doing the following:</p>
  
  <ol>
  <li>Compute intersection(a line) between planes corresponding to each triangle, say <code>L1</code>.      </li>
  <li>For each triangle:<br>
  <ol>
  <li>For each edge of the triangle say <code>L2</code>, compute point of intersection <code>P</code> between <code>L1</code> and <code>L2</code>.</li>
  <li>Test(maybe using parametric form) of <code>L2</code>, if the point lies on the edge <code>L2</code>.   </li>
  </ol></li>
  </ol>
  
  <p>If for both triangles <code>T1</code> and <code>T2</code>, there exists <em>at least one</em> edge on which the intersection point <code>P</code> lies, then it implies that the triangles(and hence the given tetrahedron and the triangle <code>T2</code>) <em>do</em> intersect.</p>