Position of points relative to a plane

19 ビュー (過去 30 日間)
Harold
Harold 2013 年 5 月 16 日
コメント済み: Diego Hens 2020 年 8 月 21 日
I'm looking for a way to decide whether a point is on, to the left, or to the right of a plane. I have it to work for a selected point. For example, given a number of (x,y,z) coordinates, I'm able to determine what points are on, or across the a line drawn from a point say x = 3. The code I developed works perfect. However, I want to expand on this so that any plane can be used not just the yz plane (x = 3). I want to do a batch check on all the points in a variable called vertices. There will always be three point coordinates in this variable.

採用された回答

Yao Li
Yao Li 2013 年 5 月 16 日
  1. Obtain the equation of the plane
  2. If the point (x,y,z) satisfy the equation, the point is on the plane. I don't think you can use the word 'left' and 'right' to describe the position before you have specified the reference axis.
  2 件のコメント
Harold
Harold 2013 年 5 月 16 日
Here is what I'm working on. I'm trying to find a simpler solution. I have a collection of points in a matrix called vertices. Each row of this matrix describes a facet (triangle) in 3 dimensional space. What I need to do is find the intersection points that this facet makes with a cutting plane. I know I can use what you just posted. Basically convert the facet into a plane. Then intersect this plane with any plane of my choosing. I'm just not sure how to go about describing this slicing plane.
Diego Hens
Diego Hens 2020 年 8 月 21 日
Did you find a solution to this? I have the same problem. I want to erase all points under a plane from an stl

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

その他の回答 (1 件)

Jan
Jan 2013 年 5 月 16 日
If the plane is defined by one point P and the normal vector N, is is easy to decide on which side (defined by the orientation of N) the point Q is: check the sign of:
v = dot(Q - P, N);

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by