Description
Construct simple integer rectangles or concave L polygons with interior, exterior, edge and vertex probes, delegating area and boundary-inclusive classification.
A generated practice exercise contains a prompt and an answer key under a specific rule set. A planted answer establishes one possible solution; only an explicit enumeration or uniqueness check establishes whether alternatives exist.
Construct simple integer rectangles or concave L polygons with interior, exterior, edge and vertex probes, delegating area and boundary-inclusive classification.
When to use this tool
Use this generator to create reproducible point in polygon classification quiz cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply count, shape, originMinimum, originMaximum, minimumExtent, maximumExtent in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read cases, boundaryConvention. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.
Construct a rectangle or concave L-shaped polygon, then create known interior, exterior, edge, and vertex probes. Delegate point classification and polygon area and cross-check both against the construction.1
Delegated operations used for this result: point in polygon; polygon area. Their calculation or parsing conventions apply to the corresponding result fields.2, 3
| Input field | Meaning and units | Accepted input |
|---|---|---|
| count | Requested count; the mechanics explain whether one draw expands into several returned records. | Required. Safe integer; minimum 1; maximum 16. |
| shape | Shape | Required. Text; one of "rectangle", "l-shape", "mixed". |
| originMinimum | Origin Minimum | Required. Safe integer. |
| originMaximum | Origin Maximum | Required. Safe integer. |
| minimumExtent | Minimum Extent | Required. Safe integer; minimum 4. |
| maximumExtent | Maximum Extent | Required. Safe integer; minimum 4. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| cases | Cases | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 16. |
| cases[].shape | Shape | Required. Text; one of "rectangle", "l-shape". |
| cases[].parameters | Parameters | Required. Object; no unknown keys. |
| cases[].parameters.x | X | Required. Safe integer. |
| cases[].parameters.y | Y | Required. Safe integer. |
| cases[].parameters.width | Width | Required. Safe integer; minimum 4. |
| cases[].parameters.height | Height | Required. Safe integer; minimum 4. |
| cases[].parameters.cutX | Cut X | Required. Safe integer; minimum 2. or Null. |
| cases[].parameters.cutY | Cut Y | Required. Safe integer; minimum 2. or Null. |
| cases[].xs | Xs | Required. Array of Finite number.; minimum items 4; maximum items 6. |
| cases[].ys | Ys | Required. Array of Finite number.; minimum items 4; maximum items 6. |
| cases[].area | Area | Required. Finite number; strictly above 0. |
| cases[].points | Points | Required. Array of Object; no unknown keys.; minimum items 6; maximum items 6. |
| cases[].points[].x | X | Required. Finite number. |
| cases[].points[].y | Y | Required. Finite number. |
| cases[].points[].intended | Intended | Required. Text; one of "interior", "exterior", "boundary". |
| cases[].points[].inside | Inside | Required. Boolean. |
| cases[].points[].onBoundary | On Boundary | Required. Boolean. |
| boundaryConvention | Boundary Convention | Required. Text. |
| randomness | Replay metadata: source is seed or context; seed is the normalized 32-bit seed or null for a context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional numeric replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"count": 1,
"shape": "mixed",
"originMinimum": -2,
"originMaximum": 2,
"minimumExtent": 4,
"maximumExtent": 6,
"seed": 42
},
"output": {
"cases": [
{
"shape": "l-shape",
"parameters": {
"x": 0,
"y": 2,
"width": 6,
"height": 4,
"cutX": 3,
"cutY": 2
},
"xs": [
0,
6,
6,
3,
3,
0
],
"ys": [
2,
2,
4,
4,
6,
6
],
"area": 18,
"points": [
{
"x": 1,
"y": 3,
"intended": "interior",
"inside": true,
"onBoundary": false
},
{
"x": 1,
"y": 5,
"intended": "interior",
"inside": true,
"onBoundary": false
},
{
"x": 7,
"y": 7,
"intended": "exterior",
"inside": false,
"onBoundary": false
},
{
"x": 3,
"y": 2,
"intended": "boundary",
"inside": true,
"onBoundary": true
},
{
"x": 0,
"y": 2,
"intended": "boundary",
"inside": true,
"onBoundary": true
},
{
"x": 4,
"y": 5,
"intended": "exterior",
"inside": false,
"onBoundary": false
}
]
}
],
"boundaryConvention": "Boundary points count as inside; exact collinearity and segment bounds identify edges and vertices.",
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- Boundary points count as inside and also have onBoundary true. Exact-collinearity conventions and floating-point conditioning can reject extreme geometry; the cases do not cover arbitrary polygons or tolerance-based GIS behavior.
- A replay requires the same complete input and implementation. Randomized construction does not guarantee uniform coverage of every feasible output; finite samples can repeat unless a distinct-selection rule is explicitly stated.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random KenKen Cage Arithmetic Quiz Generator
Generate a positive-target KenKen cage question and every valid hidden-cell replacement using cage arithmetic only, without global Latin-square constraints.
- Random Scientific Prefix Matching Quiz Generator
Shuffle caller-reviewed prefix and exponent matching cards while retaining unit and provenance; no built-in prefix facts are invented.