Having a large area from which other areas are subtracted, how to split the large area in parts that already don't cover the subtracted areas?

36 Views Asked by At

Having a large area described by lines that don't cross each other and where the last point equals the first point, and having other areas of the same sort that subtract from the large area, is there a formula to split the large area in parts, so when drawing only the parts there is no need anymore to subtract anything?

Like I have a lake that I want to draw, but the island in it and the pier that reaches from the shore over the water should not drawn blue.

I assume there is already a method developed for this. What is it called, so I could look it up? Or even better is the method explainable in a view words?

1

There are 1 best solutions below

0
On

Given that in general the regions are complicated, I would simply use any of the innumerable software packages to discretize the region.

In Mathematica:

DiscretizeRegion[
 RegionDifference[
 RegionDifference[
   Disk[{0, 0}, 2], Disk[{0, 0}, .4]],
   Rectangle[{.8, -.2}, {2, .2}]]
 ]

discretized pond, island and dock


By the way, I have no idea what this single ungrammatical sentence means:

"Having a large area described by lines that don't cross each other and where the last point equals the first point, and having other areas of the same sort that subtract from the large area, is there a formula to split the large area in parts, so when drawing only the parts there is no need anymore to subtract anything?"