Asymptote/Command/Math/Intersect

real intersect(triple P, triple Q, triple n, triple Z);

Return the intersection time of the extension of the line segment PQ with the plane perpendicular to n and passing through Z