Skip to content

Main content

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.

Loading tool…

Description

Assign unique supplied legend symbols to thread inventory and fill a bounded stitch grid while counting and respecting available stitches.

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.

Assign unique supplied legend symbols to thread inventory and fill a bounded stitch grid while counting and respecting available stitches.

When to use this tool

Use this generator to create reproducible cross stitch 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

  1. Supply rows, columns, symbols, threads in the field shapes below. Set seed when you need an explicit replay.
  2. 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.
  3. Read threadGrid, symbolGrid, legend, totalStitches. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.

Assign a distinct symbol to each thread and fill every grid cell from thread types with stitch capacity remaining. Return aligned thread and symbol grids and a legend with used and residual stitch counts.1

Input fieldMeaning and unitsAccepted input
rowsRowsRequired. Safe integer; minimum 1; maximum 32.
columnsColumnsRequired. Safe integer; minimum 1; maximum 32.
symbolsSymbolsRequired. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 8.; minimum items 1; maximum items 64.
threadsThreadsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 32.
threads[].idLiteral identifier used independently of display labels.Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 64.
threads[].colorColorRequired. Text; maximum UTF-16 length 2048.
threads[].availableStitchesAvailable StitchesRequired. Safe integer; minimum 0; maximum 1024.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
threadGridThread GridRequired. Array of Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 64.; minimum items 1; maximum items 32.; minimum items 1; maximum items 32.
symbolGridSymbol GridRequired. Array of Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 8.; minimum items 1; maximum items 32.; minimum items 1; maximum items 32.
legendLegendRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 32.
legend[].idLiteral identifier used independently of display labels.Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 64.
legend[].colorColorRequired. Text; maximum UTF-16 length 2048.
legend[].symbolSymbolRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 8.
legend[].stitchesStitchesRequired. Safe integer; minimum 0; maximum 1024.
legend[].remainingStitchesRemaining StitchesRequired. Safe integer; minimum 0; maximum 1024.
totalStitchesTotal StitchesRequired. Safe integer; minimum 1; maximum 1024.
randomnessReplay source and normalized 32-bit seed, or null seed for an advancing context source.Required. Object; no unknown keys.
randomness.seedOptional safe-integer replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. 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.

json
{
  "input": {
    "rows": 2,
    "columns": 3,
    "symbols": [
      "X",
      "O"
    ],
    "threads": [
      {
        "id": "red",
        "color": "#c04040",
        "availableStitches": 3
      },
      {
        "id": "blue",
        "color": "#4060c0",
        "availableStitches": 3
      }
    ],
    "seed": 42
  },
  "output": {
    "threadGrid": [
      [
        "blue",
        "blue",
        "red"
      ],
      [
        "blue",
        "red",
        "red"
      ]
    ],
    "symbolGrid": [
      [
        "X",
        "X",
        "O"
      ],
      [
        "X",
        "O",
        "O"
      ]
    ],
    "legend": [
      {
        "id": "red",
        "color": "#c04040",
        "symbol": "O",
        "stitches": 3,
        "remainingStitches": 0
      },
      {
        "id": "blue",
        "color": "#4060c0",
        "symbol": "X",
        "stitches": 3,
        "remainingStitches": 0
      }
    ],
    "totalStitches": 6,
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • Capacities are stitch counts, not yarn length estimates. Thread colors and symbols are supplied and not checked for contrast or stitchability. The result is a symbolic chart rather than physical embroidery guidance.
  • 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

  1. Tool behavior and example: Random Cross-Stitch Chart Generator — tool.io

Similar or alternative tools

  • Random Bead Loom Row Chart Generator

    Construct an exact numeric-index bead chart from finite caller color stock under per-row repeat bounds, retaining compact matrix JSON and inventory conservation.

  • 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.