for i=1:1000
m=round(x(i)-0.5)-round(tx2);
n=round(y(i)-0.5)-round(ty2);
p=round(z(i)-0.5)-round(tz2);
if((m~=0)&&(n~=0)&&(p~=0))
temp(round(x(i)-0.5)-round(tx2),round(y(i)-0.5)-round(ty2),round(z(i)-0.5)-round(tz2))=1;
end
end
count(a)=0;
for i=1:tx1-tx2
for j=1:ty1-ty2
for k=1:tz1-tz2
if(temp(i,j,k)==1)
count(a)=count(a)+1;
end
end
end
end
plot3(d4(a),l4(a),count(a),'r*')
end