How can i use inpolygon on my surface with the area

1 回表示 (過去 30 日間)
Jan  Nabo
Jan Nabo 2019 年 8 月 29 日
コメント済み: Jan Nabo 2019 年 8 月 29 日
If the points inside the surface it will be true and if it is outside it will be false.
So i want to paint them in blue and red, but i watched the inpolygon function in the description and i can't do the same thing on my surface.
The problem is that i create random points and they are located in x = [0,1] and y [0,2]. How can i adapt my points that are outside or inside my surface with the area from the body.
Unbenannt.jpg

採用された回答

Jan  Nabo
Jan Nabo 2019 年 8 月 29 日
I tried a little bit and now i have just the points on my surface but i want the points inside with red + and outside the surface with blue points
Unbenannt.jpg
  1 件のコメント
Jan  Nabo
Jan Nabo 2019 年 8 月 29 日
i found out:
xx= -40:.5:10;
yy=35:.5:65;
[X,Y]= meshgrid(xx,yy)
in = inpolygon(X,Y,x,y);
imshow(in);
inM= nan(size(in),20;
inM=nan(61,101,20);
black is outside and white is inside.
now i have to add more layers and try to scale those pictures for my project.
Unbenannt.jpg

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeComputational Geometry についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by