Halcom 发表于 2017-4-20 23:16:22

MATLAB点云处理--三维曲面构建

function ysw
clc;clear all;close all
x=[0.4,0.4,0.4,0.4,0.4,...
    0.5,0.5,0.5,0.5,0.5,...
    0.6,0.6,0.6,0.6,0.6];
y=[0.15,0.2,0.28,0.35,0.4,...
    0.15,0.2,0.28,0.35,0.4,...
    0.15,0.2,0.28,0.35,0.4,];
z1=[566,566,566,907,1351,...
    472,472,472,907,1351,...
    377,377,377,907,1351];
z2=[810,810,810,2000,3000,...
    675,675,675,2000,3000,...
    540,540,540,2000,3000];
sf1=fit(,z1','poly23');
sf2=fit(,z2','poly23');

xx = min(x):0.01:max(x);
yy = min(y):0.01:max(y);
= meshgrid(xx,yy);
zz1 = sf1(xx,yy);
zz2 = sf2(xx,yy);
% figure(1),hold on;
% plot3(xx,yy,zz1,'ro');
% plot3(xx,yy,zz2,'go');
% hold off

p(:,1) = /2;
p(:,2) = /2;
p(:,3) = /5000000;
=MyCrust(p);
% plot3(p(:,1),p(:,2),p(:,3),'g.')
%% plot of the oyput triangulation
figure(2)
hold on
% axis equal
% trisurf(t,p(:,1),p(:,2),p(:,3),'facecolor','c','edgecolor','b')%plot della superficie trattata
trisurf(t,p(:,1)*2,p(:,2)*2,p(:,3)*5000000,'edgecolor','b')
view(-37.5,30);
% axis tight;
具体的代码下载链接:**** Hidden Message *****





z863338313 发表于 2017-9-11 17:11:36

谢谢楼主,学习学习,看看哪个对我有用

舞动青春911 发表于 2019-4-11 22:00:26

谢谢楼主分享,正在学习中
页: [1]
查看完整版本: MATLAB点云处理--三维曲面构建