| Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) | 
|  | 
|  2007-12-13, 10:38 | #1 | 
| 初级会员 注册日期: 2007-12-13 
					帖子: 1
				声望力: 0  |  【求助】请问如何让这个球转动? 
			
			clear,clc r=5; [x,y]=meshgrid(-r-r/100:r/115:r+r/100); z=(sqrt(r^2-x.^2-y.^2)); n=size(z); for i=1:n for j=1:n if ~isreal(z(i,j)) & imag(z(i,j))>.75 z(i,j)=nan; z1(i,j)=nan; else z(i,j)=real(z(i,j)); z1(i,j)=-real(z(i,j)); end end end mesh(x,y,z) hold on %surf(x,y,z) mesh(x,y,z1) %surf(x,y,z1) axis tight shading interp alpha(.9) 转载自 作者:cxf208 | 
|   |   | 
|  2007-12-20, 21:48 | #2 | 
| 普通会员 注册日期: 2007-12-02 年龄: 44 
					帖子: 74
				声望力: 19  |   
			
			利用camorbit函数
		 | 
|   |   |