Project 3D points to a surface
古いコメントを表示

I have fit a surface through a set of x,y,z points. Image attached. I would like to be able to project points that lie within some distance threshold to that surface. Could anyone advise on a method for doing this?
2 件のコメント
Sean de Wolski
2017 年 4 月 28 日
Is it the shortest euclidean distance to the surface of the distance to the surface at x, y for a specific point?
psprinks
2017 年 4 月 30 日
採用された回答
その他の回答 (1 件)
Joseph Cheng
2017 年 4 月 28 日
you could try something like this. my curve and fit method is probably different however what you can do is use find() to determine which ones are within some distance/error from the fitted curve for that point.
close all;
load franke
f = fit( [x, y], z, 'poly23' )
plot(f, [x,y], z)
withintol = find(f(x,y)-z<0.01);
hold on
ax=gca;
plot3(x(withintol),y(withintol),ax.ZLim(1)*ones(size(withintol)),'.')
2 件のコメント
psprinks
2017 年 4 月 28 日
Joseph Cheng
2017 年 4 月 28 日
Oh, i was just too lazy to generate a dummy curve and points to franke was just quickly available. now that i think about it just in the Z direction may not be proper thresholding if we're considering xyz jittering points. hmmm....
カテゴリ
ヘルプ センター および File Exchange で Spline Postprocessing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



