回 帖 发 新 帖 刷新版面

主题:MATLAB 圆 球面

关于二维和三维曲面画图,可能我近日总结的一个小程序对大家有些帮助,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%                cirque   sphere 
%                             Made by Lee Guangcheng
%                              2009-06-11
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clc
clear all;
%%%%%%%%%%%%%%%% cirque %%%%%%%%%%%%%%%%%%%%%%%%%%%%
% x=r*sin(theta)
% y=r*cos(theta)
figure(1)
ezplot('4*sin(theta)','4*cos(theta)',[0,2*pi])
%%%%%%%%%%%%%%%  sphere  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% x=r*sin(fai)*cos(theta)
% y=r*sin(fai)*sin(theta)
% z=r*cos(fai)
figure(2)
ezsurf('4*sin(fai)*cos(theta)','4*sin(fai)*sin(theta)','4*cos(fai)',[0,pi,0,2*pi])
axis equal

回复列表 (共1个回复)

沙发

不错,thanks

我来回复

您尚未登录,请登录后再回复。点此登录或注册