2D情节的3D极线图 [英] 2D plot in 3D polar graph

查看:180
本文介绍了2D情节的3D极线图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想绘制绕Y轴的三维图,Y = 100-X ^ 2,周期在360度。最后变得像一个圆锥体。那可能吗?我有一个数组 X = 1:1:100 ,和一个数组,尺寸(1 100)。

I would like to plot a 3D graph, y=100-x^2, cycle around the Y axis in 360 degrees. Eventually to become like a cone. Is that possible? I have an array x=1:1:100, and an array y, size(1 100).

我尝试过的ž阵列, Z = 1:1:100 因为这是第3轴的锥的基地。随着plot3我做Y = 100-X ^ 2的一个图。我想有点动画,并有最终锥形,或面锥体。

I tried an Z array, z=1:1:100 as the 3th axis in the base of the cone. With plot3 I done the one graph of y=100-x^2. I would like to kinda animate it and have eventually a cone, or a surface cone.

推荐答案

这是你正在寻找什么?

r = 1:1:100;
y = 100-r.^2;
theta = 0:pi/20:2*pi;
xx = bsxfun(@times,r',cos(theta));
zz = bsxfun(@times,r',sin(theta));
yy = repmat(y',1,length(theta));
surf(xx,yy,zz)

来源:<一href="http://stackoverflow.com/questions/5208447/generating-a-3d-plot-by-revolution-of-a-curve">Generating 3D绘图用曲线革命

这篇关于2D情节的3D极线图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆