Skip to contents

Convenience constructors for connected \(k \times k\) keep-masks that can be passed to recursive.mask.grid.surface.graph() to build generalized mask carpets. These helpers are meant to provide explicit benchmark motifs such as cross, border, corner, and asymmetric-hole patterns.

Usage

mask.cross(k = 5, arm.width = 1)

mask.border(k = 5, thickness = 1)

mask.corner(
  k = 5,
  width = 2,
  corner = c("top_left", "top_right", "bottom_left", "bottom_right")
)

mask.asymmetric.holes(k = 5, hole.size = 1)

Arguments

k

Mask side length.

arm.width

Width of the retained cross arms.

thickness

Border thickness for mask.border().

width

Side length of the retained corner block for mask.corner().

corner

Which corner to retain in mask.corner().

hole.size

Side length of each removed interior hole block for mask.asymmetric.holes().

Value

A logical \(k \times k\) keep-mask.

Details

The returned masks use standard matrix display orientation: rows run from top to bottom and columns run from left to right.

Examples

asymmetric <- mask.asymmetric.holes(k = 5, hole.size = 1)
border <- mask.border(k = 5, thickness = 1)
corner <- mask.corner(k = 5, width = 2, corner = "top_left")
cross <- mask.cross(k = 5, arm.width = 1)