In my previous job our researchers did a lot of work with SageMath mostly focused on number theory for crypto stuff.
As for our ray intersection solution, you can enter following program and press "Run" button to execute it:
1 2 3 4 5 6 | var('pax,pay,rax,ray,pbx,pby,rbx,rby,ta,tb') eq1 = pax + ta*rax == pbx + tb*rbx eq2 = pay + ta*ray == pby + tb*rby solve([eq1,eq2],[ta,tb]) |
Pretty simple. And this is how the result will look like: https://cloud.sagemath.com/projec...b7/files/2017-02-19-214708.sagews
1 2 | [[ta == -((pay - pby)*rbx - pax*rby + pbx*rby)/(ray*rbx - rax*rby), tb == -((pay - pby)*rax - pax*ray + pbx*ray)/(ray*rbx - rax*rby)]] |
I believe SageMath uses Maxima software for solving this, so you might be able to install only Maxima, instead of whole SageMath if you care about installing something smaller.