File size: 1,908 Bytes
f69e256 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # Bounded Faces Counting
## Goal
Render several closed curves (ellipses) on a canvas. The curves overlap to form a planar arrangement that subdivides the interior into one or more *bounded faces*. The model must scan the entire image and count how many distinct enclosed regions exist.
This is a *distributed scanning* task — there is no path to follow. The model has to look at the whole arrangement and tally every enclosed region.
## Avoiding ambiguity
The user requested that there be no very small or very thin regions, and that curve overlaps should not create ambiguous regions. The generator enforces this by:
- Stroking each loop with a generous thickness (visually clear).
- Rasterizing the figure and using a flood fill to find all interior connected components.
- Rejecting any sample where the smallest interior region is below a minimum area threshold (so no tiny slivers).
- Rejecting any sample where the bounding box of an interior region is unusually thin (so no needle-like regions).
## Question
"How many distinct enclosed regions (bounded faces) are visible in this image? An enclosed region is a maximal area that is fully surrounded by the drawn curves on every side, with no opening to the outside background. The unbounded outside area does not count. Each enclosed region should be counted exactly once, even if it is shaped irregularly. Count every enclosed region in the entire image and report the total as a positive integer."
## Generation
1. Pick `K` (number of loops), e.g. 3-6.
2. For each loop, sample random center, semi-axes, and rotation.
3. Stroke each loop as a thick outline on the canvas.
4. Flood-fill the background from the canvas border.
5. Find all interior connected components (regions not reached by the outer flood).
6. Reject the sample if any region has area below `min_area` or has a thin bounding box.
7. GT = number of interior components.
|