syms x positive
A=0;
a=3*pi/180;
B=cos(2*a)*sin(a)-sin(2*a)*cos(a);
C=sin(2*a)*sin(a)+cos(2*a)*cos(a);
Q=[A^2 A*B A*C;A*B B^2 B*C; A*C B*C C^2];
P=[0 -C B;C 0 -A;-B A 0];
C1=[0;300*cos(a);-300*sin(a)];
R1=[1 0 0;0 cos(a) -sin(a);0 sin(a) cos(a)];
R2=[cos(x+63*pi/180) -sin(x+63*pi/180) 0;sin(x+63*pi/180) cos(x+63*pi/180) 0;0 0 1];
R3=[1 0 0;0 cos(a) sin(a);0 -sin(a) cos(a)];
R4=R3*R2*R1;
R=R4*C1;
[u,v,w]=solve('u^2+(v-1530)^2+w^2=300^2','u^2+(v-300*cos(3*pi/180))^2+(w+300*sin(3*pi/180))^2=1460.4^2','(cos(2*3*pi/180)*sin(3*pi/180)-sin(2*3*pi/180)*cos(3*pi/180))*(v-1530)+(sin(2*3*pi/180)*sin(3*pi/180)+cos(2*3*pi/180)*cos(3*pi/180))*w=0');
u1=abs(u);
F3=[u1(1);v(1);w(1)];
N=[0;1530;0];
O=[1 0 0;0 1 0;0 0 1];
E=(R-N)'*(O-Q)*(F3-N);
F=(R-N)'*(P)*(F3-N);
G=(R-N)'*(Q)*(F3-N)+1/2*((C1-F3)'*(C1-F3)-(R-N)'*(R-N)-(F3-N)'*(F3-N));
S=E^2+F^2-G^2;
T=S^0.5;
U=-F+T;
V=U/(G-E);
y=atan(V);
xx=0*pi/180:1*pi/180:10*pi/180;
yy=double(subs(y,x,xx));
plot(xx*180/pi,yy*180/pi)
以上是程序,作出来的图我想要让直线向下平移过原点
file:///D:\新建文件夹\334015100\Image\C2C\U5JPMA`FY1KTAOM`AX}{9{P.png
2016-1-9 17:30 上传
这个是结果