3D 极坐标图中的 2D 绘图 [英] 2D plot in 3D polar graph

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

问题描述

我想绘制一个 3D 图形,y=100-x^2,绕 Y 轴 360 度循环.最终变成一个圆锥体.那可能吗?我有一个数组 x=1:1:100 和一个数组 y,大小(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 数组,z=1:1:100 作为锥体底部的第三个轴.使用 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)

来源:通过曲线旋转生成 3D 绘图

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

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