Examples
Basic Examples (5)
Create a 10×10 perimeter mask array with border radius 1:
Create a 20×40 perimeter mask array with border radius 5:
Create a 3D perimeter mask array:
When r<1, the resulting array will be all zeros:
When r>=(dimi/2), the resulting array will be all ones:
Possible Issues (2)
PerimeterMaskArray will fail if provided non-integer dimensions:
PerimeterMaskArray will fail if provided non-positive dimensions:
Neat Examples (3)
Use PerimeterMaskArray to set up and run a fixed boundary 1D cellular automaton simulation:
Use PerimeterMaskArray to set up and run a fixed boundary 2D cellular automaton simulation:
Interpret a square perimeter mask array as a graph adjacency matrix:
Publisher
Phileas Dazeley-Gaist
Requirements
Wolfram Language 14.0
(January 2024) or above
Version History
-
1.0.1
– 13 August 2025
-
1.0.0
– 11 August 2025
Related Resources