How to use Monte Carlo simulation to calculate the area of polygon?

3 ビュー (過去 30 日間)
aposta95
aposta95 2022 年 5 月 14 日
編集済み: aposta95 2022 年 5 月 15 日
Hi, I want to use Monte Carlo simulation to calculate the area of polygon.
The polygon area is defined with longitude and latitude. (in degrees)
I've found the bounding box of the polygon, but I have no idea how to apply Monte Carlo to randomly create dots and caculate the area.
Can anyone help calculating the area of this polygon using Monte Carlo simulation?

回答 (1 件)

Torsten
Torsten 2022 年 5 月 14 日
Randomly create points inside the bounding box.
Decide which of the points are inside (P_i) and which of the points are outside (P_a) the polygon.
If the area of the bounding box is A, an approximation for the area A_p of the polygon is
A_p = A*#P_i/(#P_i + #P_a)

カテゴリ

Help Center および File ExchangeElementary Polygons についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by