How to plot "exterior" convex hull?

16 visualizaciones (últimos 30 días)
Radik Srazhidinov
Radik Srazhidinov el 6 de Jul. de 2021
I want to estimate the shape of convex 3d object. First let me give an example on 2d:
Lets say there is convex shape given by black color in the figure. We don't know its shape, but we are given points . Using convexhull and trisurf commands on Matlab, we can plot "interior" convex hull given by blue color. Now, if we are given not only points but also tangent lines to the black colored object through these points, we can plot "outer" convex hull through the points . The "outer" convex hull is more difficult to plot, because there are many points where tangent lines intersect, so we need to find some way to obtain specifically .
In 3d, we are given the points and tangent planes to these points in terms of plane equations . Here is Matlab program that generates next two figures:
clear;close all;clc;
load("planedata.mat");
load("planedata_d.mat");
load("points.mat");
a=planedata(1:100,1);
b=planedata(1:100,2);
c=planedata(1:100,3);
d=planedata_d;
figure(1)
x = points(1,:); y = points(2,:); z = points(3,:);
[k1,av1] = convhull(x,y,z);
trisurf(k1,x,y,z); %plot interior convex hull
figure(2)
[X,Y] = meshgrid(x,y);
for i=1:100
Z=real(-(a(i)*X+b(i)*Y+d(i))/c(i));
hold on
surf(X,Y,Z); %plot exterior convex hull
end
xlim([-1 2])
ylim([-1 2])
zlim([0 8])
xlabel('$X$','Interpreter','latex');
ylabel('$Y$','Interpreter','latex');
zlabel('$Z$','Interpreter','latex');
You can download the data file from here. (Also, I have attached it as data.zip, but not sure if it will appear) First, we just plot "interior" convex hull for given points (left) and the tangent planes (right):
And also I can see the shape of the "exterior" convex hull only by cutting all planes at specific height like this:
Is there any way to remove all the planes and plot only the "exterior" convex hull, so the figure looks like "interior" convex hull, but of course a little larger in size?

Respuestas (0)

Categorías

Más información sobre Bounding Regions en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by