Skip to contents

Convenience wrappers around recursive.cube.mask.surface.*() for three named porous cubical families: a periodic tunnel lattice, an asymmetric cavity family, and a deterministic channel network. Each family uses a reusable base keep-array and then recurses it in exactly the same way as the generic cube-mask helpers.

Usage

cube.periodic.tunnels.surface.graph(
  level = 2,
  side = 5,
  tunnel.width = 1,
  tunnel.period = 2,
  tunnel.offset = 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")
)

cube.asymmetric.cavities.surface.graph(
  level = 2,
  side = 5,
  cavity.size = 2,
  pocket.size = max(1L, cavity.size - 1L),
  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")
)

cube.channel.network.surface.graph(
  level = 2,
  side = 5,
  channel.width = 1,
  branch.offset = 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.

side

Side length of the base cubic keep-array.

tunnel.width

Width of each removed tunnel band.

tunnel.period

Spacing between successive tunnel bands.

tunnel.offset

Starting index of the first tunnel band.

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".

cavity.size

Side length of the larger interior cavity block.

pocket.size

Side length of the smaller secondary cavity block.

channel.width

Width of each removed channel in the channel-network family.

branch.offset

Interior offset of the extra branch channel in the channel-network family.

Value

Each graph bundle's coords_surface component is an n x 3 numeric matrix with columns x, y, and z.

Each *.surface.graph() helper returns the same components as recursive.cube.mask.surface.graph(), with a family-specific family field, class, and label.

Examples

asymmetric <- cube.asymmetric.cavities.surface.graph(
  level = 1, side = 5, cavity.size = 1, pocket.size = 1
)
channels <- cube.channel.network.surface.graph(
  level = 1, side = 5, channel.width = 1, branch.offset = 2
)
tunnels <- cube.periodic.tunnels.surface.graph(
  level = 1, side = 5, tunnel.width = 1,
  tunnel.period = 2, tunnel.offset = 1
)