フィルターのクリア

Random generation of coordinate points that lie outside of defined surfaces.

2 ビュー (過去 30 日間)
nanmi51
nanmi51 2018 年 2 月 19 日
コメント済み: Rena Berman 2018 年 5 月 15 日
I have a question regarding the generation on random xy coordinates in an already defined area. Now the area is comprised of many little sub-areas representing aggregates in the material's micro-structure. I want the randomaly generated coordinates (i.e. centroids of the air voids) to lie outside those sub-areas. The program I have so far can plot the xy coordinates of all of the nodes making up the lines which connect to establish the sub-areas. Any help would be much appreciated. Thanks.

回答 (1 件)

Image Analyst
Image Analyst 2018 年 2 月 20 日
Can you use poly2mask() to make those sub areas into a digital image? If so, then you can use randperm() and the mask to place a specified number of points into the mask regions. If that sounds good, then try it or else if you can't figure it out, give us the points for all the regions (either via source code to generate them, or via an attached .mat file) and we'll do it for you.
  2 件のコメント
Image Analyst
Image Analyst 2018 年 2 月 20 日
Can you upload a screenshot, like a PNG file? I'll check back later today - I have to leave for somewhere now.
Image Analyst
Image Analyst 2018 年 2 月 20 日
I see. I have to go to another meeting now, but could you post the code to read in the file and create the figure? This would make it quicker and easier for me if you did it for me rather than me having to create that code. I'll look for it. later today.

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

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by