1 | initial version |
(E-P).cross_product(E-QA
is a vector (technically a free module...), not a list. So:
sage: solve(list((E-P).cross_product(E-QA)),(QAx, QAy))
[[QAx == -(Ez*LBy*Px - Ey*LBz*Px - (Ez*LBx - Ex*LBz)*Py + (Ey*LBx - Ex*LBy)*Pz)/(Ez*LAy*LBx - Ey*LAz*LBx - (Ez*LAx - (Ex - Px)*LAz)*LBy + (Ey*LAx - (Ex - Px)*LAy)*LBz + (LAz*LBx - LAx*LBz)*Py - (LAy*LBx - LAx*LBy)*Pz), QAy == (Ez*LAy*Px - Ey*LAz*Px - (Ez*LAx - Ex*LAz)*Py + (Ey*LAx - Ex*LAy)*Pz)/(Ez*LAy*LBx - Ey*LAz*LBx - (Ez*LAx - (Ex - Px)*LAz)*LBy + (Ey*LAx - (Ex - Px)*LAy)*LBz + (LAz*LBx - LAx*LBz)*Py - (LAy*LBx - LAx*LBy)*Pz)]]