Skip to content

Main content

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.

Loading tool…

Description

Draw corner heights with optional consistent shared linear edges and delegate a bounded bilinear grid, returning both unrounded and inherited core values.

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.

Draw corner heights with optional consistent shared linear edges and delegate a bounded bilinear grid, returning both unrounded and inherited core values.

When to use this tool

Use this generator to create reproducible bilinear heightmap tile 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, minimumHeight, maximumHeight, sharedEdges 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 corners, xs, ys, values, coreValues, convention. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.

Draw four corner heights while allowing shared-edge constraints to override corners consistently, then sample bilinear interpolation on normalized x/y grids. Return direct values and delegated rounded coreValues with rows increasing from y zero to one.1

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

Input fieldMeaning and unitsAccepted input
rowsRowsRequired. Safe integer; minimum 2; maximum 33.
columnsColumnsRequired. Safe integer; minimum 2; maximum 33.
minimumHeightMinimum HeightRequired. Finite number.
maximumHeightMaximum HeightRequired. Finite number.
sharedEdgesShared EdgesOptional. Object; no unknown keys.
sharedEdges.bottomBottomOptional. Array of Finite number.; minimum items 2; maximum items 2.
sharedEdges.topTopOptional. Array of Finite number.; minimum items 2; maximum items 2.
sharedEdges.leftLeftOptional. Array of Finite number.; minimum items 2; maximum items 2.
sharedEdges.rightRightOptional. Array of Finite number.; minimum items 2; maximum items 2.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
cornersCornersRequired. Array of Array of Finite number.; minimum items 2; maximum items 2.; minimum items 2; maximum items 2.
xsXsRequired. Array of Finite number.; minimum items 2; maximum items 33.
ysYsRequired. Array of Finite number.; minimum items 2; maximum items 33.
valuesValuesRequired. Array of Array of Finite number.; minimum items 2; maximum items 33.; minimum items 2; maximum items 33.
coreValuesCore ValuesRequired. Array of Array of Finite number.; minimum items 2; maximum items 33.; minimum items 2; maximum items 33.
conventionConventionRequired. Text.
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": 3,
    "columns": 3,
    "minimumHeight": -2,
    "maximumHeight": 10,
    "sharedEdges": {
      "bottom": [
        0,
        4
      ],
      "top": [
        8,
        12
      ]
    },
    "seed": 42
  },
  "output": {
    "corners": [
      [
        0,
        4
      ],
      [
        8,
        12
      ]
    ],
    "xs": [
      0,
      0.5,
      1
    ],
    "ys": [
      0,
      0.5,
      1
    ],
    "values": [
      [
        0,
        2,
        4
      ],
      [
        4,
        6,
        8
      ],
      [
        8,
        10,
        12
      ]
    ],
    "coreValues": [
      [
        0,
        2,
        4
      ],
      [
        4,
        6,
        8
      ],
      [
        8,
        10,
        12
      ]
    ],
    "convention": "Rows increase from y=0 to y=1; columns from x=0 to x=1. Shared edges are linear corner pairs in those directions and may lie outside the random range. coreValues inherit 12-significant-digit rounding; values are unrounded.",
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • Shared edge endpoints can lie outside the random height range and contradictory shared corners are rejected. coreValues use 12-significant-digit rounding. The tile is an interpolated artwork, not surveyed terrain or a seam-free guarantee without matched neighbors.
  • 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 Bilinear Heightmap Tile Generator — tool.io

  2. Calculation or validation: interpolation/bilinear — 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 Bookplate Design Brief Generator

    Sample supplied owner, typography, border and emblem labels into dimensioned fictional bookplate briefs with greedy wrapping; typography metrics and artwork remain external.