![]() |
有谁知道如何在MATLAB ...或任何其他编程语言中绘制圆顶(又称半球形)?
我需要绘制一个圆顶或半球形,并能够更改圆顶的尺寸。我认为MATLAB是我的最佳选择。
有什么建议么? 谢谢 [B]回答:[/B] [URL="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/sphere.html"]SPHERE[/URL]函数生成球面的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 [url=https://stackoverflow.com/questions/3603178]更多&回答...[/url] |
所有时间均为北京时间。现在的时间是 23:35。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.