画曲面---把曲面方程参数化a1=linspace(0,2*pi,30);b1=linspace(0,pi,30);[a,b]=meshgrid(a1,b1);x=6*cos(a).*sin(b);y=3*sin(a).*sin(b);z=2*cos(b);surf(x,y,z)画投影---置投影面法向坐标为0,以画yoz面投影为例figure(2)xx=zeros(size(x));mesh(xx,y,z)