如何用matlab画一个可透视的椭球

 我来答
周永红_ZYH
2011-11-18 · TA获得超过2912个赞
知道大有可为答主
回答量:1455
采纳率:90%
帮助的人:691万
展开全部
figurea = 15;b = 10;c = 5;k = 5;n = 2^k-1;theta = pi*(-n:2:n)/n;phi = (pi/2)*(-n:2:n)'/n;X = a*cos(phi)*cos(theta);Y = b*cos(phi)*sin(theta);Z = c*sin(phi)*ones(size(theta));surf(X,Y,Z,'FaceColor','interp',... 'EdgeColor','none',... 'FaceLighting','phong')axis tightcamlight leftalpha(.33) % 产生透视仔握效果这念碧庆是在7.1.上画的慧睁图:



参考资料: http://hi.baidu.com/zzz700/blog/item/d403a3888c92c30eb21bba6c.html

shine戚七七
推荐于2016-04-04 · TA获得超过4.7万个赞
知道大有可为答主
回答量:2万
采纳率:75%
帮助的人:2674万
展开全部
Syntax
[x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr,n)
[x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr)
ellipsoid(axes_handle,...)
ellipsoid(...)

Description
[x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr,n) generates a surface mesh described by three n+1-by-n+1 matrices, enabling surf(x,y,z) to plot an ellipsoid with center(xc,yc,zc) and semi-axis lengths (xr,yr,zr).
[x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr) uses n = 20.
ellipsoid(axes_handle,...) plots into the axes with handle axes_handle instead of the current axes (gca).
ellipsoid(...) with no output arguments plots the ellipsoid as a surface.
Algorithms
ellipsoid generates the data using the following equation:

Note that ellipsoid(0,0,0, .5,.5,.5) is equivalent to a unit sphere.
Examples
Generate ellipsoid with size and proportions of a standard U.S. football:
[x, y, z] = ellipsoid(0,0,0,5.9,3.25,3.25,30); surfl(x, y, z) colormap copper axis equal
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式