Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
高级会员
注册日期: 2019-11-21
帖子: 3,006
声望力: 66 ![]() |
![]()
我需要绘制一个圆顶或半球形,并能够更改圆顶的尺寸。我认为MATLAB是我的最佳选择。
有什么建议么? 谢谢 回答: SPHERE函数生成球面的x,y和z坐标。您只需要删除与球体底部相对应的点即可制成圆顶。例如: [x,y,z] = sphere; %# Makes a 21-by-21 point sphere x = x(11:end,:); %# Keep top 11 x points y = y(11:end,:); %# Keep top 11 y points z = z(11:end,:); %# Keep top 11 z points r = 3; %# A radius value surf(r.*x,r.*y,r.*z); %# Plot the surface axis equal; %# Make the scaling on the x, y, and z axes equal 更多&回答... |
![]() |
![]() |