Convenience helpers that keep ordinary rectangular-mesh adjacency but replace the regular parameter grid by a deterministic irregular rectangle. The resulting family stays simply connected and rectangular in topology while breaking the strongest row/column symmetries of the lattice.
irregular.rectangle.param.coords(
h,
w = h,
x_scale = 1,
y_scale = 1,
row_irregularity = 0.2,
col_irregularity = 0.2,
row_phase = 0.35,
col_phase = 0.65,
interior_warp = 0.08,
shear = 0,
min_step_ratio = 0.3
)irregular.rectangle.surface.embedding(
h,
w = h,
surface = c("flat", "saddle", "paraboloid", "ripple"),
amplitude = 0.75,
freq_u = 1,
freq_v = 1,
x_scale = 1,
y_scale = 1,
row_irregularity = 0.2,
col_irregularity = 0.2,
row_phase = 0.35,
col_phase = 0.65,
interior_warp = 0.08,
shear = 0,
min_step_ratio = 0.3
)
irregular.rectangle.surface.graph(
h,
w = h,
surface = c("flat", "saddle", "paraboloid", "ripple"),
amplitude = 0.75,
freq_u = 1,
freq_v = 1,
x_scale = 1,
y_scale = 1,
row_irregularity = 0.2,
col_irregularity = 0.2,
row_phase = 0.35,
col_phase = 0.65,
interior_warp = 0.08,
shear = 0,
min_step_ratio = 0.3,
connectivity = c("orthogonal", "diagonal"),
normalize = c("median", "mean", "none")
)
irregular.rectangle.param.coords() returns an n x 2 numeric
matrix with columns u and v.
irregular.rectangle.surface.embedding() returns an n x 3
numeric matrix with columns x, y, and z.
irregular.rectangle.surface.graph() returns a list with components:
edges: the undirected rectangular-mesh edges,
n: number of vertices,
edge_weights: induced positive edge lengths,
coords_surface: the 3D surface embedding,
coords_param: the irregular 2D parameter coordinates,
coords_regular_param: the underlying regular 2D parameter
coordinates used to define the boundary-vanishing warp,
row_breaks: per-row parameter coordinates in row order,
col_breaks: per-column parameter coordinates in column order,
weight_scale: the normalization constant applied to the raw
edge lengths,
family: always "irregular.rectangle",
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.
Positive horizontal scaling of the parameter domain.
Positive vertical scaling of the parameter domain.
Irregularity level for the row spacing. Must lie in
[0, 1].
Irregularity level for the column spacing. Must lie
in [0, 1].
Finite phase shift for the deterministic row-spacing perturbation.
Finite phase shift for the deterministic column-spacing perturbation.
Non-negative interior warp strength. Must lie in
[0, 1]. The warp vanishes on the boundary.
Finite affine shear applied after the boundary-vanishing warp. Larger values can force a validation error if the mesh cells invert.
Positive lower bound for the perturbed row and column
interval lengths, expressed relative to the unperturbed interval scale.
Must lie in (0, 1].
Surface family used for the lift. One of "flat",
"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".
Mesh neighborhood rule passed to edges.mesh().
Normalization applied to the induced edge lengths. One of
"median", "mean", or "none".
`irregular.rectangle.param.coords()` returns the irregular planar parameter coordinates. `irregular.rectangle.surface.embedding()` lifts those coordinates into \(\mathbb{R}^3\). `irregular.rectangle.surface.graph()` returns a reusable weighted-graph bundle with the induced Euclidean edge lengths.