I am trying to code an algorithm in Scala, programming language. The program will return false if the line segment intersects in 3D: I don't need to find the point of the intersection even if they intersect.
The problem is that I am not able to find the step by step mathematical method for the line segments, most of them are for lines: lines might intersect at some point, but line segment, given the specific length might not intersect in the given band.
Given point A (Ax, Ay, Az), point B(Bx, By, Bz), point C(Cx, Cy, Cz), and point D(Dx,Dy,Dz), does AB intersect CD? (True or False)