Skip to content

Many ways to express geometry

The only thing the solver sees is the edge list from build_wires(). How you produce that list is entirely up to you — and there is rarely one right way. To make that concrete, here is one delta loop, one knob-set, laid out four ways — from writing every corner as coordinates to flying the whole shape with a Drone.

Every one exposes the same three knobs and produces byte-identical wires:

  • base — the top-edge height, where you hang it;
  • length_factor — the total wire length in wavelengths (resonant near ~1);
  • angle_deg — the slant tilt from horizontal.

So this isn’t a tour of parameterizations — the knobs never change. It’s a tour of geometry construction: the four builds differ only in how they lay the wires to hit the same corners.

A delta loop is a triangle fed by a short gap at the bottom:

B-----------A top corner A (the one that "needs trig")
\ /
\ / two equal slanted sides
\ /
T~~~~S short driven feed gap at the bottom

Only the first build (delta_loop) sizes the loop in closed form (a direct formula for the top corner); the three drone builds have no such formula, so each solves the side length with brentq until the total wire hits length_factor * wavelength.

delta_loop — the reference that defines the knobs, and the version the catalog ships. Write the four corners down directly: a closed-form expression for the top corner’s y sizes the loop straight from the total wire length, and the top is anchored at base.

y = (cos(t) * (d - 2 * eps) + 2 * eps) / (2 * (cos(t) + 1)) # top corner's y (half the top width), from perimeter d
S = (0, eps, base - (y - eps) * tan(t)) # right feed terminal
A = (0, y, base) # top-right corner, anchored at base
B, T = ry(A), ry(S) # left half mirrors y = 0

Every corner is on the page. No solve, no flight — just coordinates from the one closed form. The other three reach these same corners without writing them.

The Drone is a pen-carrying 3D turtle. It carries a pose (position + orientation as a single homogeneous transform) and compiles to the same edge list build_wires() returns:

VerbWhat it does
pay_out() / cut()pen down / up (start / stop laying structural wire)
feed(excitation)like pay_out, but the wire is the driven segment
forward(dist) / jump(dist)fly along the nose, with / without laying wire
forward_to_plane(plane)fly along the nose until the path meets plane=(nx, ny, nz, d) (distance solved, not given) — trims a leg to a boundary
forward_through_plane(plane)fly through plane to an equal distance past it — lands on the mirror across a symmetry plane, no length computed
yaw / pitch / rollturn in the body frame (degrees)
face(heading, up)point the nose along heading (handy to start a planar figure)
mark(label) / line_to(label)pin a node, then lay a wire straight to it
close()fly back to where the current stroke began

Because orientation is a single rotation matrix, the Drone composes with the existing Transform machinery and has no gimbal-lock failure in the representation itself.