Weighted recursive tetrahedron-mask surface helpers
Source:R/graph_helpers.R
recursive_tetrahedron_mask_surface_helpers.RdConvenience helpers that recursively subdivide a tetrahedron into four corner subtetrahedra according to a four-corner keep-mask, retain the selected subtetrahedra at each recursion step, and deform the resulting simplicial graph inside \(\mathbb{R}^3\). This provides a generic tetrahedral gasket family that includes the classic Sierpinski tetrahedron together with corner-omission variants.
Usage
recursive.tetrahedron.mask.surface.embedding(
mask = mask.tetrahedron.classic(),
level = 2,
surface = c("standard", "squashed", "twisted", "wavy"),
amplitude = 0.3,
freq = 2,
twist = 0.6
)
recursive.tetrahedron.mask.surface.graph(
mask = mask.tetrahedron.classic(),
level = 2,
surface = c("standard", "squashed", "twisted", "wavy"),
amplitude = 0.3,
freq = 2,
twist = 0.6,
normalize = c("median", "mean", "none")
)Arguments
- mask
Four-entry logical or numeric keep-mask. Non-zero entries are retained at each recursive step.
- level
Recursion depth. May be
0or larger.- surface
Tetrahedron surface family. One of
"standard","squashed","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".- normalize
Normalization applied to the induced edge lengths. One of
"median","mean", or"none".
Value
recursive.tetrahedron.mask.surface.embedding() returns an n x 3
numeric matrix with columns x, y, and z.
recursive.tetrahedron.mask.surface.graph() returns a list with
components:
edges: the retained recursive tetrahedron-mask edges,n: number of vertices,edge_weights: induced positive edge lengths,coords_surface: the 3D surface embedding,coords_param: the canonical 3D tetrahedron coordinates,weight_scale: the normalization constant applied to the raw edge lengths,family: always"recursive.tetrahedron.mask",surface: the chosen surface name,level: the recursion depth,mask: the logical keep-mask,label: a human-readable family label.