代码如下

>> [x,y,z]=meshgrid(linspace(-3,3,120)); 

f=(x.^2+(9*y.^2)./4+z.^2-1).^3-((9*y.^2).*(z.^3))./80-(x.^2).*(z.^3); 
p=patch(isosurface(x,y,z,f,0)); 
set(p,'FaceColor','r') 
grid on 
daspect([1 1 1]) 
view(3) 
camlight('right') 
camlight('left') 
camlight('headlight') 
lighting phong 
xlabel('X') 
ylabel('Y') 
zlabel('Z') 
title('3D Heart')

图像如下

MATLAB画心形立体图

相关文章:

  • 2022-01-08
  • 2021-12-25
  • 2021-12-21
  • 2021-12-18
  • 2021-12-18
  • 2021-12-03
猜你喜欢
  • 2021-11-21
  • 2022-12-23
  • 2021-12-03
  • 2021-06-23
  • 2021-12-18
  • 2021-05-04
相关资源
相似解决方案