clc; const=0; x=-5:0.05:5;y=-5:0.05:5;z=-5:0.05:5; [x,y,z]=meshgrid(x,y,z); f=(x.^2 + (9/4)*y.^2 + z.^2 - 1).^3 - x.^2.*z.^3 - (9/80)*y.^2.*z.^3-const; p=patch(isosurface(x,y,z,f,0)); set(p, 'FaceColor', 'red', 'EdgeColor', 'none'); daspect([1 1 1]) view(3) camlight; lighting phong 三维 t=linspace(0,2*pi,501); t=linspace(0.5*pi,1.5*pi,500); plot(t.*cos(t),t.*sin(t),'rp'); hold plot(-t.*cos(t),t.*sin(t),'ro'); axis equal 二维 本文来源:https://www.wddqw.com/doc/11cca73caf1ffc4fff47ac49.html