0

What is the fastest way to compute the two vertices of the line-segment of intersection between two triangles (given by their vertex positions) in 3D space ?

I would have thought the solution to this problem should be rather easy to find somewhere, but unfortunately I could not find ANY (even minimally elegant) solution. :/

Lenny
  • 71
  • 6
  • Do you know how to find the intersection between a line (defined by two points) and the plane containing a triangle? – Beta Nov 11 '20 at 23:10
  • 1
    Quick search [1](https://stackoverflow.com/questions/1496215/triangle-triangle-intersection-in-3d-space), [2](https://stackoverflow.com/questions/7113344/find-whether-two-triangles-intersect-or-not?rq=1) – MBo Nov 12 '20 at 06:01
  • Here is how to find the line through two points in 3D. https://brilliant.org/wiki/3d-coordinate-geometry-equation-of-a-line/ – Serge de Gosson de Varennes Nov 12 '20 at 11:24
  • fastest way on what? you know used HW is pretty important for this... for example what is fast on CPU might be slow on GPU and vice versa... not to mention there are also DSP,MCU,FPGA .... language compiler ide also sometimes play a role ... here simple (but not fastest) stuff that can be used: [Cone to box collision](https://stackoverflow.com/a/62257945/2521214) check out `line closest(triangle t0,triangle t1);` function it returns the closest points between the 2 triangles it can be tweaked/used to return the line you want ... – Spektre Nov 12 '20 at 13:15
  • The first link of MBo had the computationI needed. Thank you for that. Didn't see at first they actually computed the line segment as the original post was always just about determining if there is a intersection or not (which is a much easier problem). – Lenny Nov 12 '20 at 19:52

1 Answers1

0

This paper answers precisely this question: https://cis.temple.edu/~lakaemper/courses/cis350_2004/etc/moeller_triangle.pdf

Lenny
  • 71
  • 6