Surface to Patch Problem?

4 vues (au cours des 30 derniers jours)
Conor O'Keeffe
Conor O'Keeffe le 3 Nov 2020
Hi All
I've plotted these elipses (left) in matlab with matrices X, Y and Z.
I'm now trying to connect these to form a cylinder with the patch and surf2patch functions.
As you can see(right), not woeking as youd expect. Has anyone had this problem before or know how to get around it.
This is the code to plot (right)
X = [flipud(x_All)];
Y = [flipud(y_All)];
Z = [flipud(z_All)];
figure
patch(surf2patch(X,Y,Z,Z));
shading faceted;
view(3)
  1 commentaire
Tarunbir Gambhir
Tarunbir Gambhir le 2 Déc 2020
Based on the images, it seems that the corresponding indices for each ellipse are not in proper order. To get the desired result, the points on the ellipse should be ordered such that they are alligned vertically. Lines in the right figure show that indices of points on each ellipse are not alligned properly which creates twisted cylinder surfaces.
If the above does not help in the explanation and resolution of your problem, could you please provide the complete code with data so that we can replicate the issue.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by