SpurGear:

--------------------------------------------------------------------------
   Maximum allowable torque and safe horsepower capacity for spur gear.
--------------------------------------------------------------------------
   Form:
   [ Load, Torque, Power ] = SpurGear( d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   d          (1,1)  Data structure
                     .dia        (1,1)  Pitch Diameter (in)
                     .s          (1,1)  Maximum Safe Material Stress (PSI)
                     .f          (1,1)  Face Width (in)
                     .y          (1,1)  Tooth Form Factor
                     .p          (1,1)  Diametral Pitch (teeth/in)
                     .v          (1,1)  Pitch Line Velocity (ft/min)
                     .rpm        (1,1)  Rotations Per Minute

   -------
   Outputs
   -------
   Load       (1,1)  Tooth Load (lbs)
   Torque     (1,1)  Maximum Allowable Torque (lbs*in)
   Power      (1,1)  Power Capacity (Horsepower)

--------------------------------------------------------------------------
   Reference: Lewis Formula, Barth Revision

--------------------------------------------------------------------------