Bridging the Gap — a four-person project (December 2025) to design and build a bridge out of 3/8″ poplar sticks that had to carry 400 lb under a cost constraint. I served as Project Manager. Rather than sizing members by hand for each iteration, I wrote a MATLAB optimizer that solves the truss and moves the joints itself. We verified the result in SOLIDWORKS before building.
Four functions do the work. solve_trusses.m is the core: given pin locations, members, supports and loads, it assembles the equilibrium matrix A and solves AU = Loads for the force in every member and every reaction, then computes member lengths and plots the truss with each force labelled.
OptimizeBridge.m moves the joints. Fixed pins stay put so the deck stays level; movable pins are driven by gradient descent, with the gradient taken numerically by finite differences in x and y at every step.
total_length_stress.m is the objective, and it is where most of the thinking went. We wanted short members and low stress, and we cared more about tension than compression, so the objective keeps only positive member forces and weights them by length. Taking a hard maximum made the descent unstable, so we used a softmax instead:
Uplus = max(U, 0)
UL = Uplus .* L
SoftmaxUL = exp(UL) / sum(exp(UL))
objective = 2 · (SoftmaxUL · UL) + (Uplus · L)
The first term punishes the single worst member; the second keeps the whole structure honest. A symmetric variant, OptimizeBridgeSym.m, constrains mirrored pins to move together after we found the optimizer was producing slightly lopsided bridges.
We started with a modified K-type truss but couldn't get a good balance of stiffness and weight. It was also super material cost extensive so a restart of the design was a necessary switch. Switching to a modified Fink truss distributed forces better, stiffened the structure, and cut the bending in it.
To check the optimizer, we rebuilt half the truss in SOLIDWORKS, applied the same loads, and ran a static study. The member forces matched what the MATLAB code predicted, which gave us confidence in the numbers we were sizing to. From those forces, we hand-calculated normal, bearing, and shear stress in every member against poplar’s 38 MPa compressive and 75 MPa tensile strength. Member EF was the critical one at 15.49 MPa normal, 32.82 MPa bearing, and 7.75 MPa shear; the highest-stress connections were rabbeted to increase contact area and bring bearing stress down.
The bridge held 994.4 lb (4425 N) at a self-weight of 244 g and a material cost of $10.17, for a performance index of 187.9 — a top-three result in the class. Failure came from a cross member near mid-span rather than from the member the analysis had flagged as critical, which told us load paths shift as the structure deforms and that cross-member placement, not member sizing, was the remaining thing to improve.
Numbers in the images are ratiod down for visibility.
The modified K-truss we started with, member forces labelled by the solver.
The optimized truss, joint positions found by gradient descent.
Half the truss rebuilt as a static study — member forces matched the MATLAB solver.
The modified truss in SOLIDWORKS before fabrication in poplar.