Skip to content

Instantly share code, notes, and snippets.

@AnimeshShaw
Created December 27, 2013 19:29
Show Gist options
  • Select an option

  • Save AnimeshShaw/8151498 to your computer and use it in GitHub Desktop.

Select an option

Save AnimeshShaw/8151498 to your computer and use it in GitHub Desktop.
clc
clear all
[x, y, z] = meshgrid(-10:0.05:10,-10:0.05:10,-10:0.05:10);
r = power((power(x,2) + ((9/4).*power(y,2)) + power(z,2) - 1),3) - (power(x,2).*power(z,3)) - ((9/80).*(power(y,2).*power(z,3)));
p = patch(isosurface(x,y,z,r,0));
set(p,'facecolor','red','EdgeColor','none');
daspect([1,1,1]);
view(3);
axis off;
camlight('right')
lighting phong;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment