Sorting points in interval

I have matrix with xyz coordinate.(~20 points)
Else, i have matrix with the coordinates of the points that are the vertices of a plane.
How to choose the points inside of this plane ?
inpolygon function work only at 2D , but i have 3D plane.

1 件のコメント

dpb
dpb 2014 年 12 月 5 日
Do axis rotation to place plane in 2D???

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2014 年 12 月 5 日
編集済み: Image Analyst 2014 年 12 月 5 日

0 投票

Chances are if they're floating point values they won't lie exactly on the plane to the nearest 15 decimal places, so you'll have to check if it's within some tolerance distance of the plane. Can't you just stick the (x,y,z) coordinate values into the equation of your plane and see if the residual is within your tolerance, like
residualDistance = a * x + b * y + c * z + d; % will = 0 if exactly on the plane.
if abs(residualDistance) <= yourToleranceValue
% It's "on" the plane
else
% It's far away from your plane.
end
If my math is wrong, someone please correct it.

カテゴリ

ヘルプ センター および File ExchangeShifting and Sorting Matrices についてさらに検索

質問済み:

2014 年 12 月 5 日

編集済み:

2014 年 12 月 5 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by