You said
pi x (rxr) x h
pi=approx 3.14
r= distance between facing sides
h=height
typically r describes radius but what you have up there describes diameter.
also the formula there is the forumula for a circular aquarium also pi·r^2·h It will be very close, but I dont think it will be exact.
You can probly find a better forumula but I just drew this one up. You need to know:
x=length of one pannel of the aquarium
d=The distance from one flat side to another
Area = d^2 * 2((x+d)/2)^2
If you measure in inches, the answer is in cubic inches. To make cubic inches into gallons, divide by 231 for cubic cm into gallons, divide by 3 785.4
Hope this helps, if you cant do it yourself post the dimensions i'm sure someone will help ya.
If you just treat it like a circle, you will have a much more simple formula, but the result will be a bit off (but not too far)