Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sunrise-fixbug-properties_of_incenters #577

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
203 changes: 110 additions & 93 deletions exercises/properties_of_incenters.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,74 +15,60 @@
}
</style>
<script>
function chg()
{
for(var i=2;i<=5;i++)
{
var ran=10*Math.random();
if(ran>5)
{
var name="t"+i;
document.getElementById(name).style.display="none";
}
function chg() {
for( var i = 2; i <= 5; i++ ) {
var ran = 10 * Math.random();
if( ran > 5 ) {
var name = "t" + i;
document.getElementById(name).style.display = "none";
}
}
}
function chg2()
{
for(var i=2;i<=6;i++)
{
var ran=10*Math.random();
if(ran>5)
{
var name="t"+i;
document.getElementById(name).style.display="none";
}

function chg2() {
for( var i = 2; i <= 6; i++ ) {
var ran = 10 * Math.random();
if( ran > 5 ) {
var name = "t" + i;
document.getElementById(name).style.display = "none";
}
}
}
function chg4()
{
for(var i=2;i<=9;i++)
{
var ran=10*Math.random();
if(ran>5)
{
var name="t"+i;
document.getElementById(name).style.display="none";
}

function chg4() {
for( var i = 2; i <= 9; i++ ) {
var ran = 10 * Math.random();
if( ran > 5 ) {
var name = "t" + i;
document.getElementById(name).style.display = "none";
}
}
}

function judge(co,rig,num)
{
if(co.length!=num)
function judge( co, rig, num ) {
if( co.length != num ) {
return false;
var c= new Array();
var ri= new Array();
c=co.split("");
ri=rig.split("");
var k="";
for(var i=0;i<num;i++)
{
var j=i;
for(;j<num;j++)
{//alert(i+","+j+","+c[i]+","+ri[0]+","+ri[1]+","+ri[2]+";");
if(c[i]==ri[j])
{

k=ri[i];
ri[i]=ri[j];
ri[j]=k;
break;
}
}
if(j>=num)
{

return false;
}
var c = new Array();
var ri = new Array();
c = co.split("");
ri = rig.split("");
var k= "";
for( var i = 0; i < num; i++ ) {
var j = i;
for(; j < num; j++ ) {
if( c[ i ] == ri[ j ] ) {
k = ri[ i ];
ri[ i ] = ri[ j ];
ri[ j ] = k;
break;
}
}
if( j >= num ) {
return false;
}
}

return true;
return true;
}
</script>
</head>
Expand Down Expand Up @@ -285,12 +271,16 @@
</div>
<p>請在下面空格填入適當的答案</p>
<p>連接 <code>\overline{OA}</code> 、<code>\overline{OB}</code> 、<code>\overline{OC}</code> ,由於</p>
<p><code>\Delta OAB</code> 面積 <code> = <var>decimalFraction(1/2,true,true,false,false)</var> \times \overline{AB} \times </code> <code data-if="t1.style.display!='none'">線段</code> <input type="text" id="t1" style="width: 50px ; display: " ><code data-if="t1.style.display=='none'">\overline{OF}</code><code>= <var>decimalFraction(1/2,true,true,false,false)</var> \times \overline{AB} \times d</code></p>
<p><code>\Delta OBC</code> 面積 <code> = <var>decimalFraction(1/2,true,true,false,false)</var> \times \overline{BC} \times </code> <code data-if="t2.style.display!='none'">線段</code> <input type="text" id="t2" style="width: 50px ; display:" ><code data-if="t2.style.display=='none'">\overline{OD}</code><code>= <var>decimalFraction(1/2,true,true,false,false)</var> \times \overline{BC} \times d</code></p>
<p><code>\Delta OCA</code> 面積 <code> = <var>decimalFraction(1/2,true,true,false,false)</var> \times </code> <code data-if="t3.style.display!='none'">線段</code><input type="text" id="t3" style="width: 50px ; display:" ><code data-if="t3.style.display=='none'">\overline{CA}</code> <code>\times \overline{OE} = <var>decimalFraction(1/2,true,true,false,false)</var> \times \overline{CA} \times d</code></p>
<p><code>\Delta OAB</code> 面積 </p>
<p><code> = <var>decimalFraction(1/2,true,true,false,false)</var> \times \overline{AB} \times </code> <span style="border-top: 1px solid #000; padding: 5px 0px 0 0px; margin-left: -1px;"><input type="text" id="t1" style="width: 50px ; display: " ></span><code data-if="t1.style.display=='none'">\overline{OF}</code><code>= <var>decimalFraction(1/2,true,true,false,false)</var> \times \overline{AB} \times d</code></p>
<p><code>\Delta OBC</code> 面積 </p>
<p><code> = <var>decimalFraction(1/2,true,true,false,false)</var> \times \overline{BC} \times </code> <span style="border-top: 1px solid #000; padding: 5px 0px 0 0px; margin-left: -1px;"><input type="text" id="t2" style="width: 50px ; display:" ></span><code data-if="t2.style.display=='none'">\overline{OD}</code><code>= <var>decimalFraction(1/2,true,true,false,false)</var> \times \overline{BC} \times d</code></p>
<p><code>\Delta OCA</code> 面積 <p>
<p><code> = <var>decimalFraction(1/2,true,true,false,false)</var> \times </code> <span style="border-top: 1px solid #000; padding: 5px 0px 0 0px; margin-left: -1px;"><input type="text" id="t3" style="width: 50px ; display:" ></span><code data-if="t3.style.display=='none'">\overline{CA}</code> <code>\times \overline{OE} = <var>decimalFraction(1/2,true,true,false,false)</var> \times \overline{CA} \times d</code></p>
<p>三式連加,可得</p>
<p><code>\Delta ABC </code> 面積 <code>= \Delta </code> <input type="text" id="t4" style="width: 40px ; display: " ><code data-if="t4.style.display=='none'">OAB</code> 面積 <code>+ \Delta OBC</code> 面積 <code>+ \Delta</code> <input type="text" id="t5" style="width: 40px ; display: " ><code data-if="t5.style.display=='none'">OCA</code> 面積
<code>=<var>decimalFraction(1/2,true,true,false,false)</var>\times (</code> <code data-if="t6.style.display!='none'">線段</code> <input type="text" id="t6" style="width: 40px ; display: " ><code data-if="t6.style.display=='none'">\overline{AB}</code><code>+\overline{BC}+\overline{CA})\times d </code> </p>
<p><code>\Delta ABC </code> 面積 </p>
<p><code>= \Delta </code> <input type="text" id="t4" style="width: 40px ; display: " ><code data-if="t4.style.display=='none'">OAB</code> 面積 <code>+ \Delta OBC</code> 面積 <code>+ \Delta</code> <input type="text" id="t5" style="width: 40px ; display: " ><code data-if="t5.style.display=='none'">OCA</code> 面積
<code>=<var>decimalFraction(1/2,true,true,false,false)</var>\times (</code> <span style="border-top: 1px solid #000; padding: 5px 0px 0 0px; margin-left: -1px;"><input type="text" id="t6" style="width: 40px ; display: " ></span><code data-if="t6.style.display=='none'">\overline{AB}</code><code>+\overline{BC}+\overline{CA})\times d </code> </p>

</div>
<div class="solution" data-type="multiple">
Expand Down Expand Up @@ -354,8 +344,9 @@
<p><code>\Delta OBC</code> 面積 <code> = <var>decimalFraction(1/2,true,true,false,false)</var> \times \overline{BC} \times </code><code class="hint_pink">\overline{OD}</code><code>= <var>decimalFraction(1/2,true,true,false,false)</var> \times \overline{BC} \times d</code></p>
<p><code>\Delta OCA</code> 面積 <code> = <var>decimalFraction(1/2,true,true,false,false)</var> \times </code><code class="hint_pink">\overline{CA}</code><code>\times \overline{OE} = <var>decimalFraction(1/2,true,true,false,false)</var> \times \overline{CA}\times d</code></p>
<p>三式連加,可得</p>
<p><code>\Delta ABC </code> 面積 <code>=</code><code class="hint_pink"> \Delta OAB</code> 面積 <code>+ \Delta OBC</code> 面積 <code>+</code><code class="hint_pink"> \Delta OCA</code> 面積
<code>=<var>decimalFraction(1/2,true,true,false,false)</var>\times ( </code><code class="hint_pink">\overline{AB}</code><code>+\overline{BC}+\overline{CA})\times d </code> </p>
<p><code>\Delta ABC </code> 面積<p>
<p> <code>=</code><code class="hint_pink"> \Delta OAB</code> 面積 <code>+ \Delta OBC</code> 面積 <code>+</code><code class="hint_pink"> \Delta OCA</code> 面積 </p>
<p><code>=<var>decimalFraction(1/2,true,true,false,false)</var>\times ( </code><code class="hint_pink">\overline{AB}</code><code>+\overline{BC}+\overline{CA})\times d </code> </p>
<p><code>\Delta ABC </code> 面積 <code> = <var>decimalFraction(1/2,true,true,false,false)</var>\times \Delta ABC </code> 周長 <code>\times d</code> 。</p>
</div>

Expand Down Expand Up @@ -392,9 +383,9 @@
</div>
</div>
<div class="solution" data-type="multiple">
<p> <code>\Delta ABC</code> 的面積 <code>=</code><span class="sol" data-type="rational"><var>S</var></span><span style="font: 150% Arial; padding: 0 0 0 5px;">√</span>
<p> <code>\Delta ABC</code> 的面積 <code>=</code><br /><span class="sol" data-type="rational"><var>S</var></span><span style="font: 150% Arial; padding: 0 0 0 5px;">√</span>
<span style="border-top: 1px solid #000; padding: 6px 1px 0 3px; margin-left: -1px;"><input type="text" style="width:30px" id="sqrtPart"></span></p>
<p> <code>O</code> 到各邊的距離 <code>=</code><span class="sol" data-type="rational"><var>D</var></span><span style="font: 150% Arial; padding: 0 0 0 5px;">√</span>
<p> <code>O</code> 到各邊的距離 <code>=</code><br /><span class="sol" data-type="rational"><var>D</var></span><span style="font: 150% Arial; padding: 0 0 0 5px;">√</span>
<span style="border-top: 1px solid #000; padding: 6px 1px 0 3px; margin-left: -1px;"><input type="text" style="width:30px" id="sqrtPart1"></span></p>
<div class="sol" data-type="custom">
<div class="guess">document.getElementById("sqrtPart").value</div>
Expand Down Expand Up @@ -492,66 +483,80 @@
<div class="validator-function">
if(document.getElementById("t1").style.display=="")
{
if(document.getElementById("t1").value.replace(/\s+/g,"")=="AE"||document.getElementById("t1").value.replace(/\s+/g,"")=="EA")
if($('#t1').val().replace(/\s+/g,"").split('').sort().join("")=="AE")
{}
else
else{
return false;
}
}
if(document.getElementById("t2").style.display=="")
{
if(document.getElementById("t2").value.replace(/\s+/g,"")=="BF"||document.getElementById("t2").value.replace(/\s+/g,"")=="FB")
if($('#t2').val().replace(/\s+/g,"").split('').sort().join("")=="BF")
{}
else
else{
return false;
}
}
if(document.getElementById("t3").style.display=="")
{
if(document.getElementById("t3").value.replace(/\s+/g,"")=="CG"||document.getElementById("t3").value.replace(/\s+/g,"")=="GC")
if($('#t3').val().replace(/\s+/g,"").split('').sort().join("")=="CG")
{}
else
else{
return false;
}
}
if(document.getElementById("t4").style.display=="")
{
if(document.getElementById("t4").value.replace(/\s+/g,"")=="DH"||document.getElementById("t4").value.replace(/\s+/g,"")=="HD")
if($('#t4').val().replace(/\s+/g,"").split('').sort().join("")=="DH")
{}
else
else{
return false;
}
}
if(document.getElementById("t5").style.display=="")
{
if(document.getElementById("t5").value.replace(/\s+/g,"")=="AH"||document.getElementById("t5").value.replace(/\s+/g,"")=="HA")
if($('#t5').val().replace(/\s+/g,"").split('').sort().join("")=="AH")
{}
else
else{
return false;
}
}
if(document.getElementById("t6").style.display=="")
{
if(document.getElementById("t6").value.replace(/\s+/g,"")=="BF"||document.getElementById("t6").value.replace(/\s+/g,"")=="FB")
if($('#t6').val().replace(/\s+/g,"").split('').sort().join("")=="BF")
{}
else
else{
return false;
}
}
if(document.getElementById("t7").style.display=="")
{
if(document.getElementById("t7").value.replace(/\s+/g,"")=="DG"||document.getElementById("t7").value.replace(/\s+/g,"")=="GD")
if($('#t7').val().replace(/\s+/g,"").split('').sort().join("")=="DG"||$('#t7').val().replace(/\s+/g,"").split('').sort().join("")=="CG")
{}
else
else{
return false;
}
}
if(document.getElementById("t8").style.display=="")
{
if(document.getElementById("t8").value.replace(/\s+/g,"")=="CG"||document.getElementById("t8").value.replace(/\s+/g,"")=="GC")
if($('#t8').val().replace(/\s+/g,"").split('').sort().join("")=="CG"||$('#t8').val().replace(/\s+/g,"").split('').sort().join("")=="DG")
{}
else
else{
return false;
}
}
if(document.getElementById("t7").style.display=="" &amp;&amp; document.getElementById("t8").style.display==""){
if($('#t7').val().replace(/\s+/g,"").split('').sort().join("") == $('#t8').val().replace(/\s+/g,"").split('').sort().join("")){
return false;
}
}
if(document.getElementById("t9").style.display=="")
{
if(document.getElementById("t9").value.replace(/\s+/g,"")=="AB"||document.getElementById("t3").value.replace(/\s+/g,"")=="BA")
if($('#t9').val().replace(/\s+/g,"").split('').sort().join("")=="AB")
{}
else
else{
return false;
}
}
return true;

Expand Down Expand Up @@ -584,12 +589,24 @@

</div>
<p>設四邊形 <code>ABCD</code> 和圓 <code>O</code> 切於 <code>E</code> 、 <code>F</code> 、<code>G</code> 、<code>H</code> 四點。</p>
<p>由於 <code>\overline{AH}=</code><code class="hint_pink">\overline{AE}</code> , <code>\overline{BE}=</code><code class="hint_pink">\overline{BF}</code> ,</p>
<p> <code>\overline{CF}=</code><code class="hint_pink">\overline{CG}</code> , <code>\overline{DG}=</code><code class="hint_pink">\overline{DH}</code> , 切線性質</p>
<p>因此 <code>\overline{AD}+\overline{BC}=</code><code class="hint_pink">\overline{AH}</code><code>+\overline{DH}+</code><code class="hint_pink">\overline{BF}</code><code>+\overline{CF}</code> </p>
<p> <code>=\overline{AE}+</code><code class="hint_pink">\overline{DG}</code><code>+\overline{BE}+</code><code class="hint_pink">\overline{CG}</code> </p>
<p> <code>=(\overline{AE}+\overline{BE})+(\overline{CG}+\overline{DG})</code> </p>
<p> <code>=</code><code class="hint_pink">\overline{AB}</code><code>+\overline{CD}</code> </p>
<p>由於 <code>\overline{AH}=</code>
<code data-if="t1.style.display!='none'">\color{#FF00AF}{\overline{AE}}</code><code data-if="t1.style.display=='none'">\overline{AE}</code> ,
<code>\overline{BE}=</code>
<code data-if="t2.style.display!='none'">\color{#FF00AF}{\overline{BF}}</code><code data-if="t2.style.display=='none'">\overline{BF}</code> ,</p>
<p><code>\overline{CF}=</code>
<code data-if="t3.style.display!='none'">\color{#FF00AF}{\overline{CG}}</code><code data-if="t3.style.display=='none'">\overline{CG}</code> ,
<code>\overline{DG}=</code>
<code data-if="t4.style.display!='none'">\color{#FF00AF}{\overline{DH}}</code><code data-if="t4.style.display=='none'">\overline{DH}</code> , 切線性質</p>
<p>因此 <code>\overline{AD}+\overline{BC}=</code>
<code data-if="t5.style.display!='none'">\color{#FF00AF}{\overline{AH}}</code><code data-if="t5.style.display=='none'">\overline{AH}</code>
<code>+\overline{DH}+</code>
<code data-if="t6.style.display!='none'">\color{#FF00AF}{\overline{BF}}</code><code data-if="t6.style.display=='none'">\overline{BF}</code><code>+\overline{CF}</code> </p>
<p><code>=\overline{AE}+</code>
<code data-if="t7.style.display!='none'">\color{#FF00AF}{\overline{DG}}</code><code data-if="t7.style.display=='none'">\overline{DG}</code><code>+\overline{BE}+</code>
<code data-if="t8.style.display!='none'">\color{#FF00AF}{\overline{CG}}</code><code data-if="t8.style.display=='none'">\overline{CG}</code></p>
<p><code>=(\overline{AE}+\overline{BE})+(\overline{CG}+\overline{DG})</code> </p>
<p><code>=</code>
<code data-if="t9.style.display!='none'">\color{#FF00AF}{\overline{AB}}</code><code data-if="t9.style.display=='none'">\overline{AB}</code><code>+\overline{CD}</code> </p>

</div>

Expand Down Expand Up @@ -628,8 +645,8 @@
</div>
</div>
<div class="solution" data-type="multiple">
<p> <code>\overline {AB}=\enspace</code><span class="sol" data-forms="integer"><var>AB</var></span></p>
<p> 內切圓半徑 <code>=\enspace</code><input type="text" style="width:30px" id="sqrtPart1"><span style="font: 150% Arial; padding: 0 0 0 5px;">√</span>
<p> <code>\overline{AB}=\enspace</code><span class="sol" data-forms="integer"><var>AB</var></span></p>
<p> 內切圓半徑 <code>=</code><br /><input type="text" style="width:30px" id="sqrtPart1"><span style="font: 150% Arial; padding: 0 0 0 5px;">√</span>
<span style="border-top: 1px solid #000; padding: 6px 1px 0 3px; margin-left: -1px;"><input type="text" style="width:30px" id="sqrtPart"></span></p>
<div class="sol" data-type="custom">
<div class="guess">document.getElementById("sqrtPart").value</div>
Expand Down