Weighted irregular pair-of-pants surface helpers
Source:R/graph_helpers.R
irregular_pair_of_pants_surface_helpers.RdConvenience helpers that build a pair-of-pants domain from deterministically irregular horizontal slices, sample each surviving slice interval with varying point counts, and stitch adjacent slices into a locally triangulated surface-with-boundary graph. The resulting irregular planar parameterization can then be lifted into \(\mathbb{R}^3\) using the same planar surface families as the triangulated annulus and irregular annulus helpers.
Usage
irregular.pair.of.pants.surface.embedding(
slices = 11,
outer_count = 28,
outer_radius = 1.1,
hole_radius = 0.24,
hole_offset = 0.38,
hole_height = 0.18,
count_irregularity = 0.2,
vertical_irregularity = 0.35,
phase_twist = 0.35,
surface = c("flat", "saddle", "paraboloid", "ripple", "folded"),
amplitude = 0.6,
freq_u = 1,
freq_v = 1
)
irregular.pair.of.pants.surface.graph(
slices = 11,
outer_count = 28,
outer_radius = 1.1,
hole_radius = 0.24,
hole_offset = 0.38,
hole_height = 0.18,
count_irregularity = 0.2,
vertical_irregularity = 0.35,
phase_twist = 0.35,
surface = c("flat", "saddle", "paraboloid", "ripple", "folded"),
amplitude = 0.6,
freq_u = 1,
freq_v = 1,
normalize = c("median", "mean", "none")
)Arguments
- slices
Number of horizontal sample slices through the pair-of-pants domain.
- outer_count
Approximate number of vertices across the widest slices.
- outer_radius
Positive outer boundary radius.
- hole_radius
Positive radius of each interior hole.
- hole_offset
Positive horizontal offset of the two hole centers.
- hole_height
Shared vertical coordinate of the two hole centers.
- count_irregularity
Irregularity level for the per-slice sample counts. Must lie in
[0, 1).- vertical_irregularity
Irregularity level for slice spacing. Must lie in
[0, 1].- phase_twist
Finite phase offset used to desynchronize neighboring slice samples.
- surface
Geometry family used for the 3D lift. One of
"flat","saddle","paraboloid","ripple", or"folded".- amplitude
Finite deformation amplitude.
- freq_u
Positive ripple frequency in the first planar coordinate. Used only when
surface = "ripple".- freq_v
Positive ripple frequency in the second planar coordinate. Used only when
surface = "ripple".- normalize
Normalization applied to the induced edge lengths. One of
"median","mean", or"none".
Value
irregular.pair.of.pants.surface.embedding() returns an n x 3
numeric matrix with columns x, y, and z.
irregular.pair.of.pants.surface.graph() returns a list with
components:
edges: the irregular pair-of-pants edges,n: number of vertices,edge_weights: induced positive edge lengths,coords_surface: the 3D embedding,coords_param: the irregular planar pair-of-pants coordinates,weight_scale: the normalization constant applied to the raw edge lengths,family: always"irregular.pair.of.pants",surface: the chosen surface name,slices: number of horizontal sample slices,slice_sizes: vertex counts in each slice,slice_components: number of connected slice intervals in each slice,label: a human-readable family label.