⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ciitt.m

📁 This software gave volume MoM solution by the CG-FFT method
💻 M
字号:
%ciittfunction ciitt=ciitt(xs,ys,zs,xe,ye,ze,x0,y0,z0);d=sqrt((xe(1)-xs(1))^2+(ye(1)-ys(1))^2+(ze(1)-zs(1))^2);ciitt=0;xt=x0;yt=y0;zt=z0;for j=1:3,   x0=xs(j);y0=ys(j);z0=zs(j);   x0=x0-xs(1);   y0=y0-ys(1);   z0=z0-zs(1);   theta=acos((xe(1)-xs(1))/d);   phi=atan2((ye(1)-ys(1)),(xe(1)-xs(1)));   if (phi<0), phi=phi+2*pi;  end;     x1=x0*cos(phi)+y0*sin(phi);   y1=-x0*sin(phi)+y0*cos(phi);   z1=z0;   x0=x1;y0=y1;z0=z1;   x1=x0*cos(theta)+z0*sin(theta);   y1=y0;   z1=-x0*sin(theta)+z0*cos(theta);   x0=x1;y0=y1;z0=z1;   xts(j)=x0;yts(j)=y0;zts(j)=z0;   x0=xe(j);y0=ye(j);z0=ze(j);   x0=x0-xs(1);   y0=y0-ys(1);   z0=z0-zs(1);   theta=acos((xe(1)-xs(1))/d);   phi=atan2((ye(1)-ys(1)),(xe(1)-xs(1)));   if (phi<0), phi=phi+2*pi;  end;   x1=x0*cos(phi)+y0*sin(phi);   y1=-x0*sin(phi)+y0*cos(phi);   z1=z0;   x0=x1;y0=y1;z0=z1;   x1=x0*cos(theta)+z0*sin(theta);   y1=y0;   z1=-x0*sin(theta)+z0*cos(theta);   x0=x1;y0=y1;z0=z1;   xte(j)=x0;yte(j)=y0;zte(j)=z0;end;x0=xt;y0=yt;z0=zt;x0=x0-xs(1);y0=y0-ys(1);z0=z0-zs(1);theta=acos((xe(1)-xs(1))/d);phi=atan2((ye(1)-ys(1)),(xe(1)-xs(1)));if (phi<0), phi=phi+2*pi;  end;x1=x0*cos(phi)+y0*sin(phi);y1=-x0*sin(phi)+y0*cos(phi);z1=z0;x0=x1;y0=y1;z0=z1;x1=x0*cos(theta)+z0*sin(theta);y1=y0;z1=-x0*sin(theta)+z0*cos(theta);x0=x1;y0=y1;z0=z1;% theta11=acos((yts(2)/sqrt(xts(2)^2+yts(2)^2+zts(2)^2)));theta11=atan2(zts(2),yts(2));%if (theta11<0), theta11=theta11+2*pi;  end;x1=x0;y1=y0*cos(theta11)+z0*sin(theta11);z1=-y0*sin(theta11)+z0*cos(theta11);x0=x1;y0=y1;z0=z1;xt=x0;yt=y0;zt=z0;for j=1:3,   x0=xts(j);y0=yts(j);z0=zts(j);   x1=x0;   y1=y0*cos(theta11)+z0*sin(theta11);   z1=-y0*sin(theta11)+z0*cos(theta11);   xts(j)=x1;yts(j)=y1;zts(j)=z1;    x0=xte(j);y0=yte(j);z0=zte(j);   x1=x0;   y1=y0*cos(theta11)+z0*sin(theta11);   z1=-y0*sin(theta11)+z0*cos(theta11);   xte(j)=x1;yte(j)=y1;zte(j)=z1;end;x0=xt;y0=yt;z0=zt;if (x0>=0),   if (x0<=max(xte)),      if (z0>=min([zts zte])),         if (z0<=max([zte zts])),             yts2=(z0)/zts(3)*(yts(3)-yts(2))+yts(2);             yte2=(z0)/zts(3)*(yts(3)-yts(1))+yts(1);             if (y0<=max([yte2 yts2])),                if (y0>=min([yte2 yts2])),                   ciitt=1;                end;             end;         end;      end;   end;end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -