Convenience helpers that lift a rectangular mesh parameter grid into \(\mathbb{R}^3\) and use the induced Euclidean edge lengths as positive graph weights. These helpers are intended for benchmark families where the topology is a plain mesh but the intended metric comes from a curved ambient geometry.
mesh.surface.embedding(
h,
w = h,
surface = c("saddle", "paraboloid", "ripple"),
amplitude = 0.75,
freq_u = 1,
freq_v = 1,
x_scale = 1,
y_scale = 1
)mesh.surface.graph(
h,
w = h,
surface = c("saddle", "paraboloid", "ripple"),
amplitude = 0.75,
freq_u = 1,
freq_v = 1,
x_scale = 1,
y_scale = 1,
connectivity = c("orthogonal", "diagonal"),
normalize = c("median", "mean", "none")
)
mesh.surface.embedding() returns an n x 3 numeric matrix with
columns x, y, and z.
mesh.surface.graph() returns a list with components:
edges: the undirected mesh edges,
n: number of vertices,
edge_weights: induced positive edge lengths,
coords_surface: the 3D surface embedding,
coords_param: the 2D parameter-grid coordinates,
weight_scale: the normalization constant applied to the raw
edge lengths,
family: always "mesh",
surface: the chosen surface name,
connectivity: the chosen mesh connectivity rule,
label: a human-readable family label.
Number of rows.
Number of columns. Defaults to h.
Surface family used for the lift. One of "saddle",
"paraboloid", or "ripple".
Finite numeric amplitude controlling the non-flat displacement.
Positive ripple frequency in the horizontal parameter
direction. Used only when surface = "ripple".
Positive ripple frequency in the vertical parameter direction.
Used only when surface = "ripple".
Positive horizontal scaling of the parameter domain.
Positive vertical scaling of the parameter domain.
Occupied-mesh neighborhood rule passed to
edges.occupied.mesh().
Normalization applied to the induced edge lengths. One of
"median", "mean", or "none".
`mesh.surface.embedding()` returns the 3D coordinates of the lifted grid. `mesh.surface.graph()` returns a reusable weighted-graph bundle containing the mesh edges, induced edge weights, the 3D surface coordinates, and the 2D parameter coordinates.