MATLAB 画球面

 画球面曲线

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

你可能感兴趣的:(MATLAB 画球面)