initial calculation ray sphere intersect