Surface to Patch Problem?

6 visualizaciones (últimos 30 días)
Conor O'Keeffe
Conor O'Keeffe el 3 de Nov. de 2020
Comentada: Tarunbir Gambhir el 2 de Dic. de 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 comentario
Tarunbir Gambhir
Tarunbir Gambhir el 2 de Dic. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by