![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/811434/image.png)
How do I find the volume between 2 point clouds?
3 次查看(过去 30 天)
显示 更早的评论
I have 2 sets of non-uniform point cloud data from an experiment in the form of objs. One is from before an impact, the other is from after. I want to get the volume of the void space created by the impact, as well as the volume of sand now above the original surface. These two numbers should be about the same, but I still want to get them independently of each other as a check. I am having a huge amount of trouble getting those volumes.
I've tried a couple things, none of which worked. My next plan is to convert the point clouds to a gridded dataset and subtract those from each other. I'll sum all the positives and the negative values to get the void volume and the moved volume of sand.
Does anyone have a better idea?
2 个评论
Image Analyst
2021-11-24
Not sure what you mean by volume since you forgot to attach any diagrams. Do you mean the convex hull like you'd get from convhull() (in 2-D) or convhulln() (if in 3-D)? It's kind of like if you put a rubber band or shrink wrap around your points. Is that what you mean?
numPoints = 20;
x = rand(1, numPoints)
y = rand(1, numPoints)
plot(x, y, 'b.', 'MarkerSize', 30);
hold on;
xlabel('x', 'FontSize',fontSize);
ylabel('y', 'FontSize',fontSize);
k = convhull(x, y)
% Plot convex hull
plot(x(k), y(k), 'r-', 'LineWidth', 3)
grid on;
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/811434/image.png)
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!