Welcome to MFK!
The height you need to use is the distance from the lowest point that water can be viewed at the bottom, to the highest point the water reaches in the tank, (whether viewable, unviewable or supported) at the top. So, the distance from the water surface to the viewable water at the bottom.
For 31" tall, 1/2" glass will be unsafe. It should be 3/4" although, with new, high quality glass, very good bracing, and perhaps luck, one can possibly get by with 15 mm. For 28" tall, 13 mm will provide a minimum safety factor (2.5), although for a tank that size, I'd be looking for the more common target of 3.4, which would be 16 mm.
Using low quality or previously used glass (especially store front or office window glass), would invalidate those numbers as the glass is likely to contain microfractures from mishandling or simply repeated temperature fluctuations.
Imo, the larger the tank, and thus the greater amount of damage the release of water might cost, the greater the need to hit the more common target of 3.5.
Not being an engineer, I have no information on annealed glass being used in the manner you've described. Apparently, most people don't use it, which makes me wonder if it's unsuitable doe to clarity, availability or strength, or perhaps, some combination or all three.