UPDATE: See the finished product by Rich Cannon here

Type the name of a variable ('R', 'r', 'z' or 'h') to select it for editing.
To change the value of the selected variable, click and drag the mouse,
or use the following keys for fine tuning:
   '.' (increase by 0.01)
   '>' (increase by 0.001)
   '<' (decrease by 0.001)
   ',' (decrease by 0.01)
The 'z' variable represents the full hub width, so that the distance from
the center plane of the wheel to where the spokes attach on one side is z/2.

Source code: EggBike

Built with Processing