I have four point p0 , p1 ,p1' , p2' , each defined by x,y,z component and all lay on one line as in the figure 

![enter image description here](https://i.stack.imgur.com/NzgrU.jpg)

I want to get the line segment (the dashed part) result from the intersection between the four points 

any suggestion , or sample code using C#