如何利用matlab绘制球体?
1个回答
展开全部
function qium
n = 5000;
X = 2*rand(n,3)-1;
v = sum(X.^2,2);
delta = 0.05;
d = -1:delta:1;
[x0,y0,z0] = meshgrid(d,d,d);
X0 = [x0(:), y0(:), z0(:)];
v0 = griddatan(X,v,X0);
v0 = reshape(v0, size(x0));
p = patch(isosurface(x0,y0,z0,v0,0.6));
isonormals(x0,y0,z0,v0,p);
set(p,'FaceColor','red','EdgeColor','none');
view(3);
camlight;
lighting phong
axis equal
title('Interpolated sphere from scattered data')
按上面语句保存后试试
n = 5000;
X = 2*rand(n,3)-1;
v = sum(X.^2,2);
delta = 0.05;
d = -1:delta:1;
[x0,y0,z0] = meshgrid(d,d,d);
X0 = [x0(:), y0(:), z0(:)];
v0 = griddatan(X,v,X0);
v0 = reshape(v0, size(x0));
p = patch(isosurface(x0,y0,z0,v0,0.6));
isonormals(x0,y0,z0,v0,p);
set(p,'FaceColor','red','EdgeColor','none');
view(3);
camlight;
lighting phong
axis equal
title('Interpolated sphere from scattered data')
按上面语句保存后试试
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
深圳量子动力
2024-10-21 广告
2024-10-21 广告
双目摄像头可找深圳量子动力双目摄像系统可通过无线方式进行面部捕捉,可以满足在家、工作室、直播间、专业动捕棚等多种场景的不同使用人群。支持Metahuman Animator解算,支持升级animator高精度表情方案...
点击进入详情页
本回答由深圳量子动力提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询