Weighted triangulated polyhedron surface helpers
Source:R/export_examples.R, R/graph_helpers.R
triangulated_polyhedron_surface_helpers.RdConvenience helpers that take a triangular-face polyhedron, repeatedly split each face into four subtriangles, merge shared-edge vertices, and use the resulting triangulated-surface graph as a reusable benchmark family. The canonical geometry is a piecewise-flat triangulated surface, while the weighted variants can inflate, twist, or radially modulate that surface in \(\mathbb{R}^3\).
Arguments
- base
Base polyhedron. One of
"tetrahedron","octahedron", or"icosahedron".- level
Subdivision depth.
level = 0returns the base triangulation,level = 1splits each face into four, and so on.- surface
Geometry family used for the 3D embedding. One of
"standard","inflated","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
The coords_surface component is an n x 3
numeric matrix with columns x, y, and z.
triangulated.polyhedron.surface.graph() returns a list with
components:
edges: the triangulated-surface edges,n: number of vertices,edge_weights: induced positive edge lengths,coords_surface: the 3D embedding,coords_param: the canonical piecewise-flat coordinates,weight_scale: the normalization constant applied to the raw edge lengths,family: always"triangulated.polyhedron",base: the chosen base polyhedron,surface: the chosen surface name,level: the subdivision depth,subdivision: the linear face subdivision factor2^level,label: a human-readable family label.