Permalink
Browse files

changed figure in fill-in-blanks exercise

  • Loading branch information...
1 parent 76d3b77 commit 11a00d2e536292a93464f708628dc2e69ec0b59a @mwittels mwittels committed Jul 9, 2012
Showing with 95 additions and 43 deletions.
  1. +88 −40 exercises/geometry_proofs_1.html
  2. +7 −3 utils/proofs.js
View
128 exercises/geometry_proofs_1.html
@@ -17,20 +17,37 @@
<body>
<div class="exercise">
<div class="vars">
- <var id="A">[-4,2]</var>
- <var id="B">[4,2]</var>
- <var id="C">[0,0]</var>
- <var id="D">[-4,-2]</var>
- <var id="E">[4,-2]</var>
-
- <var id="POINTS">["A","B","C","D","E"]</var>
-
<var id="AB">new Seg("A","B")</var>
<var id="BA">AB</var>
<var id="AC">new Seg("A","C")</var>
<var id="CA">AC</var>
<var id="AD">new Seg("A","D")</var>
<var id="DA">AD</var>
+ <var id="AF">new Seg("A","F")</var>
+ <var id="FA">AF</var>
+ <var id="BC">new Seg("B","C")</var>
+ <var id="CB">BC</var>
+ <var id="BD">new Seg("B","D")</var>
+ <var id="DB">BD</var>
+ <var id="BE">new Seg("B","E")</var>
+ <var id="EB">BE</var>
+ <var id="CE">new Seg("C","E")</var>
+ <var id="EC">CE</var>
+ <var id="CF">new Seg("C","F")</var>
+ <var id="FC">CF</var>
+ <var id="DE">new Seg("D","E")</var>
+ <var id="ED">DE</var>
+ <var id="DF">new Seg("D","F")</var>
+ <var id="FD">DF</var>
+ <var id="EF">new Seg("E","F")</var>
+ <var id="FE">EF</var>
+
+ <!-- <var id="AB">new Seg("A","B")</var>
+ <var id="BA">AB</var>
+ <var id="AC">new Seg("A","C")</var>
+ <var id="CA">AC</var>
+ <var id="AD">new Seg("A","D")</var>
+ <var id="DA">AD</var>
<var id="AE">new Seg("A","E")</var>
<var id="EA">AE</var>
<var id="BC">new Seg("B","C")</var>
@@ -44,12 +61,12 @@
<var id="CE">new Seg("C","E")</var>
<var id="EC">CE</var>
<var id="DE">new Seg("D","E")</var>
- <var id="ED">DE</var>
+ <var id="ED">DE</var> -->
+ <!-- <var id="SEGS">[AB,BA,AC,CA,AD,DA,AE,EA,BC,CB,BD,DB,BE,EB,CD,DC,CE,EC,DE,ED]</var> -->
+ <var id="SEGS">[AB,BA,AC,CA,AD,DA,AF,FA,BC,CB,BD,DB,BE,EB,CE,EC,CF,FC,DE,ED,DF,FD,EF,FE]</var>
- <var id="SEGS">[AB,BA,AC,CA,AD,DA,AE,EA,BC,CB,BD,DB,BE,EB,CD,DC,CE,EC,DE,ED]</var>
-
- <var id="ang1">new Ang("D","A","C", null)</var>
+ <!-- <var id="ang1">new Ang("D","A","C", null)</var>
<var id="ang2">new Ang("C","A","B", null)</var>
<var id="ang3">new Ang("C","B","A", null)</var>
<var id="ang4">new Ang("C","B","E", null)</var>
@@ -60,24 +77,44 @@
<var id="ang9">new Ang("A","D","C", null)</var>
<var id="ang10">new Ang("C","D","E", null)</var>
<var id="ang11">new Ang("C","E","D", null)</var>
- <var id="ang12">new Ang("C","E","B", null)</var>
+ <var id="ang12">new Ang("C","E","B", null)</var> -->
+ <var id="ang1">new Ang("B","A","C")</var>
+ <var id="ang2">new Ang("A","B","C")</var>
+ <var id="ang3">new Ang("A","C","B")</var>
+ <var id="ang4">new Ang("D","B","E")</var>
+ <var id="ang5">new Ang("E","B","C")</var>
+ <var id="ang6">new Ang("B","C","E")</var>
+ <var id="ang7">new Ang("E","C","F")</var>
+ <var id="ang8">new Ang("B","D","E")</var>
+ <var id="ang9">new Ang("B","E","D")</var>
+ <var id="ang10">new Ang("B","E","C")</var>
+ <var id="ang11">new Ang("C","E","F")</var>
+ <var id="ang12">new Ang("C","F","E")</var>
<var id="ANGS">[ang1, ang2, ang3, ang4, ang5, ang6, ang7, ang8, ang9, ang10, ang11, ang12]</var>
- <var id="SUPPLEMENTARY_ANGS">[addAngs(ang5, ang6), addAngs(ang6, ang8), addAngs(ang8, ang7), addAngs(ang7, ang5)]</var>
+ <!-- <var id="SUPPLEMENTARY_ANGS">[addAngs(ang5, ang6), addAngs(ang6, ang8), addAngs(ang8, ang7), addAngs(ang7, ang5)]</var> -->
+ <var id="SUPPLEMENTARY_ANGS">[addAngs(ang2, addAngs(ang5, ang4)), addAngs(ang3, addAngs(ang6, ang7)), addAngs(ang9, addAngs(ang10,ang11))]</var>
- <var id="ALTERNATE_INTERIOR_ANGS">[[ang1, ang12], [ang2, ang11], [ang10, ang3], [ang9, ang4]]</var>
+ <!-- <var id="ALTERNATE_INTERIOR_ANGS">[[ang1, ang12], [ang2, ang11], [ang10, ang3], [ang9, ang4]]</var> -->
+ <var id="ALTERNATE_INTERIOR_ANGS">[[ang5, ang9], [ang6, ang11]]</var>
- <var id="ABC">new Triang([AB, BC, CA], [ang3, ang5, ang2])</var>
+ <!-- <var id="ABC">new Triang([AB, BC, CA], [ang3, ang5, ang2])</var>
<var id="BCE">new Triang([BC, CE, EB], [ang7, ang12, ang4])</var>
<var id="ECD">new Triang([EC, CD, DE], [ang8, ang10, ang11])</var>
<var id="DCA">new Triang([DC, CA, AD], [ang6, ang1, ang9])</var>
<var id="ABE">new Triang([AB, BE, EA], [addAngs(ang3, ang4), ang12, ang2])</var>
<var id="ADE">new Triang([AD, DE, EA], [addAngs(ang9, ang10), ang11, ang1])</var>
<var id="BED">new Triang([BE, ED, DB], [addAngs(ang12, ang11), ang10, ang4])</var>
- <var id="BAD">new Triang([BA, AD, DB], [addAngs(ang2, ang1), ang9, ang3])</var>
+ <var id="BAD">new Triang([BA, AD, DB], [addAngs(ang2, ang1), ang9, ang3])</var> -->
+ <var id="ABC">new Triang([AB, BC, CA], [ang2, ang3, ang1])</var>
+ <var id="BDE">new Triang([BD, DE, EB], [ang8, ang9, ang4])</var>
+ <var id="BCE">new Triang([BC, CE, EB], [ang6, ang10, ang5])</var>
+ <var id="CEF">new Triang([CE, EF, FC], [ang11, ang12, ang7])</var>
+ <var id="ADF">new Triang([AD, DF, FA], [ang8, ang12, ang1])</var>
- <var id="TRIANGLES">[ABC, BCE, ECD, DCA, ABE, ADE, BED, BAD]</var>
+ <!-- <var id="TRIANGLES">[ABC, BCE, ECD, DCA, ABE, ADE, BED, BAD]</var> -->
+ <var id="TRIANGLES">[ABC, BDE, BCE, CEF]</var>
<var id="STATEMENTS">initProof(SEGS, ANGS, TRIANGLES, SUPPLEMENTARY_ANGS, ALTERNATE_INTERIOR_ANGS, 3, 0.25, "all")</var>
<var id="KNOWN">STATEMENTS[0]</var>
@@ -100,11 +137,12 @@
graph.congruency = addCongruency({ y1: -0.7, y2: 10.7 });
- graph.congruency.addPoint("A", [-4, 4]);
- graph.congruency.addPoint("B", [3, 4]);
- graph.congruency.addPoint("C", [0, 0]);
- graph.congruency.addPoint("D", [-3, -4]);
- graph.congruency.addPoint("E", [4, -4]);
+ graph.congruency.addPoint("A", [0, 4]);
+ graph.congruency.addPoint("B", [-2, 0]);
+ graph.congruency.addPoint("C", [2, 0]);
+ graph.congruency.addPoint("D", [-4, -4]);
+ graph.congruency.addPoint("E", [0, -4]);
+ graph.congruency.addPoint("F", [4, -4]);
graph.congruency.addLine({
start: "A",
@@ -126,7 +164,7 @@
});
graph.congruency.addLine({
start: "A",
- end: "E",
+ end: "F",
clickable: true,
maxState: 3
});
@@ -150,37 +188,45 @@
});
graph.congruency.addLine({
start: "C",
- end: "D",
+ end: "E",
clickable: true,
maxState: 3
});
graph.congruency.addLine({
- start: "E",
- end: "D",
+ start: "C",
+ end: "F",
clickable: true,
maxState: 3
});
graph.congruency.addLine({
- start: "C",
+ start: "D",
end: "E",
clickable: true,
maxState: 3
});
+ graph.congruency.addLine({
+ start: "D",
+ end: "F",
+ clickable: true,
+ maxState: 3
+ });
+ graph.congruency.addLine({
+ start: "E",
+ end: "F",
+ clickable: true,
+ maxState: 3
+ });
graph.congruency.addAngles("A", { maxState: 3 });
graph.congruency.addAngles("B", { maxState: 3 });
graph.congruency.addAngles("C", { maxState: 3 });
graph.congruency.addAngles("D", { maxState: 3 });
graph.congruency.addAngles("E", { maxState: 3 });
+ graph.congruency.addAngles("F", { maxState: 3 });
- graph.congruency.addAngle("DAC", { maxState: 3 });
- graph.congruency.addAngle("CAB", { maxState: 3 });
- graph.congruency.addAngle("ABC", { maxState: 3 });
- graph.congruency.addAngle("CBE", { maxState: 3 });
- graph.congruency.addAngle("BEC", { maxState: 3 });
- graph.congruency.addAngle("CED", { maxState: 3 });
- graph.congruency.addAngle("EDC", { maxState: 3 });
- graph.congruency.addAngle("CDA", { maxState: 3 });
+ graph.congruency.addAngle("BAC", { maxState: 3 });
+ graph.congruency.addAngle("EDB", { maxState: 3 });
+ graph.congruency.addAngle("CFE", { maxState: 3 });
for(var angle in graph.congruency.angles){
graph.congruency.angles[angle].setSelectedStyle({
@@ -189,11 +235,13 @@
});
}
- graph.congruency.addLabel("A", "left");
- graph.congruency.addLabel("B", "right");
+ graph.congruency.addLabel("A", "above");
+ graph.congruency.addLabel("B", "left");
graph.congruency.addLabel("C", "right");
- graph.congruency.addLabel("D", "left");
- graph.congruency.addLabel("E", "right");
+ graph.congruency.addLabel("D", "below");
+ graph.congruency.addLabel("E", "below");
+ graph.congruency.addLabel("F", "below");
+
var hintsLeft = FILL_BLANKS_NUM*2;
$(".missingStatement").keyup(function(){
View
10 utils/proofs.js
@@ -496,7 +496,12 @@ function outputFillBlanksProof() {
if (finishedEqualities[finishedKeys[i]].substring(0, 4) != "Same") {
if (finishedEqualities[finishedKeys[i]] === "given") {
numberGivens--;
- proofText += "<div style=\"float:left\" class=\"" + divName(finishedKeys[i]) + "\">";
+ if(i % 3 != 2){
+ proofText += "<div style=\"float:left\" class=\"" + divName(finishedKeys[i]) + "\">";
+ }
+ else{
+ proofText += "<div style=\"float:left\" class=\"" + divName(finishedKeys[i]) + "\">";
+ }
proofText += prettifyEquality(finishedKeys[i]);
if (numberGivens > 1) {
proofText += "<code>, \\ </code> </div>";
@@ -573,8 +578,7 @@ function outputFillBlanksProof() {
// returns true if the statements were filled in correctly, false otherwise
function checkFillBlanksStatement(divID) {
// for now, hardcode these
- var equivAngles = {"BAE" : "BAC", "EAB" : "CAB", "DAE" : "DAC", "EAD" : "CAD", "ABD" : "ABC", "DBA" : "CBA", "EBD" : "EBC", "DBE" : "CBE",
- "BEA" : "BEC", "AEB" : "CEB", "DEA" : "DEC", "AED" : "CED", "BDE" : "CDE", "EDB" : "EDC", "ADB" : "ADC", "BDA" : "CDA"};
+ var equivAngles = {"ADE" : "BDE", "BDF" : "BDE", "ADF" : "BDE", "BAF" : "BAC", "DAC" : "BAC", "DAF" : "BAC", "CFD" : "CFE", "AFE" : "CFE", "AFD" : "CFE"};
var unsortedKeyList = _.clone(finishedEqualitiesList);
var finishedKeys = sortEqualityList(unsortedKeyList.reverse(), finishedEqualities);

0 comments on commit 11a00d2

Please sign in to comment.