intersection-of-a-ray-and-a-line-segment-in-3d https://www.codefull.net/2015/06/intersection-of-a-ray-and-a-line-segment-in-3d/