Skip to content
Projects

Boundary panels

The equations of simgeometry.panels, declared on the code that implements them and checked by the tests.

boundary_panels

functionsource

The edges of shape.outlines(max_spacing) as Panels.

panels
Pi=[vi,vi+1],ti=vi+1−vi∣vi+1−vi∣,ni=(ti,y,−ti,x)P_i = [v_i, v_{i+1}], \qquad t_i = \frac{v_{i+1} - v_i}{|v_{i+1} - v_i|}, \qquad n_i = (t_{i,y}, -t_{i,x})
Assumes
  • the vertices viv_i of outlines, counter-clockwise, so nin_i, to the right of tit_i, points out of the geometry at outer boundaries and holes alike
  • a closed loop also has the panel back to its first vertex; an open curve has one panel fewer than vertices
  • zero-length edges are dropped; inversion is ignored, as in outlines