[email protected](x,y,z)x.^2.*z.^3+9*y.^2.*z.^3/80-(x.^2+9*y.^2/4+z.^2-1).^3; %心形曲线函数 [x,y,z]=meshgrid(-1.5:0.1:1.5); v=f(x,y,z); h=patch(isosurface(x,y,z,v,0)); isonormals(x,y,z,v,h); set(h,‘FaceColor‘,‘r‘,‘EdgeColor‘,‘none‘); title(‘I Love you baby‘); alpha(0.6); grid off; axis([-1.5 1.5 -1.5 1.5 -1.5 1.5]); lighting Gouraud; h=camlight(‘left‘); for i=1:360 camorbit(1,0); camlight(h,‘left‘); drawnow end
时间: 2024-10-25 18:31:58