<!-- GEOMETRIC PROPERTIES OF TRIANGLE --> <!-- This goes in the HEAD of the html file --> <script language="JavaScript" type="text/javascript"> <!-- Copyright 2001, Sandeep Gangadharan --> <!-- For more free scripts go to http://sivamdesign.com/scripts/ --> <!-- function getProp() { var A = document.prop.A.value; var B = document.prop.B.value; var C = document.prop.C.value; var S = (parseInt(A) + parseInt(B) + parseInt(C)) / 2; var Z = parseInt((A*A)+(B*B)-(C*C))/parseInt(2*A*B); document.prop.area.value = Math.round(Math.sqrt(S*(S-A)*(S-B)*(S-C)) * 10000) / 10000; document.prop.lic.value = Math.round(Math.PI * (document.prop.area.value/S) * (document.prop.area.value/S) * 10000) / 10000; document.prop.sic.value = Math.round(Math.PI * ((A*B*C)/(4*(document.prop.area.value))) * ((A*B*C)/(4*(document.prop.area.value))) * 10000) / 10000; document.prop.ang.value = Math.round(Math.atan(Math.sqrt((1/(Z * Z))-1)) * (180/Math.PI) * 10000) / 10000; } //--> </script> <!-- This goes in the BODY of the html file --> <body> <table border="0" cellpadding="4" cellspacing="0" bgcolor="#cccccc"> <form name="prop"> <tr> <td bgcolor="#000080" colspan="4"> <font face="ms sans serif, arial, helvetica, sans-serif" size="1" color="#ffffff"><b>Geometric Properties of Triangle</b></font> </td> </tr> <tr> <td> <font face="verdana, arial, helvetica, sans-serif" size="1"><b>Side A: </b></font> </td> <td> <input type="text" size="4" name="A" style="font-size: 9pt" /> </td> <td> <font face="verdana, arial, helvetica, sans-serif" size="1"><b>Area of Triangle: </b></font> </td> <td> <input type="text" size="8" name="area" style="font-size: 9pt" /> </td> </tr> <tr> <td> <font face="verdana, arial, helvetica, sans-serif" size="1"><b>Side B: </b></font> </td> <td> <input type="text" size="4" name="B" style="font-size: 9pt" /> </td> <td> <font face="verdana, arial, helvetica, sans-serif" size="1"><b>Area of Largest Inscribed Circle: </b></font> </td> <td> <input type="text" size="8" name="lic" style="font-size: 9pt" /> </td> </tr> <tr> <td> <font face="verdana, arial, helvetica, sans-serif" size="1"><b>Side C: </b></font> </td> <td> <input type="text" size="4" name="C" style="font-size: 9pt" /> </td> <td> <font face="verdana, arial, helvetica, sans-serif" size="1"><b>Area of Smallest Inscribed Circle: </b></font> </td> <td> <input type="text" size="8" name="sic" style="font-size: 9pt" /> </td> </tr> <tr> <td> <input type="reset" value="Reset" style="font-size: 9pt" onClick="reset()" /> </td> <td> <input type="button" value="Compute" style="font-size: 9pt" onClick="getProp()" /> </td> <td> <font face="verdana, arial, helvetica, sans-serif" size=1"><b>Angle between A and B: </b></font> </td> <td> <input type="text" size="8" name="ang" style="font-size: 9pt" /> </td> </tr> </form> </table>