Convenience helpers that embed a cylindrical grid graph into \(\mathbb{R}^3\) and use the induced Euclidean edge lengths as positive graph weights. These helpers are intended for benchmark families where the graph topology is cylindrical but the intended metric comes from a curved or spatially varying 3D realization.
Usage
cylinder.surface.embedding(
h,
w = h,
surface = c("barrel", "hourglass", "wavy"),
radius = 1,
height = 2,
amplitude = 0.3,
freq_theta = 2,
freq_z = 1,
twist = 0.25
)
cylinder.surface.graph(
h,
w = h,
surface = c("barrel", "hourglass", "wavy"),
radius = 1,
height = 2,
amplitude = 0.3,
freq_theta = 2,
freq_z = 1,
twist = 0.25,
normalize = c("median", "mean", "none")
)Arguments
- h
Number of rows.
- w
Number of columns. Defaults to
h.- surface
Cylinder surface family. One of
"barrel","hourglass", or"wavy".- radius
Positive baseline cylinder radius.
- height
Positive cylinder height.
- amplitude
Finite numeric deformation amplitude. The resulting radius profile must stay positive everywhere.
- freq_theta
Positive angular frequency used only when
surface = "wavy".- freq_z
Positive vertical frequency used only when
surface = "wavy".- twist
Finite angular twist applied linearly with height.
- normalize
Normalization applied to the induced edge lengths. One of
"median","mean", or"none".
Value
cylinder.surface.embedding() returns an n x 3 numeric matrix
with columns x, y, and z.
cylinder.surface.graph() returns a list with components:
edges: the undirected cylindrical-grid edges,n: number of vertices,edge_weights: induced positive edge lengths,coords_surface: the 3D surface embedding,coords_param: the 2D unwrapped parameter coordinates,weight_scale: the normalization constant applied to the raw edge lengths,family: always"cylinder",surface: the chosen surface name,label: a human-readable family label.