ciias.m
来自「This software gave volume MoM solution b」· M 代码 · 共 28 行
M
28 行
function ciias=ciias(pat,x0,y0,z0,dx,dy,dz);
% Check if the point (x0,y0,z0 ) is inside the arbitrary closed surface which the
% points on pat abelong to it.
ciias=0;
[Y,I]=sort(sqrt((pat(:,3)-z0).^2+(pat(:,2)-y0).^2));
[Y1,I1]=sort(pat(I(1:8),1));
xnow=x0;
p=0;
for j=1:8,
if (pat(I(I1(j)),1)>x0),
if (sqrt((pat(I(I1(j)),3)-z0).^2+(pat(I(I1(j)),2)-y0).^2)<=sqrt(dz^2+dy^2)),
if (abs(pat(I(I1(j)),1)-xnow)>=dx),
xnow=pat(I(I1(j)),1);
p=p+1;
end;
end;
end;
end;
if (floor(p/2)*2==p),
ciias=0;
else
ciias=1;
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?