Skip to contents

edges.occupied.mesh() builds a finite occupied-grid graph on the retained cells of a rectangular occupancy matrix. The corresponding surface helpers lift those occupied cells into \(\mathbb{R}^3\) using the same "saddle", "paraboloid", and "ripple" families used for regular meshes.

Usage

occupied.mesh.surface.embedding(
  keep,
  surface = c("saddle", "paraboloid", "ripple"),
  amplitude = 0.75,
  freq_u = 1,
  freq_v = 1,
  x_scale = 1,
  y_scale = 1
)

occupied.mesh.surface.graph(
  keep,
  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")
)

Arguments

keep

Logical or numeric occupancy matrix. Non-zero entries are kept.

surface

Surface family used for the lift. One of "saddle", "paraboloid", or "ripple".

amplitude

Finite numeric amplitude controlling the non-flat displacement.

freq_u

Positive ripple frequency in the horizontal parameter direction. Used only when surface = "ripple".

freq_v

Positive ripple frequency in the vertical parameter direction. Used only when surface = "ripple".

x_scale

Positive horizontal scaling of the parameter domain.

y_scale

Positive vertical scaling of the parameter domain.

connectivity

Mesh neighborhood rule passed to edges.mesh().

normalize

Normalization applied to the induced edge lengths. One of "median", "mean", or "none".

Value

occupied.mesh.surface.embedding() returns an n x 3 numeric matrix with columns x, y, and z.

occupied.mesh.surface.graph() returns a list with components:

  • edges: the occupied-cell mesh edges,

  • n: number of vertices,

  • edge_weights: induced positive edge lengths,

  • coords_surface: the 3D surface embedding,

  • coords_param: the 2D parameter coordinates,

  • weight_scale: the normalization constant applied to the raw edge lengths,

  • family: always "occupied.mesh",

  • surface: the chosen surface name,

  • connectivity: the chosen occupied-mesh connectivity rule,

  • keep: the logical occupancy matrix,

  • label: a human-readable family label.