View Single Post
Old 05-13-2004, 05:06 PM   #8 (permalink)
KnifeMissile
 
KnifeMissile's Avatar
 
Location: Waterloo, Ontario
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..
KnifeMissile is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73