For a plane , we have normal vector .
The vector equation of the line passing through point with direction vector is
In this case, write
This can also be written
In other words, we have a parametric equation described by
Combine with to get
So the point that gets hit first is , and to find the distance, use the Pythagorean theorem (generalized for three dimensions):
Note that the line we found earlier also passes through the origin, so it could be expressed more concisely as