# 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
```

I'm sorry, but this is not a ROS question. With over 48000 questions, we must try to stay on-topic as much as possible.

For more generic (math) questions, I'd suggest posting on Stack Exchange or similar fora.