# Determine the intersection coordinates between a 3D object and an infinite plane

15 visualizzazioni (ultimi 30 giorni)
Alberto Acri il 26 Set 2023
Commentato: Bruno Luong il 26 Set 2023
Hi! I would like to know if there is a way to determine the intersection coordinates between a reported 3D geometry (tube) and an infinite plane. That is, determine the coordinates where the red line is in the image.
NODES = importdata("NODES.mat");
FACES = importdata("FACES.mat");
P = [24.3377 -21.8635 81.9835];
plane = [0.1385 0.0645 0.9883];
a = plane(1);
b = plane(2);
c = plane(3);
d = dot(plane,P);
figure
plot3(P(:,1),P(:,2),P(:,3),'k.','Markersize',20);
hold on
% plot3(NODES(:,1),NODES(:,2),NODES(:,3),'b.','Markersize',3)
trimesh(FACES(:,:),NODES(:,1),NODES(:,2),NODES(:,3),'EdgeColor','k','Linewidth',0.1,'Facecolor','b','FaceAlpha',.4)
f_1 = fimplicit3(@(x,y,z) a*x+b*y+z*c-d);
hold off
axis equal
zlim([70 90])
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposta accettata

Bruno Luong il 26 Set 2023
Modificato: Bruno Luong il 26 Set 2023
##### 4 CommentiMostra 2 commenti meno recentiNascondi 2 commenti meno recenti
Alberto Acri il 26 Set 2023
Yes, using the code that Matt J provided me I created a mesh of the circle (the circle is also fine as geometry).
To use the code in the link I would need the nodes and faces of the circle. I have the nodes (the V matrix). How can I recover the faces?
V=num2cell(V,1);
[x,y,z]=deal(V{:});
trisurf(delaunay(x,y), x,y,z)
Bruno Luong il 26 Set 2023
The face is
delaunay(x,y)

Accedi per commentare.

### Categorie

Scopri di più su Surface and Mesh Plots in Help Center e File Exchange

R2021b

### Community Treasure Hunt

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

Start Hunting!

Translated by