Weighted irregular double-torus surface helpers
Source:R/graph_helpers.R
irregular_double_torus_surface_helpers.RdConvenience helpers that build a closed genus-2 surface from a deterministically irregular slice family whose cyclic cross-sections follow a `1 -> 3 -> 1` loop transition between two poles. This gives a non-lattice, point-sampled double-torus graph together with either the canonical 3D embedding or simple bulged, twisted, and wavy deformations of that geometry.
Usage
irregular.double.torus.surface.embedding(
slices = 11,
tube_count = 14,
branch_length = 0.85,
branch_offset = 0.72,
tube_radius = 0.28,
transition_width = 0.42,
count_irregularity = 0.2,
axial_irregularity = 0.3,
phase_twist = 0.35,
surface = c("standard", "bulged", "twisted", "wavy"),
amplitude = 0.25,
freq_x = 2,
freq_theta = 2,
twist = 0.6
)
irregular.double.torus.surface.graph(
slices = 11,
tube_count = 14,
branch_length = 0.85,
branch_offset = 0.72,
tube_radius = 0.28,
transition_width = 0.42,
count_irregularity = 0.2,
axial_irregularity = 0.3,
phase_twist = 0.35,
surface = c("standard", "bulged", "twisted", "wavy"),
amplitude = 0.25,
freq_x = 2,
freq_theta = 2,
twist = 0.6,
normalize = c("median", "mean", "none")
)Arguments
- slices
Number of non-pole slices through the double torus.
- tube_count
Approximate number of vertices around each tube-like loop.
- branch_length
Half-length of the three-loop central region.
- branch_offset
Offset of the outer loop centers from the central loop.
- tube_radius
Baseline radius of each tube-like loop.
- transition_width
Width of the left and right transition regions between the single-loop and three-loop slices.
- count_irregularity
Irregularity level for the per-component sample counts. Must lie in
[0, 1).- axial_irregularity
Irregularity level for the slice spacing. Must lie in
[0, 1].- phase_twist
Finite phase offset used to desynchronize neighboring cyclic slices.
- surface
Double-torus geometry family. One of
"standard","bulged","twisted", or"wavy".- amplitude
Finite deformation amplitude.
- freq_x
Positive modulation frequency along the axial direction. Used only when
surface = "wavy".- freq_theta
Positive angular modulation frequency around the local tube direction. 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
irregular.double.torus.surface.embedding() returns an n x 3
numeric matrix with columns x, y, and z.
irregular.double.torus.surface.graph() returns a list with
components:
edges: the irregular double-torus edges,n: number of vertices,edge_weights: induced positive edge lengths,coords_surface: the 3D embedding,coords_param: the canonical 3D double-torus coordinates,weight_scale: the normalization constant applied to the raw edge lengths,family: always"irregular.double.torus",surface: the chosen surface name,slices: number of non-pole slices,slice_sizes: vertex counts in each slice,slice_components: number of cyclic components in each slice,label: a human-readable family label.