Weighted Menger sponge surface helpers
Source:R/export_examples.R, R/graph_helpers.R
menger_sponge_surface_helpers.RdConvenience 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.
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.