How does the number in stellar classification indicate properties within the range of that class? I am doing some research for a video game and I wanted to store stellar data on a star, such as its Stellar Classification, and then from that derive a physical appearance in the game.  These are fictional stars.

My original thought had been to store the star's classification, For example G2V and then at runtime I could use that data to determine things like surface temperature, brightness, radius, and mass.  From temperature I can also derive color.

However when I sat down to start coding a first pass on this I noticed something that confused me.

According to Wikipedia, our Sun, Sol, is a G2V star.  The number is supposed to indicate a "sub" classification.  A G2 star would be 20% between a G star and a K star.  A table there lists a G type star as having a surface temperature between 5,200 K and 6,000 K.  Therefore I figured a G2 star would have a temperature of about (I know nothing here is EXACT) 5,360 K (20% of the way between 5,200 and 6,000) but apparently it actually has a temperature of 5,800 K which is about 75% between the given range.  So why is Sol not a G7 of G8 star?

And then once I hit that irregularity, I had to assume that things like Radius and Mass are probably also not linearly interpolated along the range.

Is there a feasible way to derive properties such as I am looking at based on the Stellar Classification?
Here is a table taken from the models of Siess et al. (2000). It is appropriate for zero age main sequence stars of about the solar metallicity. Note that any correspondence between spectral type, mass and radius will be age dependent.

You can generate tables for different metallicities, or get more detailed information at http://www.astro.ulb.ac.be/~siess/pmwiki/pmwiki.php?n=WWWTools.Isochrones

Computation of the ZAMS
Metallicity : Z = 0.02 , no overshooting

 ST       L         R        Teff     Mass     age       Bol    BC     B-V    V-R    V-I    Mu     Mv     Mb     Mr     Mi     Mj     Mh     Mk     Ml  flag  check

 M6   8.290E-04  1.137E-01   2781.   0.100  2.270E+10  12.45  -5.97   2.28   2.76   5.68  22.15  18.42  20.70  15.66  12.75  10.49   9.77   9.32   8.85   1     1

 M5   6.689E-03  2.187E-01   3300.   0.200  1.785E+08  10.19  -2.95   1.72   1.37   3.15  16.12  13.14  14.85  11.76   9.99   8.33   7.72   7.42   7.16   0     0

 M3   1.488E-02  2.950E-01   3528.   0.300  1.343E+08   9.32  -1.88   1.54   1.05   2.33  13.94  11.20  12.73  10.14   8.86   7.64   7.00   6.77   6.59   0     0

 M2   2.656E-02  3.612E-01   3683.   0.400  1.120E+08   8.69  -1.51   1.48   0.96   2.03  12.89  10.20  11.68   9.24   8.17   7.10   6.43   6.23   6.08   0     0

 M1   4.633E-02  4.293E-01   3829.   0.500  1.019E+08   8.09  -1.24   1.43   0.90   1.82  11.98   9.32  10.75   8.42   7.51   6.56   5.88   5.71   5.58   0     0

 M0   8.292E-02  5.215E-01   4008.   0.600  8.320E+07   7.45  -1.05   1.37   0.86   1.67  11.08   8.50   9.87   7.64   6.83   5.97   5.31   5.16   5.04   0     0

 K6   1.481E-01  6.369E-01   4287.   0.700  6.587E+07   6.82  -0.75   1.21   0.75   1.39   9.88   7.57   8.78   6.83   6.18   5.40   4.79   4.67   4.56   0     0

 K4   2.804E-01  7.561E-01   4698.   0.800  5.212E+07   6.13  -0.51   1.00   0.60   1.11   8.47   6.64   7.64   6.04   5.54   4.82   4.27   4.17   4.08   0     0

 K2   4.877E-01  8.656E-01   5047.   0.900  4.173E+07   5.53  -0.38   0.86   0.51   0.94   7.35   5.91   6.77   5.40   4.96   4.36   3.88   3.79   3.73   0     0

 K0   8.102E-01  9.973E-01   5334.   1.000  3.326E+07   4.98  -0.30   0.80   0.45   0.85   6.48   5.28   6.07   4.82   4.43   3.90   3.46   3.39   3.33   0     0

 G8   1.297E+00  1.166E+00   5556.   1.100  2.653E+07   4.47  -0.25   0.73   0.42   0.80   5.72   4.71   5.44   4.30   3.91   3.44   3.04   2.97   2.92   0     0

 G5   2.004E+00  1.332E+00   5788.   1.200  2.214E+07   4.00  -0.21   0.65   0.39   0.75   5.02   4.20   4.85   3.82   3.45   3.06   2.71   2.65   2.60   0     0

 G0   2.946E+00  1.476E+00   6070.   1.300  1.915E+07   3.58  -0.18   0.56   0.35   0.70   4.33   3.75   4.32   3.41   3.05   2.71   2.41   2.36   2.31   0     0

 F7   4.281E+00  1.656E+00   6284.   1.400  1.617E+07   3.17  -0.16   0.49   0.31   0.62   3.82   3.33   3.82   3.02   2.71   2.38   2.08   2.04   2.00   0     0

 F5   6.065E+00  1.848E+00   6498.   1.500  1.370E+07   2.79  -0.14   0.41   0.27   0.53   3.33   2.93   3.34   2.66   2.40   2.13   1.90   1.86   1.82   0     0

 F3   8.117E+00  1.968E+00   6770.   1.600  1.196E+07   2.48  -0.12   0.37   0.24   0.48   2.97   2.59   2.96   2.35   2.12   1.91   1.73   1.70   1.67   0     0

 F1   1.087E+01  2.062E+00   7120.   1.700  1.031E+07   2.16  -0.10   0.32   0.21   0.43   2.61   2.26   2.58   2.05   1.83   1.70   1.56   1.53   1.50   0     0

 A9   1.405E+01  2.129E+00   7476.   1.800  9.064E+06   1.88  -0.10   0.25   0.15   0.35   2.29   1.98   2.23   1.83   1.64   1.51   1.41   1.38   1.35   0     0

 A8   1.784E+01  2.202E+00   7832.   1.900  8.004E+06   1.62  -0.12   0.20   0.10   0.27   2.02   1.74   1.93   1.63   1.47   1.34   1.26   1.23   1.20   0     0

 A7   2.226E+01  2.268E+00   8176.   2.000  7.125E+06   1.38  -0.13   0.17   0.08   0.21   1.77   1.51   1.68   1.43   1.30   1.17   1.10   1.07   1.04   0     0

 A3   3.330E+01  2.395E+00   8824.   2.200  5.731E+06   0.94  -0.19   0.08   0.03   0.07   1.26   1.13   1.21   1.10   1.06   0.97   0.95   0.94   0.93   0     0

 A0   5.441E+01  2.512E+00   9705.   2.500  4.298E+06   0.41  -0.38  -0.02   0.00  -0.03   0.73   0.80   0.78   0.80   0.82   0.84   0.85   0.86   0.87   0     0

 A0   7.341E+01  2.618E+00  10241.   2.700  3.595E+06   0.09  -0.49  -0.04  -0.01  -0.05   0.42   0.57   0.53   0.58   0.63   0.68   0.70   0.72   0.73   0     0

 B9   1.059E+02  2.720E+00  11048.   3.000  2.815E+06  -0.31  -0.63  -0.07  -0.01  -0.07   0.06   0.32   0.26   0.34   0.40   0.49   0.53   0.55   0.58   0     0

 B8   1.843E+02  2.940E+00  12094.   3.500  1.944E+06  -0.91  -0.82  -0.09  -0.02  -0.09  -0.48  -0.09  -0.19  -0.08   0.00   0.15   0.19   0.23   0.26   0     0

 B7   3.172E+02  3.240E+00  13208.   4.000  1.387E+06  -1.50  -1.06  -0.11  -0.02  -0.09  -0.97  -0.45  -0.56  -0.42  -0.35  -0.15  -0.10  -0.04  -0.02   0     0

 B6   6.822E+02  3.530E+00  15334.   5.000  7.917E+05  -2.33  -1.45  -0.14  -0.04  -0.11  -1.61  -0.89  -1.03  -0.85  -0.78  -0.53  -0.47  -0.37  -0.40   0     0

 B4   1.343E+03  3.910E+00  17291.   6.000  4.852E+05  -3.07  -1.75  -0.17  -0.05  -0.14  -2.17  -1.32  -1.48  -1.26  -1.18  -0.91  -0.83  -0.73  -0.75   0     0

 B3   2.366E+03  4.320E+00  19281.   7.000  3.223E+05  -3.69  -2.06  -0.20  -0.07  -0.17  -2.60  -1.62  -1.82  -1.55  -1.46  -1.14  -1.05  -0.97  -0.95   0     0


The ZAMS is defined as the time, after deuterium burning, when Lnucl > 0.99 L (i.e. Lgrav &lt; 0.01 L)

L,R and M are expressed in solar units, Teff in K

Bol represents the bolometric magnitude
Colors are given in the Cousins system. We used the conversion table of Kenyon et al. (1994, AJ, 108, 251)
check = 1 means that the colors are out of the table and have been extrapolated
flag  = 1 means that the request was not successful. The data corresponds to the last entry found in the file