Ray plane intersection function