Make grid from patch object
古いコメントを表示
Hi
I am trying to make a function for splitting a patch object into N equally sized indexed rectangles (like a grid). The intended use is that the patch object contains the (x,y) values for a floor in a room, and I want to split the room into N number of rectangles which later will be used to make a "Region of Interest" in an optimization problem.
Any help would be highly appreciated.
12 件のコメント
Rik
2018 年 1 月 25 日
Walter Roberson
2018 年 1 月 25 日
So for example it needs to be able to divide up a room that looks like this:
-----
| |
________| |
| |
| ___|
| |
|________|
into
-----
| |
________| |
| + + |
| + +___|
| + |
|___+____|
for N = 3, declare failure for N = 4 or N =5, for N = 6 it could subdivide those horizontally or could instead divide into 2 x 2 squares? And for higher numbers with more irregular walls it might have to "jig-saw", using a mix of horizontal and vertical orientations to fit all of the edge conditions?
proczell
2018 年 1 月 25 日
Walter Roberson
2018 年 1 月 25 日
In order to be able to divide an area into rectangles that are not infinitely small, all internal angles must be multiples of 90 degrees -- unless, that is, it is permitted to have space left over, in which case ideally you would prefer to minimize the space left over.
proczell
2018 年 1 月 26 日
proczell
2018 年 1 月 26 日
Walter Roberson
2018 年 1 月 26 日
MATLAB itself does not have such a function.
I do not find such a function for MATLAB when I google, but perhaps different keywords would make a difference.
proczell
2018 年 1 月 26 日
Walter Roberson
2018 年 1 月 26 日
With calls to arcgis: https://gis.stackexchange.com/questions/115351/automate-splitting-polygons-into-sections
proczell
2018 年 1 月 26 日
proczell
2018 年 1 月 26 日
proczell
2018 年 1 月 27 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Polygons についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!