Determining if a datapoint is outside of a 3D polygon
2 views (last 30 days)
Show older comments
I have written some code to attempt to create a concave hull around a three dimensional datacloud. To achieve this concave hull, I am using the 'alphavol' code from the file exchange. Currently, the code I have written doesn't guarentee that every data point is included within the hull, and this is a necessity.
Is there a method that I could use to determine whether there are any data points outside of the three dimensional alphashape? Are there any completely different methods that I could use to make sure that every datapoint is included?
The code that I have written so far is below:
x=rand(50,1);
y=rand(50,1);
z=exp(rand(50,1));
% z = exp(x.*y);
X=[x,y,z];
A=pdist(X);
A=squareform(A);
for i=1:size(A,1)
j = A(i,:) > 0;
p_min1(i,:)=min(A(i,j));
end
r = max(p_min1);
subplot(1,2,1), alphavol(X,Inf,1);
alpha(.4)
subplot(1,2,2), alphavol(X,r,1);
alpha(.4)
0 Comments
Answers (0)
See Also
Categories
Find more on Bounding Regions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!