Find the ideal spoke length for a bicycle wheel build.
A spoke runs from a hole in the hub flange out to a hole in the rim. Because the flange is offset sideways from the rim's plane and the spoke is angled tangentially to cross its neighbours, the spoke is the space-diagonal of a small 3D triangle. Its length is:
The square-root term is the straight-line distance between the two holes, derived from the law of cosines applied in three dimensions: the tangential angle θ separates the flange and rim holes around the axle, while d accounts for the sideways flange offset. Subtracting h gives the length measured to where the spoke actually seats in the flange. For a radial build (k = 0) the formula collapses to √(d² + (R − r)²) — simple Pythagoras.