Skip to contents

Convenience wrappers around recursive.cube.mask.surface.*() using the classic \(3 \times 3 \times 3\) Menger-sponge keep-mask. These helpers provide a named cubical 3D benchmark family whose vertices are occupied subcubes and whose edges connect face-adjacent occupied cells.

Usage

menger.sponge.surface.graph(
  level = 2,
  surface = c("standard", "bulged", "twisted", "wavy"),
  amplitude = 0.2,
  freq = 2,
  twist = 0.6,
  x.scale = 1,
  y.scale = 1,
  z.scale = 1,
  normalize = c("median", "mean", "none")
)

Arguments

level

Recursion depth. Must be at least 1.

surface

Cube-mask geometry family. One of "standard", "bulged", "twisted", or "wavy".

amplitude

Finite deformation amplitude.

freq

Positive modulation frequency used only when surface = "wavy".

twist

Finite twist strength used only when surface = "twisted".

x.scale

Positive horizontal scaling applied to the canonical cube coordinates.

y.scale

Positive vertical scaling applied to the canonical cube coordinates.

z.scale

Positive depth scaling applied to the canonical cube coordinates.

normalize

Normalization applied to the induced edge lengths. One of "median", "mean", or "none".

Value

The coords_surface component is an n x 3 numeric matrix with columns x, y, and z, where n = 20^level.

menger.sponge.surface.graph() returns the same components as recursive.cube.mask.surface.graph(), with family set to "menger.sponge" and a family-specific class and label.

Examples

sponge <- menger.sponge.surface.graph(level = 1)