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.
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")
)
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.
Number of rows.
Number of columns. Defaults to h.
Cylinder surface family. One of "barrel",
"hourglass", or "wavy".
Positive baseline cylinder radius.
Positive cylinder height.
Finite numeric deformation amplitude. The resulting radius profile must stay positive everywhere.
Positive angular frequency used only when
surface = "wavy".
Positive vertical frequency used only when
surface = "wavy".
Finite angular twist applied linearly with height.
Normalization applied to the induced edge lengths. One of
"median", "mean", or "none".
`cylinder.surface.embedding()` returns the 3D coordinates of the embedded cylindrical grid. `cylinder.surface.graph()` returns a reusable weighted-graph bundle containing the cylinder edges, induced edge weights, the 3D surface coordinates, and a 2D unwrapped parameterization.