when you have a region of 2 circles that partially overlap, and then you spawn an event at a "random point within that region," will the overlapped area be twice as likely to spawn the unit as the un-overlapped area? I've done some testing but it's hard to say because it's all based on probability.
Interesting question, but I would guess that when you combine two regions like that they become one as far as the game is concerned and it is unlikely the chances will increase.
when you have a region of 2 circles that partially overlap, and then you spawn an event at a "random point within that region," will the overlapped area be twice as likely to spawn the unit as the un-overlapped area? I've done some testing but it's hard to say because it's all based on probability.
The probability that a point within the overlapped area is selected over a point in the non-overlapped area depends on the size of the overlap area compared to the size of the non-overlapped area.
That, at least, sounds correct in my head.
EDIT: This is considering that the two regions are not merged.
Correct :) It would depend on the amount of overlapped space compared to non-overlapped space. So let's say that you had 2 separate regions of the same size, and they were overlapping by half. If you're choosing to spawn a unit into just one of those regions, then the odds are 50/50 that it will be in the area that is overlapping, because half of the whole region is. If you're spawning a unit into one of the two regions randomly, you're still getting 50/50 odds, because that would imply 4 possible outcomes, 2 of which being in the overlapping section.
If it's a merged region, then it's being treated as one region and there is no overlapping area anymore.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
when you have a region of 2 circles that partially overlap, and then you spawn an event at a "random point within that region," will the overlapped area be twice as likely to spawn the unit as the un-overlapped area? I've done some testing but it's hard to say because it's all based on probability.
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
Interesting question, but I would guess that when you combine two regions like that they become one as far as the game is concerned and it is unlikely the chances will increase.
@rtschutter: Go
Yeah: under edit there is the merge option. Once merged - they will act as one!
Quoting from natives.galaxy:
Be careful with random points within merged regions, since it might return 0,0.
@Mille25: Go
Strange. I don't see why it would fail at all if shapes are more complex.
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
Yeah, that actually is pretty interesting, I didn't know that.
Does anyone know how frequently it happens and what kind of regions you would merge to maximize the chance of getting a (0, 0) return?
The probability that a point within the overlapped area is selected over a point in the non-overlapped area depends on the size of the overlap area compared to the size of the non-overlapped area.
That, at least, sounds correct in my head.
EDIT: This is considering that the two regions are not merged.
@BasharTeg: Go
Correct :) It would depend on the amount of overlapped space compared to non-overlapped space. So let's say that you had 2 separate regions of the same size, and they were overlapping by half. If you're choosing to spawn a unit into just one of those regions, then the odds are 50/50 that it will be in the area that is overlapping, because half of the whole region is. If you're spawning a unit into one of the two regions randomly, you're still getting 50/50 odds, because that would imply 4 possible outcomes, 2 of which being in the overlapping section.
If it's a merged region, then it's being treated as one region and there is no overlapping area anymore.