我目前正在尝试找到两个旋转多项式第二度的交点(也称为抛物线)。 我能够计算没有旋转的交点,但不能用一个。
我目前的代码基于Code or formula for intersection of two parabolas in any rotation
syms t1 t2
% a1 b1 c1 are coefficients of the first polynomial
% a2 b2 c2 of the second one
% First polynomial equation
fax = a1*t1.^2 + b1*t1 + c1;
fay = t1;
fax1 = fax*cos(w1) - sin(w1)*fay;
fay1 = +fax*sin(w1) + cos(w1)*fay;
% Second polynomial equation
fbx = a2*t2.^2 + b2*t2+ c2;
fby = t2;
fbx1 = fbx*cos(w2) - sin(w2)*fby;
fby1 = fbx*sin(w2) + cos(w2)*fby;
[solT1 solT2] = solve([fbx1-fax1,fby1-fay1],[t1 t2],'MaxDegree', 4);
double(solT1)
double(solT2)
但是求解函数不会返回x / y方程的相等值。有人可以帮助我,我在哪里失败?
输出:
>> double(solT1)
ans =
-35970.3949972882 + 0i
-547.958594347212 + 0i
45277.2230289302 + 73433.2725463157i
45277.2230289302 - 73433.2725463157i
>> double(solT2)
ans =
-43312.4016357418 + 0i
-123.972586439179 + 0i
87780.3324792941 - 89532.7369678429i
87780.3324792941 + 89532.7369678429i