matlab implicitmesh,用matlab 画(x^2 + (9/4)y^2 + z^21)^3, matlab绘制x^2/4+y^2/9+z^2/16=1三

导航:网站首页 >

用matlab 画(x^2 + (9/4)y^2 + z^21)^3, matlab绘制x^2/4+y^2/9+z^2/16=1三

用matlab 画(x^2 + (9/4)y^2 + z^21)^3x^2z^3(9/80)y^2z^3 = 0的图... , matlab绘制x^2/4+y^2/9+z^2/16=1三维立体图

匿名网友:

x,y,z=meshgrid(linspace(-1.5,1.5)); f=@(x,y,z)(x.^2 + (9/4)*y.^2 + z.^2 - 1).^3 - x.^2.*z.^3 - (9/80)*y.^2.*z.^3; p=patch(isosurface(x,y,z,f(x,y,z),0)); view(3);axis equal set(p,'FaceVertexCData',jet(size(get(p,'faces'),1)) ,'FaceColor', 'flat', 'EdgeColor', 'none');

匿名网友:

f=@(x,y,z)(x.^2+9/4*y.^2+z.^2-1).^3-x.^2.*z.^3-9/80*y.^2.*z.^3implicitmesh(f,-5 5,150)-----------------------------function h=implicitmesh(f,xlimit,ylimit,zlimit,gd)%implicitmesh(f,span,gd):画隐函数曲面f(x,y,z)=0的网格图,% 各坐标范围均限定在span=lb,ub,% 网格数为gd,默认为25if nargin==2ylimit=xlimit;zlimit=xlimit;gd=25;elseif nargin==3gd=ylimit;ylimit=xlimit;zlimit=xlimit;elseif nargin==4gd=25;elseif nargin==5elseerror('Error in input arguments')endx=linspace(xlimit(1),xlimit(2),gd);y=linspace(ylimit(1),ylimit(2),gd);z=linspace(zlimit(1),zlimit(2),gd);x,y,z=meshgrid(x,y,z);val=f(x,y,z);f,v=isosurface(x,y,z,val,0);if isempty(f)warning('There is no graph in the range.');p=;elsenewplot;p=patch('Faces',f,'Vertices',v,'CData',v(:,3),'facecolor','w','EdgeColor','flat');isonormals(x,y,z,val,p);view(3);grid onendif nargout==0elseh=p;end

匿名网友:

I did this before, so just give you the codes I wrote:%%This file creates a 3-d red heart with an equationx,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 ondaspect(1 1 1)view(3)camlight('right')camlight('left')camlight('headlight')lighting phongxlabel('X')ylabel('Y')zlabel('Z')title('Heart of Math')

匿名网友:

x,y,z=meshgrid(linspace(-1.5,1.5,50));isosurface(x,y,z,(x.^2 + (9/4)*y.^2 + z.^2 - 1).^3 - x.^2.*z.^3 - (9/80)*y.^2.*z.^3,0)axis equal 参考网站:http://hi.Hahawen.com/greatdju/blog/item/f0272751e834ca2943a75b20.htmlhttp://uestion/190667683.html http://uestion/86578766...

匿名网友:

给你图片吧,纯代码常常会被百度认为不符合要求,你自己打这个方程应该是单叶双曲面吧

匿名网友:

不知你是光要画图呢?还是要进行计算。

他们的交线就是位于z=2的平面上半径为2的一个圆,给你花了一个,你看看吧:clear all;clc;zz=@(x,y)(x.^2+y.^2)/2;ezsurf(zz,-3,3,-3,3);hold on;x0,y0,z0=sphere(60);r=2*sqrt(2);X=r*x0;Y=r*y0;Z=r*z0;surf(X,Y,Z);axis(-5,5,-5,5,-5,5);axis equal;hidden off;%-----------------------------------------t=0:pi/100:2*pi;rr=2;x=rr*cos(t);y=rr*sin(t);z=2*ones(1,length(t));plot3(x,y,z,'r','linewidth',10);grid on;

问题推荐

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值