Check points inside n number of triangle in a square

조회 수: 1 (최근 30일)
Boni_Pl
Boni_Pl 2019년 7월 17일
답변: Bruno Luong 2019년 7월 17일
Hello
In a square geometry n number of triangles and coordinates of each vertices are given.If N no. of points are in the medium then how to write for loop to check how many points are inside each of the triangle. Please help.
  댓글 수: 1
infinity
infinity 2019년 7월 17일
Hello,
I can give you an simplest idea to do this
1. write a function to check wheather a point is inside or not a triagle.
2. Use for loop for each point in N points and for loop for each triangle in n triangles. Then, count how many triangles containt this point.

댓글을 달려면 로그인하십시오.

채택된 답변

Bruno Luong
Bruno Luong 2019년 7월 17일
see pointLocation method of Triangulation class

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by