求解向量多项式方程

问题描述 投票:0回答:1

所以我试图用符号求解mathematica中用向量描述的多项式方程:

A = {Subscript[a, 0], Subscript[a, 1], Subscript[a, 2]}
B = {Subscript[b, 0], Subscript[b, 1], Subscript[b, 2]}
L = {Subscript[P, 0] + Subscript[tD, 0], Subscript[P, 1] + Subscript[tD, 1], Subscript[P, 2] + Subscript[tD, 2]}
K = Cross[(L - A), (L - B)]
Q = B - A
SolveAlways[((K[0]*K[0] + K[1]*K[1] + K[2]*K[2])^2/(Q[0]*Q[0] + Q[1]*Q[1] + Q[2]*Q[2])^2) - r^2, t]

但它不能象征性地组合最后一个方程来求解 t。有没有其他方法可以指定它来解决?

(我是第一次学习数学,我的小型学习项目是获取光线追踪表面的方程,这指定了一个圆柱体)

wolfram-mathematica solver equation-solving
1个回答
0
投票

因此,在深入学习语法之后,这就是我解决上述问题的方法

cylindA = {ax, ay, az}
cylindB = {bx, by, bz}
rayR = {px + t*dx, py + t*dy, pz + t*dz}
distInt = Cross[(rayR - cylindA), (rayR - cylindB)]
Q = cylindB - cylindA
Solve[((distInt . distInt)^2/(Q . Q)^2) - r^2 == 0, t]

(对于像 cylindA 这样的东西,你可以像 cylindA[[1]] 一样访问它,其中索引从 1 开始)

© www.soinside.com 2019 - 2024. All rights reserved.