Skip to content

Main content

Random Crochet Stripe Sequence Plan Generator

Assign supplied yarn colors and permitted stripe heights under exact row totals, adjacent-color exclusions and color quotas with bounded search.

Loading tool…

Description

Assign supplied yarn colors and permitted stripe heights under exact row totals, adjacent-color exclusions and color quotas with bounded search.

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 supplied yarn colors and permitted stripe heights under exact row totals, adjacent-color exclusions and color quotas with bounded search.

When to use this tool

Use this generator to create reproducible crochet stripe sequence 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 colors, allowedRows, totalRows, stripeCount 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 stripes, stripeCounts, rowTotals, totalRows. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.

Use bounded backtracking to choose stripe colors and allowed row counts, forbidding equal neighboring colors and respecting each color's maximum rows. Require exact totalRows and stripeCount and return half-open row intervals, stripe counts, and row totals.1

Delegated operations used for this result: add numbers. Their calculation or parsing conventions apply to the corresponding result fields.2

Input fieldMeaning and unitsAccepted input
colorsColorsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 16.
colors[].idLiteral identifier used independently of display labels.Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 80.
colors[].maximumRowsMaximum RowsRequired. Safe integer; minimum 0; maximum 512.
allowedRowsAllowed RowsRequired. Array of Safe integer; minimum 1; maximum 128.; minimum items 1; maximum items 16.
totalRowsTotal RowsRequired. Safe integer; minimum 1; maximum 512.
stripeCountStripe CountRequired. Safe integer; minimum 1; maximum 32.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
stripesStripesRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 32.
stripes[].colorIdColor IdRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 80.
stripes[].rowsRowsRequired. Safe integer; minimum 1; maximum 128.
stripes[].startRowStart RowRequired. Safe integer; minimum 0; maximum 511.
stripes[].endRowExclusiveEnd Row ExclusiveRequired. Safe integer; minimum 1; maximum 512.
stripeCountsStripe CountsRequired. Array of Object; no unknown keys.; minimum items 0; maximum items 32.
stripeCounts[].idLiteral identifier used independently of display labels.Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 80.
stripeCounts[].countCountRequired. Safe integer; minimum 0; maximum 128.
rowTotalsRow TotalsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 16.
rowTotals[].idLiteral identifier used independently of display labels.Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 80.
rowTotals[].rowsRowsRequired. Safe integer; minimum 0; maximum 512.
totalRowsTotal RowsRequired. Safe integer; minimum 1; maximum 512.
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": {
    "colors": [
      {
        "id": "red",
        "maximumRows": 6
      },
      {
        "id": "blue",
        "maximumRows": 6
      }
    ],
    "allowedRows": [
      2
    ],
    "totalRows": 6,
    "stripeCount": 3,
    "seed": 42
  },
  "output": {
    "stripes": [
      {
        "colorId": "blue",
        "rows": 2,
        "startRow": 0,
        "endRowExclusive": 2
      },
      {
        "colorId": "red",
        "rows": 2,
        "startRow": 2,
        "endRowExclusive": 4
      },
      {
        "colorId": "blue",
        "rows": 2,
        "startRow": 4,
        "endRowExclusive": 6
      }
    ],
    "stripeCounts": [
      {
        "id": "red",
        "count": 1
      },
      {
        "id": "blue",
        "count": 2
      }
    ],
    "rowTotals": [
      {
        "id": "red",
        "rows": 2
      },
      {
        "id": "blue",
        "rows": 4
      }
    ],
    "totalRows": 6,
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • This does not uniformly sample valid stripe sequences or calculate yarn consumption, stitch gauge, or material behavior. Infeasible constraints or a search-budget limit return an error.
  • 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 Crochet Stripe Sequence Plan Generator — tool.io

  2. Calculation or validation: arithmetic/add-numbers — 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.