Wow guys! Thanks for the long and glorious equations! I will have to try them out to see if any of them hold water (pun intended). The thinking behind my equations went something like this: If the water level is less than half the barrel, you can determine the chord length of the water level, and from that draw a triangle from the center of the "circle" to the chord tips, in essence giving you a pie piece. Subtract the area of the triangle from the entire area of the pie piece (calculated by computing the ration of angles between piece of pie to whole pie) and you're left with the cross sectional area of the water. Multiply by the length of the cylinder and you have your volume. This equation didn't work when the barrel was more than half full because the water was now on the opposite side of the chord, if that makes sense. For this scenario, we had a set value for the volume of water for a half full barrel, and then added in the amount of water sitting on top (using a method similar but not identical to equation 1). I'll try to rederive the equations if I can, but they were all done using simple geometry and trig. I'm sure there's away to describe the whole circle at once, using calc, which is probably what you guys did. Thanks again.
|