Skip to content

Main content

Voxel Eighteen Neighbor List

Enumerate 18 integer voxel neighbors in z/y/x scan order on an unbounded lattice, excluding the center; no volume clipping, connectivity inference or geographic projection.

Loading tool…

Description

Enumerate 18 integer voxel neighbors in z/y/x scan order on an unbounded lattice, excluding the center; no volume clipping, connectivity inference or geographic projection.

A voxel is a cell on a three-dimensional integer lattice. Coordinates use [x, y, z] order; a box uses an inclusive low corner and exclusive high corner, so its dimensions count cells rather than physical distance. Occupancy records can repeat the same cell without creating extra occupied space.

Enumerate 18 integer voxel neighbors in z/y/x scan order on an unbounded lattice, excluding the center; no volume clipping, connectivity inference or geographic projection.

When to use this tool

Use this tool to enumerate 18 integer voxel neighbors in z/y/x scan order on an unbounded lattice, excluding the center; no volume clipping, connectivity inference or geographic projection.

How to use the tool and how it works

  1. Enter coordinate using the field definitions below.
  2. Run the operation. Correct input errors before interpreting an output.
  3. Read result.neighbors. Use the ordering, boundary rules and absence conditions described below.

Add offsets that share a face or edge, excluding the center and eight corner-only offsets, in z/y/x scan order.1

Input fieldMeaning and unitsAccepted input
coordinateA single [x, y, z] integer cell coordinate; a slice instead uses one integer axis coordinate.Dense list of at most 128 finite numbers; integer/shape constraints above also apply.
Output fieldInterpretation
resultObject containing the named fields below.
result.neighborsNeighbor coordinates in the explicit offset order stated above.
json
{
  "input": {
    "coordinate": [
      0,
      0,
      0
    ]
  },
  "output": {
    "result": {
      "neighbors": [
        [
          0,
          -1,
          -1
        ],
        [
          -1,
          0,
          -1
        ],
        [
          0,
          0,
          -1
        ],
        [
          1,
          0,
          -1
        ],
        [
          0,
          1,
          -1
        ],
        [
          -1,
          -1,
          0
        ],
        [
          0,
          -1,
          0
        ],
        [
          1,
          -1,
          0
        ],
        [
          -1,
          0,
          0
        ],
        [
          1,
          0,
          0
        ],
        [
          -1,
          1,
          0
        ],
        [
          0,
          1,
          0
        ],
        [
          1,
          1,
          0
        ],
        [
          0,
          -1,
          1
        ],
        [
          -1,
          0,
          1
        ],
        [
          0,
          0,
          1
        ],
        [
          1,
          0,
          1
        ],
        [
          0,
          1,
          1
        ]
      ]
    }
  }
}

Limitations and assumptions

  • These 18 neighbors are not clipped to a supplied volume.
  • Voxel components are integers from −1,000,000,000 through 1,000,000,000; dimensions are three integers from 1 through 1,000,000. Counts or strides returned as decimal text use exact integer arithmetic. No physical voxel size is assumed.
  • Every declared top-level input field is required and unexpected fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
  • Numeric outputs must be finite and no larger in absolute magnitude than the safe-integer limit; operations returning exact large integers use decimal text. Positions are zero-based and spans end exclusively unless the operation explicitly states a different convention.

Alternative or Complementary methods

Keep cell coordinates, storage order and physical scale separate. Use coordinate conversion for a different memory layout and a separate meshing or geometric model for rendered surfaces.

References

  1. Tool behavior and example: Voxel Eighteen Neighbor List — tool.io

Similar or alternative tools

  • Voxel Six Neighbor List

    Enumerate 6 integer voxel neighbors in z/y/x scan order on an unbounded lattice, excluding the center; no volume clipping, connectivity inference or geographic projection.

  • Voxel Twenty Six Neighbor List

    Enumerate 26 integer voxel neighbors in z/y/x scan order on an unbounded lattice, excluding the center; no volume clipping, connectivity inference or geographic projection.