Okay, I will now agree with CSflim's formula, as convoluted as it is. I have an alternate formula (using different choices of identities) and will display both his and mine for comparison (not that mine's any simpler)...
If x is the depth, r the radius and L the length, then the volume V is:
V = L*r<sup>2</sup> * ( arccos((r-x)/r) - sin( 2*arccos((r-x)/r) )/2 )
V = L*r * ( r*arccos((r-x)/r) - 2(r-x)*sin( arccos((r-x)/r) ) )
or, you can simplify it in a two step formula:
z = arccos((r-x)/r)
V = L*r<sup>2</sup> * ( z - sin( 2*z )/2 )
V = L*r * ( r*z - 2(r-x)*sin(z) )
Ah, isn't arcos nice...
So, what were those two formulas, again?
Last edited by KnifeMissile; 05-19-2004 at 05:41 PM..
|