Which Area is in right/left side of the other

2 ビュー (過去 30 日間)
Armin Mashhadi
Armin Mashhadi 2019 年 9 月 17 日
コメント済み: darova 2019 年 9 月 18 日
Hi,
I'm working on a optimisation project. I had a Boundry line that devided the space in several closed-areas.
There is a principale in my work, which says While your moving toward the line, Your righ-side area has 2 more (let say) scores than the left one.
(For example: 1 has two more scores than 6 or 7 has two more scores than 1) and at last, the Area with most scores is the winner.
I have all the points on the lines, and devided them to close-areas using "polyshape" Command, then i got coordinates of evey verteces (by polyshape).
now i don't know how to figure out which is right of which. Do you have any idea about this?
  1 件のコメント
Steven Lord
Steven Lord 2019 年 9 月 18 日
In your diagram above, would 6 have two more scores than 2 or would 2 have two more scores than 6? It is possible to travel right from either to reach the other since region 6 is concave.

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

採用された回答

darova
darova 2019 年 9 月 18 日
If you are moving along the line you can get direction vector
Then to pick any point left to line:
Any point right to line:
  2 件のコメント
Armin Mashhadi
Armin Mashhadi 2019 年 9 月 18 日
Thanks a lot, That worked for me
darova
darova 2019 年 9 月 18 日
Glad to help

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeElementary Polygons についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by