Effacer les filtres
Effacer les filtres

Create cylinder roll based on height data

2 vues (au cours des 30 derniers jours)
Konvictus177
Konvictus177 le 26 Août 2021
Commenté : Nabeel Ahmad le 30 Mai 2024
Hi,
I have a large matrix Z (9500x5766) containing the height information of a cylinder that I can use to plot a surface map. Y-coordinate being the circumference of the clyinder, X-coordinate being the length.
How can I use this height information to plot a 3D-Model of that cylinder?
Thanks.

Réponse acceptée

Wan Ji
Wan Ji le 26 Août 2021
You need map the length and the circumference to your true cylinder.
cylinder_true_length = 20;
cylinder_true_radius = 5;
len_div = linspace(0, cylinder_true_length, 9500);
circum_theta = linspace(0, 2*pi, 5766+1);
[T, L] = meshgrid(circum_theta, len_div);
X = cylinder_true_radius*cos(T);
Y = cylinder_true_radius*sin(T);
Zval = zeros(size(T));
Zval(1:end,1:end-1) = Z;
Zval(:,end) = Z(:,1);
mesh(X,Y,L,Zval,'facecolor','interp')
colormap(jet)
  1 commentaire
Nabeel Ahmad
Nabeel Ahmad le 30 Mai 2024
What does cylinder_true_length means? Is it the height of cylinder?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Distribution Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by