I made a solver program to determine the length of the spoke you need when building bicycle wheels. It should be accurate to a millimeter or two.
Variables:
- SPOKES: Number of spokes on the wheel
- CROSS: Number of spokes that a spoke crosses / is interlaced with on the same side
- RIMD: The effective rim diameter (ERD) in millimeters.
- HUBD: The diameter of the hub / flange in millimeters. (Distance from one spoke nipple hole to a hole diametrically opposed.)
- HUBW: The distance from the center of the hub to the flange where the nipple holes are. (Along the axis of the axle. This will generally vary per side for rear wheels, but be the same for each side for front wheels.)
- LEN: Length of the spoke in millimeters.
This program assumes a spoke diameter of 2.4 mm, which is pretty standard.
Code: Select all
00 { 126-Byte Prgm }
01▸LBL "SPOKE"
02 MVAR "SPOKES"
03 MVAR "CROSS"
04 MVAR "RIMD"
05 MVAR "HUBD"
06 MVAR "HUBW"
07 MVAR "LEN"
08 720
09 RCL "CROSS"
10 ×
11 RCL "SPOKES"
12 ÷
13 STO "T"
14 COS
15 RCL "RIMD"
16 ×
17 RCL "HUBD"
18 -
19 2
20 ÷
21 X^2
22 RCL "T"
23 SIN
24 RCL "RIMD"
25 ×
26 2
27 ÷
28 X^2
29 +
30 RCL "HUBW"
31 X^2
32 +
33 SQRT
34 RCL "LEN"
35 -
36 1.2
37 -
38 END