📄 ciias.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -