简体   繁体   中英

Plotting 3D truncated cone in matlab

如何使用Matlab绘制圆锥台形状的3D节点,我想将每两个节点与线连接在一起。

Here is a truncated cone (based on http://msemac.redwoods.edu/~darnold/math50c/matlab/coordcyl/index.xhtml ). I'm not sure if this is the type of mesh you are looking for.

r=linspace(1,2,25);
theta = linspace(0,2*pi,25);
[r,theta] = meshgrid(r,theta);
x = r.*cos(theta);
y = r.*sin(theta);
z = -r;
mesh(x,y,z)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM