Description
Construct an exact numeric-index bead chart from finite caller color stock under per-row repeat bounds, retaining compact matrix JSON and inventory conservation.
Procedural artwork expresses a visual idea through coordinates, repeated motifs, colors, or explicit placement constraints. A coordinate plan can be checked and reproduced before rendering, while physical material behavior and fabrication require separate information.
Construct an exact numeric-index bead chart from finite caller color stock under per-row repeat bounds, retaining compact matrix JSON and inventory conservation.
When to use this tool
Use this generator to create reproducible bead loom row chart 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 colors, rows, columns, maximumRun 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 colorIds, chart, chartJson, colorCounts, remaining. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.
Fill a bead grid in row order using bounded backtracking, respecting each color's remaining count and maximum equal-color run within each row. Return index and color mappings, chart JSON, used counts, and stock remaining.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| colors | Colors | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 16. |
| colors[].id | Literal identifier used independently of display labels. | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 80. |
| colors[].count | Count | Required. Safe integer; minimum 0; maximum 128. |
| rows | Rows | Required. Safe integer; minimum 1; maximum 16. |
| columns | Columns | Required. Safe integer; minimum 1; maximum 16. |
| maximumRun | Maximum Run | Required. Safe integer; minimum 1; maximum 16. |
| 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 |
|---|---|---|
| colorIds | Color Ids | Required. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 80.; minimum items 1; maximum items 16. |
| chart | Chart | Required. Array of Array of Safe integer; minimum 0; maximum 15.; minimum items 1; maximum items 16.; minimum items 1; maximum items 16. |
| chartJson | Chart Json | Required. Text; maximum UTF-16 length 2048. |
| colorCounts | Color Counts | Required. Array of Object; no unknown keys.; minimum items 0; maximum items 32. |
| colorCounts[].id | Literal identifier used independently of display labels. | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 80. |
| colorCounts[].count | Count | Required. Safe integer; minimum 0; maximum 128. |
| remaining | Remaining | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 16. |
| remaining[].id | Literal identifier used independently of display labels. | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 80. |
| remaining[].count | Count | Required. Safe integer; minimum 0; maximum 128. |
| randomness | Replay source and normalized 32-bit seed, or null seed for an advancing context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional safe-integer 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": {
"colors": [
{
"id": "red",
"count": 2
},
{
"id": "blue",
"count": 2
}
],
"rows": 1,
"columns": 3,
"maximumRun": 1,
"seed": 42
},
"output": {
"colorIds": [
"red",
"blue"
],
"chart": [
[
1,
0,
1
]
],
"chartJson": "[[1,0,1]]",
"colorCounts": [
{
"id": "red",
"count": 1
},
{
"id": "blue",
"count": 2
}
],
"remaining": [
{
"id": "red",
"count": 1
},
{
"id": "blue",
"count": 0
}
],
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- The run restarts at each row and is not checked vertically or across a circular repeat. This is a symbolic allocation rather than physical bead size, loom tension, thread consumption, or a uniform valid-chart draw.
- A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
- 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 Cross-Stitch Chart Generator
Assign unique supplied legend symbols to thread inventory and fill a bounded stitch grid while counting and respecting available stitches.
- Random Bilinear Heightmap Tile Generator
Draw corner heights with optional consistent shared linear edges and delegate a bounded bilinear grid, returning both unrounded and inherited core values.