Esempio n. 1
0
        public Page6Prob32b(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point r = new Point("R", -8 * System.Math.Sin(0.3 * System.Math.PI), 8 * System.Math.Cos(0.3 * System.Math.PI)); points.Add(r);
            Point p = new Point("P", 0, 0); points.Add(p);
            Point s = new Point("S", 8 * System.Math.Sin(0.3 * System.Math.PI), 8 * System.Math.Cos(0.3 * System.Math.PI)); points.Add(s);
            Point q = new Point("Q", 0, -4); points.Add(q);

            Segment rp = new Segment(r, p); segments.Add(rp);
            Segment ps = new Segment(p, s); segments.Add(ps);
            Segment pq = new Segment(p, q); segments.Add(pq);

            circles.Add(new Circle(p, 8));
            circles.Add(new Circle(q, 4));

            parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            known.AddSegmentLength(pq, 4);
            known.AddAngleMeasureDegree((Angle)parser.Get(new Angle(r, p, s)), 108);

            List<Point> wanted = new List<Point>();
            wanted.Add(new Point("", 0.5, -4));
            goalRegions = parser.implied.GetAtomicRegionsByPoints(wanted);

            SetSolutionArea(16 * System.Math.PI);
        }
Esempio n. 2
0
        public Page6Row3Prob32c(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point r = new Point("R", -8 * System.Math.Sin(0.3 * System.Math.PI), 8 * System.Math.Cos(0.3 * System.Math.PI)); points.Add(r);
            Point p = new Point("P", 0, 0); points.Add(p);
            Point s = new Point("S", 8 * System.Math.Sin(0.3 * System.Math.PI), 8 * System.Math.Cos(0.3 * System.Math.PI)); points.Add(s);
            Point q = new Point("Q", 0, -4); points.Add(q);

            Segment rp = new Segment(r, p); segments.Add(rp);
            Segment ps = new Segment(p, s); segments.Add(ps);
            Segment pq = new Segment(p, q); segments.Add(pq);

            circles.Add(new Circle(p, 8));
            circles.Add(new Circle(q, 4));

            parser = new GeometryTutorLib.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            known.AddSegmentLength(pq, 4);
            known.AddAngleMeasureDegree((Angle)parser.Get(new Angle(r, p, s)), 108);

            List<Point> wanted = new List<Point>();
            wanted.Add(new Point("", 7, 0));
            wanted.Add(new Point("", -7, 0));
            wanted.Add(new Point("", -2, 1));
            wanted.Add(new Point("", 2, 1));
            goalRegions = parser.implied.GetAtomicRegionsByPoints(wanted);

            SetSolutionArea(28.8 * System.Math.PI);

            problemName = "McDougall Page 6 Row 3 Problem 32c";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
Esempio n. 3
0
        public Page145Problem07(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 145 Problem 7";

            Point f = new Point("F", 0, 5); points.Add(f);
            Point l = new Point("L", 4, 7); points.Add(l);
            Point k = new Point("K", 4, 3); points.Add(k);
            Point a = new Point("A", 5, 5); points.Add(a);
            Point j = new Point("J", 3, 5); points.Add(j);

            Segment fl = new Segment(f, l); segments.Add(fl);
            Segment fk = new Segment(f, k); segments.Add(fk);
            Segment al = new Segment(a, l); segments.Add(al);
            Segment ak = new Segment(a, k); segments.Add(ak);
            Segment jl = new Segment(j, l); segments.Add(jl);
            Segment jk = new Segment(j, k); segments.Add(jk);

            List<Point> pts = new List<Point>();
            pts.Add(f);
            pts.Add(j);
            pts.Add(a);
            collinear.Add(new Collinear(pts));

                        parser = new GeometryTutorLib.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentSegments(al, ak));
            given.Add(new GeometricCongruentSegments(fl, fk));

            goals.Add(new GeometricCongruentSegments(jl, jk));
        }
Esempio n. 4
0
        public Page226Problem42(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 226 Problem 42";

            Point j = new Point("J", 0, 0); points.Add(j);
            Point k = new Point("K", 0, 12); points.Add(k);
            Point l = new Point("L", 3, 2); points.Add(l);
            Point m = new Point("M", 3, 10); points.Add(m);
            Point n = new Point("N", 9, 6); points.Add(n);

            Segment jk = new Segment(j, k); segments.Add(jk);
            Segment lm = new Segment(l, m); segments.Add(lm);

            List<Point> pts = new List<Point>();
            pts.Add(j);
            pts.Add(l);
            pts.Add(n);
            collinear.Add(new Collinear(pts));

            pts = new List<Point>();
            pts.Add(k);
            pts.Add(m);
            pts.Add(n);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new IsoscelesTriangle((Segment)parser.Get(new Segment(k, n)), (Segment)parser.Get(new Segment(j, n)), jk));
            given.Add(new GeometricParallel(jk, lm));

            goals.Add(new Strengthened((Triangle)parser.Get(new Triangle(n, m, l)),  new IsoscelesTriangle((Triangle)parser.Get(new Triangle(n, m, l)))));
        }
Esempio n. 5
0
        public Page301Problem42(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 301 Problem 42";

            Point a = new Point("A", 0, 0); points.Add(a);
            Point b = new Point("B", 0, 6); points.Add(b);
            Point c = new Point("C", 4, 3); points.Add(c);
            Point d = new Point("D", 8, 0); points.Add(d);

            Segment ab = new Segment(a, b); segments.Add(ab);
            Segment ac = new Segment(a, c); segments.Add(ac);
            Segment ad = new Segment(a, d); segments.Add(ad);

            List<Point> pts = new List<Point>();
            pts.Add(b);
            pts.Add(c);
            pts.Add(d);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new Midpoint((InMiddle)parser.Get(new InMiddle( c, (Segment)parser.Get(new Segment(b, d))))));
            given.Add(new RightAngle(b, a, d));

            goals.Add(new GeometricCongruentSegments((Segment)parser.Get(new Segment(b, c)), ac));
            goals.Add(new GeometricCongruentSegments((Segment)parser.Get(new Segment(d, c)), ac));
        }
Esempio n. 6
0
        public Page223Problem24(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 223 Problem 24";

            Point b = new Point("B", 2, 4); points.Add(b);
            Point n = new Point("N", 8, 4); points.Add(n);
            Point l = new Point("L", 0, 0); points.Add(l);
            Point c = new Point("C", 10, 0); points.Add(c);
            Point m = new Point("M", 5, 2.5); points.Add(m);

            Segment cl = new Segment(c, l); segments.Add(cl);
            Segment bn = new Segment(b, n); segments.Add(bn);

            List<Point> pts = new List<Point>();
            pts.Add(l);
            pts.Add(m);
            pts.Add(n);
            collinear.Add(new Collinear(pts));

            pts = new List<Point>();
            pts.Add(b);
            pts.Add(m);
            pts.Add(c);
            collinear.Add(new Collinear(pts));

                        parser = new GeometryTutorLib.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(m, b, n)), (Angle)parser.Get(new Angle(m, c, l))));
        }
Esempio n. 7
0
        public Page2Prob15(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point o = new Point("O", 0, 0); points.Add(o);
            Point a = new Point("A", 0, 4); points.Add(a);
            Point b = new Point("B", -4, 0); points.Add(b);

            Segment oa = new Segment(o, a); segments.Add(oa);
            Segment ob = new Segment(o, b); segments.Add(ob);

            Segment ab = new Segment(a, b); segments.Add(ab);

            circles.Add(new Circle(o, 4.0));

            parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new RightAngle((Angle)parser.Get(new Angle(a, o, b))));

            known.AddSegmentLength(oa, 4);

            List<Point> wanted = new List<Point>();
            wanted.Add(new Point("", -2.828, 2.8));
            goalRegions = parser.implied.GetAtomicRegionsByPoints(wanted);

            SetSolutionArea(4.566370614);
        }
Esempio n. 8
0
        public Page164Problem36(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 164 Problem 36";

            Point a = new Point("A", 11, 8); points.Add(a);
            Point b = new Point("B", 10, 8); points.Add(b);
            Point c = new Point("C", 10, 11); points.Add(c);
            Point d = new Point("D", 0, 8);  points.Add(d);
            Point e = new Point("E", 0, 0);   points.Add(e);
            Point f = new Point("F", 10, 0);  points.Add(f);

            Segment de = new Segment(d, e); segments.Add(de);
            Segment ef = new Segment(e, f); segments.Add(ef);

            List<Point> pts = new List<Point>();
            pts.Add(f);
            pts.Add(b);
            pts.Add(c);
            collinear.Add(new Collinear(pts));

            pts = new List<Point>();
            pts.Add(d);
            pts.Add(b);
            pts.Add(a);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(b, d, e)), (Angle)parser.Get(new Angle(c, b, d))));

            goals.Add(new GeometricParallel(de, new Segment(f, c)));
        }
Esempio n. 9
0
        public Page223Problem23(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 223 Problem 23";

            Point j = new Point("J", 0, 0); points.Add(j);
            Point i = new Point("I", 3, 3); points.Add(i);
            Point y = new Point("Y", 7, 7); points.Add(y);
            Point g = new Point("G", 6, 0); points.Add(g);
            Point z = new Point("Z", 7, 0); points.Add(z);

            Segment ig = new Segment(i, g); segments.Add(ig);
            Segment yz = new Segment(y, z); segments.Add(yz);

            List<Point> pts = new List<Point>();
            pts.Add(j);
            pts.Add(i);
            pts.Add(y);
            collinear.Add(new Collinear(pts));

            pts = new List<Point>();
            pts.Add(j);
            pts.Add(g);
            pts.Add(z);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(j, g, i)), (Angle)parser.Get(new Angle(j, y, z))));

            goals.Add(new GeometricSimilarTriangles((Triangle)parser.Get(new Triangle(j, i, g)), (Triangle)parser.Get(new Triangle(j, z, y))));
        }
Esempio n. 10
0
        public Page316Problem42(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 316 Problem 42";

            Point p = new Point("P", 10, 0); points.Add(p);
            Point q = new Point("Q", 0, 0); points.Add(q);
            Point l = new Point("L", 0, 6); points.Add(l);
            Point m = new Point("M", 10, 6); points.Add(m);
            Point n = new Point("N", 3, 3); points.Add(n);

            Segment lm = new Segment(l, m); segments.Add(lm);
            Segment ln = new Segment(l, n); segments.Add(ln);
            Segment mn = new Segment(m, n); segments.Add(mn);
            Segment np = new Segment(n, p); segments.Add(np);
            Segment nq = new Segment(n, q); segments.Add(nq);
            Segment pq = new Segment(p, q); segments.Add(pq);

            parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(m, l, n)), (Angle)parser.Get(new Angle(n, q, p))));
            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(n, m, l)), (Angle)parser.Get(new Angle(n, p, q))));
            given.Add(new GeometricCongruentSegments(ln, nq));

            goals.Add(new GeometricCongruentTriangles(new Triangle(l, m, n), new Triangle(q, p, n)));
        }
Esempio n. 11
0
        public Page73Problem8(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 73 Problem 8";

            Point t = new Point("T", -4, 5); points.Add(t);
            Point n = new Point("N", 0, 5); points.Add(n);
            Point s = new Point("S", 0, 0); points.Add(s);
            Point h = new Point("H", 0, -5); points.Add(h);
            Point u = new Point("U", 4, -5); points.Add(u);

            Segment nt = new Segment(n, t); segments.Add(nt);
            Segment hu = new Segment(h, u); segments.Add(hu);

            List<Point> pts = new List<Point>();
            pts.Add(t);
            pts.Add(s);
            pts.Add(u);
            collinear.Add(new Collinear(pts));

            pts = new List<Point>();
            pts.Add(n);
            pts.Add(s);
            pts.Add(h);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(s, u, h)), (Angle)parser.Get(new Angle(n, t, s))));
            given.Add(new GeometricCongruentSegments((Segment)parser.Get(new Segment(n, s)), (Segment)parser.Get(new Segment(s, h))));

            goals.Add(new GeometricCongruentTriangles(new Triangle(s, n, t), new Triangle(s, h, u)));
        }
Esempio n. 12
0
        public Page66Problem16(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 66 Problem 16";

            Point a = new Point("A", 1, 5); points.Add(a);
            Point b = new Point("B", 8, 5); points.Add(b);
            Point c = new Point("C", 7, 0); points.Add(c);
            Point d = new Point("D", 0, 0); points.Add(d);

            Segment ba = new Segment(b, a); segments.Add(ba);
            Segment bc = new Segment(b, c); segments.Add(bc);
            Segment ad = new Segment(a, d); segments.Add(ad);
            Segment bd = new Segment(b, d); segments.Add(bd);
            Segment cd = new Segment(c, d); segments.Add(cd);

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentSegments(ba, cd));
            given.Add(new GeometricCongruentSegments(bc, ad));
            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(a, b, d)), (Angle)parser.Get(new Angle(c, d, b))));
            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(a, d, b)), (Angle)parser.Get(new Angle(c, b, d))));

            goals.Add(new GeometricCongruentTriangles(new Triangle(a, b, d), new Triangle(c, d, b)));
        }
Esempio n. 13
0
        public Page273Problem39(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 273 Problem 39";

            Point a = new Point("A", 1, 0); points.Add(a);
            Point b = new Point("B", 0, 5); points.Add(b);
            Point c = new Point("C", 3, 3); points.Add(c);
            Point d = new Point("D", 5, 6); points.Add(d);
            Point e = new Point("E", 6, 1); points.Add(e);

            Segment ab = new Segment(a, b); segments.Add(ab);
            Segment de = new Segment(d, e); segments.Add(de);

            List<Point> pts = new List<Point>();
            pts.Add(a);
            pts.Add(c);
            pts.Add(d);
            collinear.Add(new Collinear(pts));

            pts = new List<Point>();
            pts.Add(b);
            pts.Add(c);
            pts.Add(e);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new SegmentBisector(parser.GetIntersection(new Segment(a, d), new Segment(b, e)), (Segment)parser.Get(new Segment(a, d))));
            given.Add(new GeometricParallel(ab, de));

            goals.Add(new GeometricCongruentTriangles(new Triangle(a, b, c), new Triangle(d, e, c)));
        }
Esempio n. 14
0
        public Page69Problem14(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 69 Problem 14";

            Point a = new Point("A", 0, 0); points.Add(a);
            Point b = new Point("B", 7, -6); points.Add(b);
            Point c = new Point("C", 14, 0); points.Add(c);
            Point d = new Point("D", 7, 0); points.Add(d);

            Segment ba = new Segment(b, a); segments.Add(ba);
            Segment bc = new Segment(b, c); segments.Add(bc);
            Segment bd = new Segment(b, d); segments.Add(bd);

            List<Point> pts = new List<Point>();
            pts.Add(a);
            pts.Add(d);
            pts.Add(c);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentSegments(ba, bc));
            given.Add(new Midpoint((InMiddle)parser.Get(new InMiddle(d, (Segment)parser.Get(new Segment(a, c))))));

            goals.Add(new GeometricCongruentTriangles(new Triangle(a, b, d), new Triangle(c, b, d)));
        }
Esempio n. 15
0
        public Page223Problem22(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 223 Problem 22";

            Point x = new Point("X", 1, 0); points.Add(x);
            Point f = new Point("F", 3, 4); points.Add(f);
            Point s = new Point("S", 4, 6); points.Add(s);
            Point e = new Point("E", 5, 0); points.Add(e);
            Point r = new Point("R", 7, 0); points.Add(r);

            Segment rs = new Segment(r, s); segments.Add(rs);
            Segment ef = new Segment(e, f); segments.Add(ef);

            List<Point> pts = new List<Point>();
            pts.Add(x);
            pts.Add(e);
            pts.Add(r);
            collinear.Add(new Collinear(pts));

            pts = new List<Point>();
            pts.Add(x);
            pts.Add(f);
            pts.Add(s);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricParallel(rs, ef));

            goals.Add(new GeometricSimilarTriangles((Triangle)parser.Get(new Triangle(f, x, e)), (Triangle)parser.Get(new Triangle(s, x, r))));
        }
Esempio n. 16
0
        public Page231Problem14(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 231 Problem 14";

            Point j = new Point("J", 0, 0); points.Add(j);
            Point k = new Point("K", 3, 2); points.Add(k);
            Point l = new Point("L", 9, 0); points.Add(l);
            Point m = new Point("M", 5, 0); points.Add(m);
            Point n = new Point("N", 3, -2); points.Add(n);

            Segment jk = new Segment(j, k); segments.Add(jk);
            Segment jn = new Segment(j, n); segments.Add(jn);
            Segment kl = new Segment(k, l); segments.Add(kl);
            Segment km = new Segment(k, m); segments.Add(km);
            Segment ln = new Segment(l, n); segments.Add(ln);
            Segment mn = new Segment(m, n); segments.Add(mn);

            List<Point> pts = new List<Point>();
            pts.Add(j);
            pts.Add(m);
            pts.Add(l);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentTriangles(new Triangle(j, k, m), new Triangle(j, n, m)));

            goals.Add(new GeometricCongruentTriangles(new Triangle(j, k, l), new Triangle(j, n, l)));
        }
Esempio n. 17
0
        public Page145Problem04(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 145 Problem 4";

            Point a = new Point("A", 0, 0); points.Add(a);
            Point b = new Point("B", 5, 0); points.Add(b);
            Point d = new Point("D", 1, 4); points.Add(d);
            Point c = new Point("C", 6, 4); points.Add(c);
            Point l = new Point("L", 2, 3); points.Add(l);
            Point m = new Point("M", 4, 1); points.Add(m);

            Segment ab = new Segment(a, b); segments.Add(ab);
            Segment cd = new Segment(c, d); segments.Add(cd);
            Segment ad = new Segment(a, d); segments.Add(ad);
            Segment bc = new Segment(b, c); segments.Add(bc);
            Segment al = new Segment(a, l); segments.Add(al);
            Segment cm = new Segment(c, m); segments.Add(cm);

            List<Point> pts = new List<Point>();
            pts.Add(d);
            pts.Add(l);
            pts.Add(m);
            pts.Add(b);
            collinear.Add(new Collinear(pts));

                        parser = new GeometryTutorLib.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentSegments(ab, cd));
            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(c, d, l)), (Angle)parser.Get(new Angle(m, b, a))));
            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(d, a, l)), (Angle)parser.Get(new Angle(m, c, b))));

            goals.Add(new GeometricCongruentSegments(al, cm));
        }
Esempio n. 18
0
        /// <summary>
        /// Create a new triangle bounded by the 3 given segments. The set of points that define these segments should have only 3 distinct elements.
        /// </summary>
        /// <param name="a">The segment opposite point a</param>
        /// <param name="b">The segment opposite point b</param>
        /// <param name="c">The segment opposite point c</param>
        public Triangle(Segment a, Segment b, Segment c)
            : base(a, b, c)
        {
            SegmentA = a;
            SegmentB = b;
            SegmentC = c;

            Point1 = SegmentA.Point1;
            Point2 = SegmentA.Point2;
            Point3 = Point1.Equals(SegmentB.Point1) || Point2.Equals(SegmentB.Point1) ? SegmentB.Point2 : SegmentB.Point1;

            AngleA = new Angle(Point1, Point2, Point3);
            AngleB = new Angle(Point2, Point3, Point1);
            AngleC = new Angle(Point3, Point1, Point2);

            isRight = isRightTriangle();
            provenRight = false;
            givenRight = false;
            isIsosceles = IsIsosceles();
            provenIsosceles = false;
            isEquilateral = IsEquilateral();
            provenEquilateral = false;

            congruencePairs = new List<Triangle>();
            similarPairs = new List<Triangle>();

            addSuperFigureToDependencies();
        }
Esempio n. 19
0
        public IPage119Problem3(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "I Page 119 Problem 3";

            Point a = new Point("A", 4, 0); points.Add(a);
            Point b = new Point("B", 4, 10); points.Add(b);
            Point c = new Point("C", 8, 10); points.Add(c);
            Point d = new Point("D", 0, 0); points.Add(d);
            Point o = new Point("O", 4, 5); points.Add(o);

            Segment ad = new Segment(a, d); segments.Add(ad);
            Segment bc = new Segment(b, c); segments.Add(bc);

            List<Point> pts = new List<Point>();
            pts.Add(d);
            pts.Add(o);
            pts.Add(c);
            collinear.Add(new Collinear(pts));

            pts = new List<Point>();
            pts.Add(b);
            pts.Add(o);
            pts.Add(a);
            collinear.Add(new Collinear(pts));

                        parser = new GeometryTutorLib.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentSegments(ad, bc));
            given.Add(new Perpendicular(parser.GetIntersection(ad, new Segment(a, b))));
            given.Add(new Perpendicular(parser.GetIntersection(bc, new Segment(a, b))));

            goals.Add(new SegmentBisector(parser.GetIntersection((Segment)parser.Get(new Segment(c, d)), (Segment)parser.Get(new Segment(a, b))), (Segment)parser.Get(new Segment(c, d))));
        }
Esempio n. 20
0
        public BasicPolygonTester(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point a = new Point("A", -2, 0); points.Add(a);
            Point b = new Point("B", 0, 6); points.Add(b);
            Point c = new Point("C", 2, 0); points.Add(c);
            Point d = new Point("D", 3, -1); points.Add(d);
            Point e = new Point("E", 1, 3); points.Add(e);
            Point f = new Point("F", 0, 0); points.Add(f);

            Segment ab = new Segment(a, b); segments.Add(ab);
            Segment bc = new Segment(b, c); segments.Add(bc);
            Segment ca = new Segment(c, a); segments.Add(ca);

            Segment de = new Segment(d, e); segments.Add(de);
            Segment ef = new Segment(e, f); segments.Add(ef);
            Segment fd = new Segment(f, d); segments.Add(fd);

            Segment cd = new Segment(c, d); segments.Add(cd);

            parser = new GeometryTutorLib.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            // The goal is the entire area of the figure.
            goalRegions = new List<GeometryTutorLib.Area_Based_Analyses.Atomizer.AtomicRegion>(parser.implied.atomicRegions);
        }
Esempio n. 21
0
        public Page156Problem36(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 156 Problem 36";

            Point j = new Point("J", 0, 10);  points.Add(j);
            Point k = new Point("K", 10, 10); points.Add(k);
            Point l = new Point("L", 20, 10); points.Add(l);
            Point m = new Point("M", 5, 0);   points.Add(m);
            Point n = new Point("N", 15, 0);  points.Add(n);

            Segment jm = new Segment(j, m); segments.Add(jm);
            Segment km = new Segment(k, m); segments.Add(km);
            Segment kn = new Segment(k, n); segments.Add(kn);
            Segment ln = new Segment(l, n); segments.Add(ln);

            List<Point> pts = new List<Point>();
            pts.Add(j);
            pts.Add(k);
            pts.Add(l);
            collinear.Add(new Collinear(pts));

                        parser = new GeometryTutorLib.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(m, j, k)), (Angle)parser.Get(new Angle(m, k, j))));
            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(n, k, l)), (Angle)parser.Get(new Angle(n, l, k))));
            given.Add(new GeometricParallel(jm, kn));

            goals.Add(new GeometricParallel(km, ln));
        }
Esempio n. 22
0
        public IPage120Problem6(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Book I Page 120 Problem 6";

            Point a = new Point("A", 2, 6);  points.Add(a);
            Point b = new Point("B", 0, 0);  points.Add(b);
            Point c = new Point("C", 10, 0); points.Add(c);
            Point d = new Point("D", 4, 0);  points.Add(d);
            Point e = new Point("E", 12, 6); points.Add(e);

            Segment ab = new Segment(a, b); segments.Add(ab);
            Segment ad = new Segment(a, d); segments.Add(ad);
            Segment ac = new Segment(a, c); segments.Add(ac);
            Segment ae = new Segment(a, e); segments.Add(ae);
            Segment ec = new Segment(e, c); segments.Add(ec);
            Segment de = new Segment(d, e); segments.Add(de);

            List<Point> pts = new List<Point>();
            pts.Add(b);
            pts.Add(d);
            pts.Add(c);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentSegments(ac, ae));
            given.Add(new GeometricCongruentSegments(ab, ad));
            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(b, a, d)), (Angle)parser.Get(new Angle(e, a, c))));

            goals.Add(new GeometricCongruentSegments((Segment)parser.Get(new Segment(b, c)), de));
        }
Esempio n. 23
0
        public Page2Col1Prob3(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point d = new Point("D", 60, 0); points.Add(d);
            Point b = new Point("B", 0, 60); points.Add(b);
            Point o = new Point("O", 0, 0);  points.Add(o);

            Segment bo = new Segment(b, o); segments.Add(bo);
            Segment od = new Segment(o, d); segments.Add(od);

            circles.Add(new Circle(o, 60.0));

            parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new RightAngle(new Angle(b, o, d)));

            known.AddSegmentLength(bo, 60);

            List<Point> wanted = new List<Point>();
            wanted.Add(new Point("", 0, -1));
            goalRegions = parser.implied.GetAtomicRegionsByPoints(wanted);

            SetSolutionArea(8482.300165);

            problemName = "Page 2 Col 1 Problem 3";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
Esempio n. 24
0
        public Page243Problem16(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 243 Problem 16";

            Point a = new Point("A", 1.6, 1.2); points.Add(a);
            Point b = new Point("B", 2, 6); points.Add(b);
            Point c = new Point("C", 17, 6); points.Add(c);
            Point d = new Point("D", 17.6, 13.2); points.Add(d);
            Point x = new Point("X", 8, 6); points.Add(x);

            Segment ab = new Segment(a, b); segments.Add(ab);
            Segment cd = new Segment(c, d); segments.Add(cd);

            List<Point> pts = new List<Point>();
            pts.Add(b);
            pts.Add(x);
            pts.Add(c);
            collinear.Add(new Collinear(pts));

            pts = new List<Point>();
            pts.Add(a);
            pts.Add(x);
            pts.Add(d);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);
        }
Esempio n. 25
0
        public Page242Problem21(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 242 Problem 21";

            Point t = new Point("T", 0, 0); points.Add(t);
            Point s = new Point("S", 6, 8); points.Add(s);
            Point o = new Point("O", 9, 12); points.Add(o);
            Point v = new Point("V", 13, 8); points.Add(v);
            Point w = new Point("W", 21, 0); points.Add(w);

            Segment tw = new Segment(t, w); segments.Add(tw);
            Segment sv = new Segment(s, v); segments.Add(sv);

            List<Point> pts = new List<Point>();
            pts.Add(t);
            pts.Add(s);
            pts.Add(o);
            collinear.Add(new Collinear(pts));

            pts = new List<Point>();
            pts.Add(o);
            pts.Add(v);
            pts.Add(w);
            collinear.Add(new Collinear(pts));

                        parser = new GeometryTutorLib.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricParallel((Segment)parser.Get(tw), (Segment)parser.Get(sv)));
        }
Esempio n. 26
0
        public Page229Problem05(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 229 Problem 05";

            Point a = new Point("A", 13.0 / 2.0, 3.0); points.Add(a);
            Point b = new Point("B", 0, 3); points.Add(b);
            Point c = new Point("C", 2, 0); points.Add(c);
            Point e = new Point("E", 13.0 / 3.0, 3); points.Add(e);
            Point f = new Point("F", 5, 2); points.Add(f);

            Segment bc = new Segment(c, b); segments.Add(bc);
            Segment ef = new Segment(e, f); segments.Add(ef);

            List<Point> pts = new List<Point>();
            pts.Add(a);
            pts.Add(f);
            pts.Add(c);
            collinear.Add(new Collinear(pts));

            pts = new List<Point>();
            pts.Add(b);
            pts.Add(e);
            pts.Add(a);
            collinear.Add(new Collinear(pts));

                        parser = new GeometryTutorLib.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);
        }
Esempio n. 27
0
        public Page168Problem34(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 168 Problem 34";

            Point a = new Point("A", 1, 7); points.Add(a);
            Point b = new Point("B", 1, 4); points.Add(b);
            Point c = new Point("C", 8, 0); points.Add(c);
            Point d = new Point("D", 8, 4); points.Add(d);
            Point e = new Point("E", 4, 4); points.Add(e);

            Segment ab = new Segment(a, b); segments.Add(ab);
            Segment cd = new Segment(c, d); segments.Add(cd);

            List<Point> pts = new List<Point>();
            pts.Add(a);
            pts.Add(e);
            pts.Add(c);
            collinear.Add(new Collinear(pts));

            pts = new List<Point>();
            pts.Add(b);
            pts.Add(e);
            pts.Add(d);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(b, a, e)),
                                                   (Angle)parser.Get(new Angle(a, e, b))));
            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(d, e, c)),
                                                   (Angle)parser.Get(new Angle(e, c, d))));

            goals.Add(new GeometricParallel(ab, cd));
        }
Esempio n. 28
0
        public IPage123Example6(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Book I Page 123 Example 6";

            Point a = new Point("A", 3.5, 4); points.Add(a);
            Point b = new Point("B", 0, 0); points.Add(b);
            Point c = new Point("C", 7, 0); points.Add(c);
            Point d = new Point("D", 2, 0); points.Add(d);
            Point e = new Point("E", 5, 0); points.Add(e);

            Segment ab = new Segment(a, b); segments.Add(ab);
            Segment ac = new Segment(a, c); segments.Add(ac);
            Segment ad = new Segment(a, d); segments.Add(ad);
            Segment ae = new Segment(a, e); segments.Add(ae);

            List<Point> pts = new List<Point>();
            pts.Add(b);
            pts.Add(d);
            pts.Add(e);
            pts.Add(c);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new IsoscelesTriangle((Triangle)parser.Get(new Triangle(a, b, c))));
            given.Add(new GeometricCongruentSegments((Segment)parser.Get(new Segment(b, e)), (Segment)parser.Get(new Segment(c, d))));

            goals.Add(new GeometricCongruentSegments(ad, ae));
        }
Esempio n. 29
0
        public Page145Problem08(bool onoff, bool complete)
            : base(onoff, complete)
        {
            problemName = "Page 145 Problem 8";

            Point f = new Point("F", 0, 5); points.Add(f);
            Point l = new Point("L", 4, 7); points.Add(l);
            Point k = new Point("K", 4, 3); points.Add(k);
            Point a = new Point("A", 5, 5); points.Add(a);
            Point j = new Point("J", 3, 5); points.Add(j);

            Segment fl = new Segment(f, l); segments.Add(fl);
            Segment fk = new Segment(f, k); segments.Add(fk);
            Segment al = new Segment(a, l); segments.Add(al);
            Segment ak = new Segment(a, k); segments.Add(ak);
            Segment jl = new Segment(j, l); segments.Add(jl);
            Segment jk = new Segment(j, k); segments.Add(jk);

            List<Point> pts = new List<Point>();
            pts.Add(f);
            pts.Add(j);
            pts.Add(a);
            collinear.Add(new Collinear(pts));

                        parser = new LiveGeometry.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            given.Add(new AngleBisector((Angle)parser.Get(new Angle(l, f, k)), (Segment)parser.Get(new Segment(f, a))));
            given.Add(new AngleBisector((Angle)parser.Get(new Angle(l, a, k)), (Segment)parser.Get(new Segment(f, a))));

            goals.Add(new AngleBisector((Angle)parser.Get(new Angle(l, j, k)), (Segment)parser.Get(new Segment(f, a))));
        }
Esempio n. 30
0
        //Demonstrates: If a quad is inscribed in a circle, then its opposite angles are supplementary
        public Page312Corollary2(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point o = new Point("O", 0, 0); points.Add(o);

            //Points and segments for an inscribed rectangle
            Point r = new Point("R", -3, 4); points.Add(r);
            Point s = new Point("S", 3, 4); points.Add(s);
            Point t = new Point("T", 3, -4); points.Add(t);
            Point u = new Point("U", -3, -4); points.Add(u);

            Segment rs = new Segment(r, s); segments.Add(rs);
            Segment st = new Segment(s, t); segments.Add(st);
            Segment tu = new Segment(t, u); segments.Add(tu);
            Segment ur = new Segment(u, r); segments.Add(ur);

            Circle c = new Circle(o, 5.0);
            circles.Add(c);

            parser = new GeometryTutorLib.TutorParser.HardCodedParserMain(points, collinear, segments, circles, onoff);

            Angle angle1 = (Angle)parser.Get(new Angle(r, s, t));
            Angle angle2 = (Angle)parser.Get(new Angle(u, r, s));
            Angle angle3 = (Angle)parser.Get(new Angle(s, t, u));

            given.Add(new Strengthened(angle1, new RightAngle(angle1)));
            given.Add(new GeometricCongruentAngles(angle2, angle3));

            Quadrilateral quad = (Quadrilateral)parser.Get(new Quadrilateral(ur, st, rs, tu));
            goals.Add(new Strengthened(quad, new Rectangle(quad)));
        }
Esempio n. 31
0
 /// <summary>
 /// This event is called when the segment1 combo box changes its selction.
 /// The method will update the segment2 combo box to reflect viable combinations with segment1.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Segment1_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     segment2.ItemsSource = null;
     GeometryTutorLib.ConcreteAST.Segment selection = segment1.SelectedValue as GeometryTutorLib.ConcreteAST.Segment;
     if (selection != null)
     {
         segment2.ItemsSource = options[selection];
     }
 }
Esempio n. 32
0
        public static ConcreteAST.Point AcquireRestrictedPoint(List <ConcreteAST.Point> points, ConcreteAST.Point that,
                                                               ConcreteAST.Segment seg, ConcreteAST.Arc arc)
        {
            ConcreteAST.Point pt = AcquirePoint(points, that);

            if (pt == null)
            {
                return(null);
            }

            return(!seg.PointLiesOnAndBetweenEndpoints(pt) || !arc.PointLiesOn(pt) ? null : pt);
        }
Esempio n. 33
0
 protected override GroundedClause MakeClause()
 {
     GeometryTutorLib.ConcreteAST.Segment s1 = segment1.SelectedValue as GeometryTutorLib.ConcreteAST.Segment;
     GeometryTutorLib.ConcreteAST.Segment s2 = segment2.SelectedValue as GeometryTutorLib.ConcreteAST.Segment;
     if (s1 != null && s2 != null)
     {
         return(new GeometricParallel(s1, s2));
     }
     else
     {
         return(null);
     }
 }
        private static int GetComposableCycleWithSegment(UndirectedPlanarGraph.PlanarGraph graph,
                                                         List <MinimalCycle> cycles,
                                                         GeometryTutorLib.ConcreteAST.Segment segment)
        {
            for (int c = 0; c < cycles.Count; c++)
            {
                if (cycles[c].HasThisExtendedSegment(graph, segment))
                {
                    return(c);
                }
            }

            return(-1);
        }
Esempio n. 35
0
        /// <summary>
        /// Figure out what possible segment combinations are before showing the window.
        /// </summary>
        protected override void OnShow()
        {
            options = new Dictionary <GeometryTutorLib.ConcreteAST.Segment, List <GeometryTutorLib.ConcreteAST.Segment> >();

            //Get a list of all congruent segment givens
            List <GroundedClause> psegs = new List <GroundedClause>();

            foreach (GroundedClause gc in currentGivens)
            {
                GeometricParallel pseg = gc as GeometricParallel;
                if (pseg != null)
                {
                    psegs.Add(pseg);
                }
            }

            //Pick a first segment...
            foreach (GeometryTutorLib.ConcreteAST.Segment ts1 in parser.backendParser.implied.segments)
            {
                List <GeometryTutorLib.ConcreteAST.Segment> possible = new List <GeometryTutorLib.ConcreteAST.Segment>();
                GeometryTutorLib.ConcreteAST.Segment        s1       = new GeometryTutorLib.ConcreteAST.Segment(ts1.Point1, ts1.Point2);

                //... and see what other segments are viable second options.
                foreach (GeometryTutorLib.ConcreteAST.Segment ts2 in parser.backendParser.implied.segments)
                {
                    GeometryTutorLib.ConcreteAST.Segment s2 = new GeometryTutorLib.ConcreteAST.Segment(ts2.Point1, ts2.Point2);
                    if (s1.IsParallelWith(s2))
                    {
                        GeometricParallel pseg = new GeometricParallel(s1, s2);

                        if (!s1.StructurallyEquals(s2) && !StructurallyContains(psegs, pseg))
                        {
                            possible.Add(s2);
                        }
                    }
                }

                //If we found a possible list of combinations, add it to the dictionary
                if (possible.Count > 0)
                {
                    options.Add(s1, possible);
                }
            }

            //Set the options of the segment1 combo box
            segment1.ItemsSource = null; //Graphical refresh
            segment1.ItemsSource = options.Keys;
        }
Esempio n. 36
0
        /// <summary>
        /// Parse a line.
        /// </summary>
        /// <param name="line">The line to parse.</param>
        private void ParseLine(ILine uiLine)
        {
            //
            // Parse the constituent points.
            //
            IPoint p1 = uiLine.Dependencies.FindPoint(uiLine.Coordinates.P1, 0);
            IPoint p2 = uiLine.Dependencies.FindPoint(uiLine.Coordinates.P2, 0);

            Parse(p1);
            Parse(p2);

            // Create the tutor segments
            GeometryTutorLib.ConcreteAST.Segment tutorSeg = new GeometryTutorLib.ConcreteAST.Segment(uiToEngineMap[p1] as Point, uiToEngineMap[p2] as Point);

            // TempSegs.Add(new TempSegment(s.Point1, s.Point2));

            uiToEngineMap.Add(uiLine, tutorSeg);

            definedSegments.Add(tutorSeg);
        }
        //
        // If a cycle has an edge that is EXTENDED, there exist two regions, one on each side of the segment; compose the two segments.
        //
        // Fixed point algorithm: while there exists a cycle with an extended segment, compose.
        private static void ComposeCycles(UndirectedPlanarGraph.PlanarGraph graph, List <MinimalCycle> cycles)
        {
            for (int cycleIndex = HasComposableCycle(graph, cycles); cycleIndex != -1; cycleIndex = HasComposableCycle(graph, cycles))
            {
                // Get the cycle and remove it from the list.
                MinimalCycle thisCycle = cycles[cycleIndex];

                cycles.RemoveAt(cycleIndex);

                // Get the extended segment which is the focal segment of composition.
                GeometryTutorLib.ConcreteAST.Segment extendedSeg = thisCycle.GetExtendedSegment(graph);

                // Find the matching cycle that has the same Extended segment
                int          otherIndex = GetComposableCycleWithSegment(graph, cycles, extendedSeg);
                MinimalCycle otherCycle = cycles[otherIndex];
                cycles.RemoveAt(otherIndex);

                // Compose the two cycles into a single cycle.
                MinimalCycle composed = thisCycle.Compose(otherCycle, extendedSeg);

                // Add the new, composed cycle
                cycles.Add(composed);
            }
        }
Esempio n. 38
0
        // Simple function for creating a point (if needed since it is not labeled by the UI).
        private Point HandleIntersectionPoint(List <Point> containment, List <Point> toAdd, GeometryTutorLib.ConcreteAST.Segment segment, Point pt)
        {
            if (pt == null)
            {
                return(null);
            }

            // The point must be between the endpoints of the segment
            if (!segment.PointLiesOnAndBetweenEndpoints(pt))
            {
                return(null);
            }

            return(HandleIntersectionPoint(containment, toAdd, pt));
        }
Esempio n. 39
0
 //public PerpendicularBisector(Point i, Segment l, Segment bisector, string just) : base(i, l, bisector, just)
 //{
 //    this.bisector = bisector;
 //}
 public PerpendicularBisector(Intersection inter, Segment bisector) : base(inter)
 {
     this.bisector = bisector;
 }
Esempio n. 40
0
        public Intersection GetIntersection(GeometryTutorLib.ConcreteAST.Segment segment1, GeometryTutorLib.ConcreteAST.Segment segment2)
        {
            Point inter = (Point)Get(segment1.FindIntersection(segment2));

            return((Intersection)Get(new Intersection(inter, segment1, segment2)));
        }