def _PrPz(r0, z0, r1, z1, r2, z2, r3, z3):
Pr = ((r0*z1 - z0*r1)*(r2 - r3) - (r0 - r1)*(r2*z3 - r3*z2)) /((r0 - r1)*(z2 - z3) - (z0 - z1)*(r2-r3))<EOL>Pz = ((r0*z1 - z0*r1)*(z2 - z3) - (z0 - z1)*(r2*z3 - r3*z2)) /((r0 - r1)*(z2 - z3) - (z0 - z1)*(r2-r3))<EOL>if Pr >= r0 and Pr <= r1 and Pz >= z0 and Pz <= z1:<EOL><INDENT>hit = True<EOL><DEDENT>elif Pr <= r0 and Pr >= r1 and Pz >= z0 and Pz <= z1:<EOL><INDENT>hit = True<EOL><DEDENT>elif Pr >= r0 and Pr <= r1 and Pz <= z0 and Pz >= z1:<EOL><INDENT>hit = True<EOL><DEDENT>elif Pr <= r0 and Pr >= r1 and Pz <= z0 and Pz >= z1:<EOL><INDENT>hit = True<EOL><DEDENT>else:<EOL><INDENT>hit = False<EOL><DEDENT>return [Pr, Pz, hit]<EOL>
Intersection point for infinite lines.

Parameters
----------
r0 : float
z0 : float
r1 : float
z1 : float
r2 : float
z2 : float
r3 : float
z3 : float

Returns
----------
Pr : float    
Pz : float
hit : bool