Partially Filled Sphere Calculator

<script language="JavaScript"> </script> <script language = JavaScript> var ct=0; var sw=0; var size=0; var rad=0; var caphgt=0; var capvol=0; var caparea=0; var capradius=0; var level=0; var diam=0; var voltotal = 0; var volbottom=0; var areacap=0; var areabot=0; var areatotal=0; var pcempty=0; var pcfull=0; var sigfig=5; var conv=0; var num=new Array(); var lbl=new Array(0," Square Feet"," Square Meters"); var lblnum=0; </script> <script language = JavaScript> function erase(){ document.boxes.s1a.value=""; document.boxes.s2a.value=""; document.boxes.s3a.value=""; document.boxes.s4a.value=""; document.boxes.s5a.value=""; document.boxes.s6a.value=""; document.boxes.s7a.value=""; document.boxes.s8a.value=""; document.boxes.s9a.value=""; } </script> <script language = JavaScript> function calc(boxes) {ct=1; if(sw==1){document.boxes.s0a.value=" Cubic Feet";document.boxes.s0b.value=" Gallons";lblnum=1;conv=7.480518863962546}; if(sw==2){document.boxes.s0a.value=" Cubic Meters";document.boxes.s0b.value=" Liters";lblnum=2;conv=1000}; var level=eval(document.boxes.s1a.value); var rad=eval (document.boxes.s2a.value)/2; var diam=rad*2; areacap=Math.PI*diam*(diam-level); areatotal=Math.PI*diam*diam; areabot=areatotal-areacap; capvol=Math.PI*level*level*(3*rad-(level))/3; num[1]=capvol; voltotal=(4/3)*Math.PI*rad*rad*rad; num[2]=voltotal; volbottom=num[2]-num[1]; num[3]=volbottom; pcfull=100*(num[1]/num[2]); num[4]=pcfull; pcempty=100-num[4]; num[5]=pcempty; num[6]=num[1]*conv; num[7]=num[2]*conv; num[8]=num[3]*conv; num[9]=areabot; num[10]=areacap; num[11]=areatotal; num[12]=100*(areabot/areatotal); num[13]=100*(areacap/areatotal); num[14]=100*((areacap+areabot)/areatotal); sigfig=eval((document.box.b9.value)-1); if (sigfig>-1){ while(ct<15){ num[ct]=num[ct].toExponential(sigfig); if (num[ct]>.001 && num[ct]<1000){num[ct]=num[ct]*1}; ct=ct+1} } document.boxes.s4c.value=""+ num[5]; document.boxes.s3a.value=""+ num[1]; document.boxes.s3b.value=""+ num[6] document.boxes.s5a.value=""+ num[2]; document.boxes.s5b.value=""+ num[7] document.boxes.s4a.value=""+ num[3]; document.boxes.s4b.value=""+ num[8]; document.boxes.s3c.value=""+ num[4]; document.boxes.s6a.value=""+ num[9]; document.boxes.s7a.value=""+ num[10]; document.boxes.s8a.value=""+ num[11]; document.boxes.s6b.value=""+ lbl[lblnum]; document.boxes.s7b.value=""+ lbl[lblnum]; document.boxes.s8b.value=""+ lbl[lblnum]; document.boxes.s6c.value=""+ num[12]+"% Area"; document.boxes.s7c.value=""+ num[13]+"% Area"; document.boxes.s8c.value=" "+ num[14]+" %"; } </script>
>>
>>
The input number unit is? or







Significant Figures >>>
Buy A Calculator On Amazon
var ct=0;
var sw=0;
var size=0;
var rad=0;
var caphgt=0;
var capvol=0;
var caparea=0;
var capradius=0;
var level=0;
var diam=0;
var voltotal = 0;
var