Learn R Programming

grip (version 0.3.0)

irregular_pair_of_pants_surface_helpers: Weighted irregular pair-of-pants surface helpers

Description

Convenience 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.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")
)

Value

The coords_surface component is 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.

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".

Examples

Run this code
pair_of_pants <- irregular.pair.of.pants.surface.graph(
  slices = 5, outer.count = 12
)

Run the code above in your browser using DataLab