Highlight the intersection between a convex hull and a triangle in 3d

1 view (last 30 days)
I am trying to highlight the intersection between a convex hull and a triangle in 3d. The corresponding code is
%ConvexHull
X = [1 0 0; 0 1 0;0 0 1;0.85 0.85 0;0.85 0 0.85;0 0.85 0.85;0.75 0.75 0.75]; %# involves a 3D point on each row
K = convhulln(X);
H=trisurf(K,X(:,1),X(:,2),X(:,3),'FaceColor', 'interp','EdgeAlpha',0.1)
alpha(H, 0.8)
hold on
%Triangle
pointA=[1.75 0 0];
pointB=[0 1.75 0];
pointC=[0 0 1.75];
points=[pointA' pointB' pointC']; % using the data given in the question
P=fill3(points(1,:),points(2,:),points(3,:),'g')
grid on
alpha(P, 0.4)
which produces the following figure
I think this figure is not completely clear, especially the intersection part. Any idea or hint to enhance it?

Answers (0)

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!