clear all;clc;
f=@(x,y,z)(x.^2+y.^2+z.^2).^3-27*x.*y.*z;
[x,y,z]=meshgrid(-3:0.1:3);
v=f(x,y,z);
[d,m]=isosurface(x,y,z,v,0);
patch('faces',d,'vertices',m,'facevertexcData',hot(length(m)),'facecolor','b','edgecolor','flat');
view(3);axis equal;grid on;