cylnder surface

2 vues (au cours des 30 derniers jours)
tomas
tomas le 26 Août 2011
Hello everybody, I need a help with drawing a cylinder surface. The cylinder fuction ([X,Y,Z] = cylinder) generates coordinates of surface vertices and after using surf, matlab draws a cylinder surface. My problem is that drawn plot doesn't have bases. I need to project some properties, which are expressed by color scale, of cylindrical samples in different directions, so by this way I'm not able to draw vertical directions that project to the bases of the cylinder. Can anybody help with this?
Thanks a lot,
Tom
  2 commentaires
Jan
Jan le 26 Août 2011
Please post more details. What is a "base of a drawn plot"? What is "color scale" and how can it express the "projection of a property"? What ar "cylindrical samples" ind "different directions"? And how can you "draw vertical directions"? You see, I did not understand anything. But I assunme you want to draw simple 3D objects.
tomas
tomas le 27 Août 2011
OK, I try to explain better. Function cylinder makes cylinder surface without top and bottom (that I called bases), so you can see through the cylinder. I need to make a cylindrical surface, with top and bottom, on which I can express some physical properties (e.g. velocity) that are different in different directions. So it's should be something like spherical projection, but on cylinder. May be I just need a simple 3D object, but I don't know how to make it and how to control a color appereance. Let's say in one direction there is a slow velocity, so I express it by blue color and in other direction is fast velocity expressed by red color. Thus different velocity in different directions mean different color. I thing the best would be make somethig like a grid of points on a cylindrical surface. I read the matlab help and may be the way could be to do it by Multifaceted Patches, somehow get a surface coordinates and make polygons. I hope you get it now.

Connectez-vous pour commenter.

Réponses (2)

bym
bym le 26 Août 2011
how about:
doc fill3 % ?

Lucas García
Lucas García le 26 Août 2011
Here is one alternative version of cylinder.m that can be closed, rotated, etc.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by