% ЦгйяМс ЕгМ оФягД
clc
omg=sym('omg')
phi=sym('phi')
kap=sym('kap')
r1=[1,0,0;0,cos(omg),sin(omg);0,-sin(omg),cos(omg)];
r2=[cos(phi),0,-sin(phi);0,1,0;sin(phi),0,cos(phi)];
r3=[cos(kap),sin(kap),0;-sin(kap),cos(kap),0;0,0,1];
r=r3*r2*r1
X=sym('x')
Y=sym('y')
Z=sym('z')
X0=sym('x0')
Y0=sym('Y0')
Z0=sym('Z0')
M1=r(1,:)*[X-X0;Y-Y0;Z-Z0];
M2=r(2,:)*[X-X0;Y-Y0;Z-Z0];
M3=r(3,:)*[X-X0;Y-Y0;Z-Z0];
f=sym('f');
x=-f*(M1/M3);
y=-f*(M2/M3);
diff(x,'omg')
diff(x,'phi')
