Skip to main content

Module one_forms

Module one_forms 

Source
Expand description

Whitney one-form reconstruction and conversion to GlyphItems.

A one-form assigns a scalar value to each directed edge of a triangle mesh. The value represents the integral of a covector field along that edge.

§Edge ordering convention

For triangle t with vertex indices (v0, v1, v2) from the index buffer:

  • edge_values[3 * t + 0] : value on edge v0 -> v1
  • edge_values[3 * t + 1] : value on edge v1 -> v2
  • edge_values[3 * t + 2] : value on edge v2 -> v0

§Reconstruction formula

The reconstructed vector field at face centroid c of triangle (p0, p1, p2) is the Hodge dual of the discrete one-form (Whitney reconstruction):

F = (w01 · R(e01) + w12 · R(e12) + w20 · R(e20)) / (2 · area)

where eij = pj − pi, R(v) = n × v (90° rotation in the face plane), and area is the signed triangle area (|n_raw| / 2).

Functions§

edge_one_form_to_glyphs
Convert a scalar-per-directed-edge one-form to a GlyphItem via Whitney reconstruction.