Coding Problem with growing circles

조회 수: 4 (최근 30일)
Zeeshan Chaudhry
Zeeshan Chaudhry 2021년 5월 28일
답변: Walter Roberson 2021년 5월 28일
Hello,
I'm trying to code a scenario that goes something like this:
The centers of a bunch of circles is randomly initialized. The rate at which the radii of each circle is also randomly initialized. And then I wish to account for the following situations:
1) In one scenario, the circles are allowed to grow until they touch another circle.
2) In another scenario, the circles are allowed to grow until they reach a certain percent overlap with any other circle; or in other words they are allowed to share a common area with other circles up to a certain percentage of their own area, which is user-defined.
Initializing the positions and growing the circles is ok, but how to stop growing them is what I have issues with. Any help would be greatly appreciated.

답변 (1개)

Walter Roberson
Walter Roberson 2021년 5월 28일
https://mathworld.wolfram.com/Circle-CircleIntersection.html shows the calculation for overlap area step by step.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by