line_line(origins, directions[, plane_normal])

Find the intersection between two lines.

trimesh.path.intersections.line_line(origins, directions, plane_normal=None)

Find the intersection between two lines. Uses terminology from:

line 1: P(s) = p_0 + sU line 2: Q(t) = q_0 + tV

  • origins ((2, d) float, points on lines (d in [2,3])) –

  • directions ((2, d) float, direction vectors) –

  • plane_normal ((3, ) float, if not passed computed from cross) –


  • intersects (boolean, whether the lines intersect.) – In 2D, false if the lines are parallel In 3D, false if lines are not coplanar

  • intersection (if intersects: (d) length point of intersection) – else: None