cylnder surface

2 次查看(过去 30 天)
tomas
tomas 2011-8-26
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 个评论
Jan
Jan 2011-8-26
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 2011-8-27
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.

请先登录,再进行评论。

回答(2 个)

bym
bym 2011-8-26
how about:
doc fill3 % ?

Lucas García
Lucas García 2011-8-26
Here is one alternative version of cylinder.m that can be closed, rotated, etc.

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by