# Line intersection [closed]

In my code I am clustering a cloud into many clusters, for each cluster I extract all of the lines. My question is: how can I calculate intersection of two lines when for each line I've got these parameters:

point_on_line.x : the X coordinate of a point on the line
point_on_line.y : the Y coordinate of a point on the line
point_on_line.z : the Z coordinate of a point on the line
line_direction.x : the X coordinate of a line's direction
line_direction.y : the Y coordinate of a line's direction
line_direction.z : the Z coordinate of a line's direction

edit retag reopen merge delete