How to generate a random shape convex polygon with the same area?

Hi, I want to generate a number of random shape convex polygons. They must have the same value of area. It dosen't matter how much vertex it has.
I know how to generate a bunch of random shape convex polygons, but if I additionally want them to have the same value of area, it is difficult for me.
Thanks,

댓글 수: 2

The same as what? What other area should the polygon's area match? Why not just create one, then scale it to force it to have the area you want?
Thanks for your reply. I mean all random convex polygon need to have the same area. I think the scale method might be a good one. Could you please be more specific?

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

 채택된 답변

Image Analyst
Image Analyst 2013년 10월 18일

0 개 추천

Make a random polygon and use polyarea() to find it's area. Then calculate the centroid and then change the distance from the centroid to the vertices by the proper amount so that the area is what is desired. I think if the radius changes by a factor F then the area will change by F^2. Try that and see how it goes.

댓글 수: 2

thank you very much! But I still have some question about the convex polygon generation. Is there some available functions in matlab to generate convex polygon?
You can use the rand() function to generate random coordinates.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Computational Geometry에 대해 자세히 알아보기

질문:

2013년 10월 18일

댓글:

2013년 10월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by