Example #1
0
        //Demonstrates: Tangents are perpendicular to radii
        public Page296Theorem7_1(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point o = new Point("O", 0, 0); points.Add(o);
            Point r = new Point("R", -3, -5); points.Add(r);
            Point s = new Point("S", 8, -5); points.Add(s);
            Point t = new Point("T", 0, -5); points.Add(t);

            Segment ot = new Segment(o, t); segments.Add(ot);

            List<Point> pnts = new List<Point>();
            pnts.Add(r);
            pnts.Add(t);
            pnts.Add(s);
            collinear.Add(new Collinear(pnts));

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

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

            Segment rs = (Segment)parser.Get(new Segment(r, s));

            CircleSegmentIntersection cInter = (CircleSegmentIntersection)parser.Get(new CircleSegmentIntersection(t, c, rs));
            given.Add(new Strengthened(cInter, new Tangent(cInter)));

            Intersection inter = parser.GetIntersection(ot, rs);
            goals.Add(new Strengthened(inter, new Perpendicular(inter)));
        }
Example #2
0
        //Demonstrates: Use of AngleArc equation, Central angle equal to intercepted arc
        public Test01(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point o = new Point("O", 0, 0); points.Add(o);
            Point a = new Point("A", -5, 0); points.Add(a);
            Point b = new Point("B", 5, 0); points.Add(b);
            Point c = new Point("C", 0, 5); points.Add(c);

            Segment oc = new Segment(o, c); segments.Add(oc);

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

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

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

            MinorArc m1 = (MinorArc)parser.Get(new MinorArc(circle, a, c));
            MinorArc m2 = (MinorArc)parser.Get(new MinorArc(circle, b, c));

            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(a, o, c)), (Angle)parser.Get(new Angle(b, o, c))));
            goals.Add(new GeometricCongruentArcs(m1, m2));
        }
Example #3
0
        public Circle OtherCircle(Circle thatCircle)
        {
            if (cc1.StructurallyEquals(thatCircle)) return cc2;
            if (cc2.StructurallyEquals(thatCircle)) return cc1;

            return null;
        }
Example #4
0
        public Page4prob17(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point a = new Point("A", -System.Math.Sqrt(27), 3); points.Add(a);
            Point b = new Point("B", System.Math.Sqrt(27), 3); points.Add(b);
            Point o = new Point("O", 0, 0); points.Add(o);
            Point p = new Point("P", 0, -6); points.Add(p);

            Segment ab = new Segment(a, b); segments.Add(ab);
            Segment op = new Segment(o, p); segments.Add(op);
            Segment ao = new Segment(a, o); segments.Add(ao);
            Segment bo = new Segment(b, o); segments.Add(bo);

            Circle circle = new Circle(o, 6.0);
            circles.Add(circle);

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

            known.AddSegmentLength(op, 6);
            given.Add(new GeometricArcEquation((MinorArc)parser.Get(new MinorArc(circle, a, b)), new NumericValue(120)));

            List<Point> unwanted = new List<Point>();
            unwanted.Add(new Point("", 5, 3.3));
            goalRegions = parser.implied.GetAllAtomicRegionsWithoutPoints(unwanted);

            SetSolutionArea(24 * System.Math.PI + (9 * System.Math.Sqrt(3)));

            problemName = "Jurgensen Page 4 Problem 17";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
Example #5
0
        //Demonstrates: Minor Arcs Congruent if central angles congruent
        public Test10(bool onoff, bool complete)
            : base(onoff, complete)
        {
            //Circle center
            Point o = new Point("O", 0, 0); points.Add(o);

            //Vertices for angle TOV, a central angle of circle O, with one endpoint at 90 degrees and another at 30 degrees
            Point t = new Point("T", -3, 4); points.Add(t);
            Point v = new Point("V", 0, 5); points.Add(v);

            //Vertices for angle VOA, a central angle of circle C, with one endpoint at 90 degrees and another at 30 degrees
            Point a = new Point("A", 3, 4); points.Add(a);

            Segment ot = new Segment(o, t); segments.Add(ot);
            Segment ov = new Segment(o, v); segments.Add(ov);
            Segment oa = new Segment(o, a); segments.Add(oa);

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

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

            given.Add(new GeometricCongruentArcs((MinorArc)parser.Get(new MinorArc(circleO, t, v)), (MinorArc)parser.Get(new MinorArc(circleO, v, a))));

            goals.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(t, o, v)), (Angle)parser.Get(new Angle(v, o, a))));
        }
        //Demonstrates: congruent chords have congruent arcs
        public Page306Theorem7_4_1(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point o = new Point("O", 0, 0); points.Add(o);
            Point r = new Point("R", -3, 4); points.Add(r);
            Point s = new Point("S", 2, Math.Sqrt(21)); points.Add(s);
            Point t = new Point("T", 2, -Math.Sqrt(21)); points.Add(t);
            Point u = new Point("U", -3, -4); points.Add(u);

            Segment rt = new Segment(r, t);
            Segment su = new Segment(s, u);
            Point v = rt.FindIntersection(su); points.Add(v);

            Segment rs = new Segment(r, s); segments.Add(rs);
            Segment ut = new Segment(u, t); segments.Add(ut);

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

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

            given.Add(new GeometricCongruentSegments(rs, ut));

            MinorArc a1 = (MinorArc)parser.Get(new MinorArc(c, r, s));
            MinorArc a2 = (MinorArc)parser.Get(new MinorArc(c, t, u));
            MajorArc ma1 = (MajorArc)parser.Get(new MajorArc(c, r, s));
            MajorArc ma2 = (MajorArc)parser.Get(new MajorArc(c, t, u));

            goals.Add(new GeometricCongruentArcs(a1, a2));
            goals.Add(new GeometricCongruentArcs(ma1, ma2));
        }
Example #7
0
        public Page4Prob15(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point a = new Point("A", 0, 8); points.Add(a);
            Point b = new Point("B", 8, 0); points.Add(b);
            Point o = new Point("O", 0, 0); points.Add(o);

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

            Circle circle = new Circle(o, 8.0);
            circles.Add(circle);

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

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

            known.AddAngleMeasureDegree(aob, 90);
            known.AddSegmentLength(bo, 8);

            List<Point> wanted = new List<Point>();
            wanted.Add(new Point("", 7.5, 2.5));
            goalRegions = parser.implied.GetAtomicRegionsByPoints(wanted);

            SetSolutionArea(16 * System.Math.PI - 32);

            problemName = "Jurgensen Page 4 Problem 15";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
Example #8
0
        //Demonstrates: ChordTangentAngleHalfInterceptedArc
        public Test02(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point o = new Point("O", 0, 0); points.Add(o);
            Point r = new Point("R", -3, -5); points.Add(r);
            Point s = new Point("S", 8, -5); points.Add(s);
            Point t = new Point("T", 0, -5); points.Add(t);
            Point u = new Point("U", -3, 4); points.Add(u);
            Point v = new Point("V", 3, 4); points.Add(v);

            Segment tu = new Segment(t, u); segments.Add(tu);
            Segment tv = new Segment(t, v); segments.Add(tv);

            List<Point> pnts = new List<Point>();
            pnts.Add(r);
            pnts.Add(t);
            pnts.Add(s);
            collinear.Add(new Collinear(pnts));

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

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

            MinorArc m1 = (MinorArc)parser.Get(new MinorArc(c, t, u));
            MinorArc m2 = (MinorArc)parser.Get(new MinorArc(c, t, v));
            Segment rs = (Segment)parser.Get(new Segment(r, s));

            CircleSegmentIntersection cInter = (CircleSegmentIntersection)parser.Get(new CircleSegmentIntersection(t, c, rs));

            given.Add(new Strengthened(cInter, new Tangent(cInter)));
            given.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(r, t, u)), (Angle)parser.Get(new Angle(s, t, v))));

            goals.Add(new GeometricCongruentArcs(m1, m2));
        }
        //Demonstrates: congruent chords have congruent arcs
        public Page306Theorem7_4_1_Semicircle(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point o = new Point("O", 0, 0); points.Add(o);
            Point c = new Point("C", 15, 0); points.Add(c);

            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", 2, Math.Sqrt(21)); points.Add(u);

            Point a = new Point("A", 12, 4); points.Add(a);
            Point b = new Point("B", 18, -4); points.Add(b);
            Point d = new Point("D", 16, -Math.Sqrt(24)); points.Add(d);

            Segment st = new Segment(s, t); segments.Add(st);
            Segment ab = new Segment(a, b); segments.Add(ab);
            Segment ou = new Segment(o, u); segments.Add(ou);
            Segment cd = new Segment(c, d); segments.Add(cd);

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

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

            given.Add(new GeometricCongruentSegments(st, ab));

            Semicircle semi1 = (Semicircle)parser.Get(new Semicircle(c1, s, t, u, st));
            Semicircle semi2 = (Semicircle)parser.Get(new Semicircle(c2, a, b, d,ab));
            goals.Add(new GeometricCongruentArcs(semi1, semi2));
        }
Example #10
0
        //
        // If no radii are drawn, construct them as well as the chords connecting them.
        //
        private void AddImpliedSegments(GeometryTutorLib.ConcreteAST.Circle circle)
        {
            List <GeometryTutorLib.ConcreteAST.Segment> constructedChords = new List <GeometryTutorLib.ConcreteAST.Segment>();
            List <GeometryTutorLib.ConcreteAST.Segment> constructedRadii  = new List <GeometryTutorLib.ConcreteAST.Segment>();
            List <Point> imagPoints = new List <Point>();

            List <GeometryTutorLib.ConcreteAST.Point> interPts = circle.GetIntersectingPoints();

            // If there are no points of interest, the circle is the atomic region.
            if (!interPts.Any())
            {
                return;
            }

            // Construct the radii
            foreach (Point interPt in interPts)
            {
                GeometryTutorLib.Utilities.AddStructurallyUnique <GeometryTutorLib.ConcreteAST.Segment>(implied.segments,
                                                                                                        new GeometryTutorLib.ConcreteAST.Segment(circle.center, interPt));
            }

            // Construct the chords
            for (int p1 = 0; p1 < interPts.Count - 1; p1++)
            {
                for (int p2 = p1 + 1; p2 < interPts.Count; p2++)
                {
                    GeometryTutorLib.Utilities.AddStructurallyUnique <GeometryTutorLib.ConcreteAST.Segment>(implied.segments,
                                                                                                            new GeometryTutorLib.ConcreteAST.Segment(interPts[p1], interPts[p2]));
                }
            }
        }
        //Demonstrates: A segment perpendicular to a radius is a tangent, tangents from point are congruent
        public Page296Theorem7_1_Test3(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point o = new Point("O", 0, 0); points.Add(o);

            //Intersection point for two tangents
            Point c = new Point("C", 0, 6.25); points.Add(c);

            //Points for two tangents
            Point a = new Point("A", 3, 4); points.Add(a);
            Point b = new Point("B", -3, 4); points.Add(b);

            //Tangent and Radii segments
            Segment ac = new Segment(a, c); segments.Add(ac);
            Segment bc = new Segment(b, c); segments.Add(bc);
            Segment oa = new Segment(o, a); segments.Add(oa);
            Segment ob = new Segment(o, b); segments.Add(ob);

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

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

            Intersection inter1 = parser.GetIntersection(ac, oa);
            Intersection inter2 = parser.GetIntersection(bc, ob);
            given.Add(new Strengthened(inter1, new Perpendicular(inter1)));
            given.Add(new Strengthened(inter2, new Perpendicular(inter2)));

            //CircleSegmentIntersection cInter = (CircleSegmentIntersection)parser.Get(new CircleSegmentIntersection(a, circle, ap));
            //given.Add(new Strengthened(cInter, new Tangent(cInter)));

            goals.Add(new GeometricCongruentSegments(ac, bc));
        }
Example #12
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)));
        }
Example #13
0
        //Demonstrates: A diameter perpendicular to a chord bisects the chord
        public Page307Theorem7_5(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point o = new Point("O", 0, 0); points.Add(o);

            Point a = new Point("A", -3, -4); points.Add(a);
            Point b = new Point("B", 3, -4); points.Add(b);

            Point x = new Point("X", 0, 5); points.Add(x);
            Point y = new Point("Y", 0, -4); points.Add(y);
            Point z = new Point("Z", 0, -5); points.Add(z);

            List<Point> pnts = new List<Point>();
            pnts.Add(x);
            pnts.Add(o);
            pnts.Add(y);
            pnts.Add(z);
            collinear.Add(new Collinear(pnts));

            pnts = new List<Point>();
            pnts.Add(a);
            pnts.Add(y);
            pnts.Add(b);
            collinear.Add(new Collinear(pnts));

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

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

            Intersection inter = (Intersection)parser.Get(new Intersection(y, (Segment)parser.Get(new Segment(x, z)), (Segment)parser.Get(new Segment(a, b))));
            given.Add(new Strengthened(inter, new Perpendicular(inter)));

            goals.Add(new GeometricCongruentSegments((Segment)parser.Get(new Segment(a, y)), (Segment)parser.Get(new Segment(b, y))));
        }
Example #14
0
        public Page8Row6Prob43(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point a = new Point("A", 0, 15); points.Add(a);
            Point b = new Point("B", 0, 10); points.Add(b);
            Point c = new Point("C", 0, 5); points.Add(c);
            Point d = new Point("D", 0, 0); points.Add(d);
            Point e = new Point("E", 0, -5); points.Add(e);
            Point f = new Point("F", 0, -10); points.Add(f);
            Point g = new Point("G", 0, -15); points.Add(g);

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

            Circle outer = new Circle(c, 15);
            Circle top = new Circle(b, 5);
            Circle mid1 = new Circle(c, 10);
            Circle mid2 = new Circle(e, 10);
            Circle bottom = new Circle(f, 5);

            circles.Add(outer);
            circles.Add(top);
            circles.Add(mid1);
            circles.Add(mid2);
            circles.Add(bottom);

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

            Segment ag = (Segment)parser.Get(new Segment(a, g));
            known.AddSegmentLength(ag, 30);

            //Problem is slightly ambiguous as written, appears to be reliant on assumption:
            //The three 'stacked' segments of the diameter each make up 1/3 of the total length
            Segment ac = (Segment)parser.Get(new Segment(a, c));
            ac.multiplier = 3;
            Segment ae = (Segment)parser.Get(new Segment(a, e));
            ae.multiplier = 2;
            given.Add(new GeometricSegmentEquation(ac, ag));
            given.Add(new GeometricSegmentEquation(ae, ag));
            given.Add(new GeometricCongruentCircles(top, bottom));
            given.Add(new GeometricCongruentCircles(mid1, mid2));

            List<Point> wanted = new List<Point>();
            wanted.Add(new Point("", 1, 5));
            wanted.Add(new Point("", 7.5, 5));
            wanted.Add(new Point("", 12.5, 5));
            goalRegions = parser.implied.GetAtomicRegionsByPoints(wanted);

            SetSolutionArea(150 * System.Math.PI);

            problemName = "Glencoe Page 8 Row 6 Problem 43";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
Example #15
0
        public Page2Prob18(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 ab = new Segment(a, b); segments.Add(ab);
            Segment ao = new Segment(a, o); segments.Add(ao);
            Segment bo = new Segment(b, o); segments.Add(bo);

            Circle theCircle = new Circle(o, 4);
            circles.Add(theCircle);

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

            MinorArc arcAB = (MinorArc)parser.Get(new MinorArc(theCircle, a, b));
            given.Add(new GeometricArcEquation(arcAB, new NumericValue(90.0)));
            known.AddArcMeasureDegree(arcAB, 90.0);
            known.AddSegmentLength(ao, 4.0);
            known.AddSegmentLength(bo, 4.0);

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

            SetSolutionArea(45.69911184);

            problemName = "Jurgensen Page 2 Problem 18";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
        //Demonstrates: An angle inscribed in a semi circle is a right angle
        public Page312Theorem7_7_Semicircle(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point o = new Point("O", 0, 0); points.Add(o);

            //diameter points plus extra point to define semicircle
            Point a = new Point("A", -5, 0); points.Add(a);
            Point b = new Point("B", 5, 0); points.Add(b);
            Point c = new Point("C", 1, -Math.Sqrt(24)); points.Add(c);

            //vertex point
            Point x = new Point("X", -2, -Math.Sqrt(21)); points.Add(x);

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

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

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

            Angle angle = (Angle)parser.Get(new Angle(a, x, b));
            goals.Add(new Strengthened(angle, new RightAngle(angle)));
        }
Example #17
0
        public Page7Prob26(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point a = new Point("A", 0, 0); points.Add(a);
            Point b = new Point("B", 0, 4); points.Add(b);
            Point c = new Point("C", 4, 4); points.Add(c);
            Point d = new Point("D", 4, 0); points.Add(d);
            Point o = new Point("O", 2, 2); points.Add(o);
            Point p = new Point("P", 0, 2); points.Add(p);
            Point q = new Point("Q", 4, 2); points.Add(q);

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

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

            pts = new List<Point>();
            pts.Add(p); pts.Add(o); pts.Add(q);
            collinear.Add(new Collinear(pts));

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

            Circle circle = new Circle(o, 2);
            circles.Add(circle);

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

            Segment cd = (Segment)parser.Get(new Segment(c, d));
            Angle a1 = (Angle)parser.Get(new Angle(a, b, c));
            Angle a2 = (Angle)parser.Get(new Angle(b, c, d));
            Angle a3 = (Angle)parser.Get(new Angle(c, d, a));
            Angle a4 = (Angle)parser.Get(new Angle(d, a, b));
            CircleSegmentIntersection cInter = (CircleSegmentIntersection)parser.Get(new CircleSegmentIntersection(q, circle, cd));

            known.AddSegmentLength(da, 4);
            known.AddSegmentLength(cd, 4);

            given.Add(new Strengthened(a1, new RightAngle(a1)));
            given.Add(new Strengthened(a2, new RightAngle(a2)));
            given.Add(new Strengthened(a3, new RightAngle(a3)));
            given.Add(new Strengthened(a4, new RightAngle(a4)));
            given.Add(new GeometricSegmentEquation(da, new NumericValue(4)));
            given.Add(new GeometricSegmentEquation(cd, new NumericValue(4)));
            given.Add(new Strengthened(cInter, new Tangent(cInter)));

            List<Point> unwanted = new List<Point>();
            unwanted.Add(new Point("", 0.1, 3.8));
            unwanted.Add(new Point("", 3.9, 3.8));
            goalRegions = parser.implied.GetAllAtomicRegionsWithoutPoints(unwanted);

            SetSolutionArea(8 + 2 * System.Math.PI);

            problemName = "McDougall Page 7 Problem 24";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
Example #18
0
        public Page5Row5Prob17(bool onoff, bool complete)
            : base(onoff, complete)
        {
            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", 6, 6); points.Add(c);
            Point d = new Point("D", 6, 0); points.Add(d);

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

            Point x = new Point("X", 0, 3.0); points.Add(x);
            Point y = new Point("Y", 6, 3.0); points.Add(y);

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

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

            Circle circleX = new Circle(x, 3.0);
            Circle circleY = new Circle(y, 3.0);
            circles.Add(circleX);
            circles.Add(circleY);

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

            CircleSegmentIntersection cInter1 = (CircleSegmentIntersection)parser.Get(new CircleSegmentIntersection(b, circleX, bc));
            CircleSegmentIntersection cInter2 = (CircleSegmentIntersection)parser.Get(new CircleSegmentIntersection(c, circleY, bc));
            CircleSegmentIntersection cInter3 = (CircleSegmentIntersection)parser.Get(new CircleSegmentIntersection(a, circleX, da));
            CircleSegmentIntersection cInter4 = (CircleSegmentIntersection)parser.Get(new CircleSegmentIntersection(d, circleY, da));

            given.Add(new GeometricCongruentSegments(da, (Segment)parser.Get(new Segment(a, b))));
            given.Add(new GeometricCongruentSegments(da, (Segment)parser.Get(new Segment(c, d))));
            given.Add(new Strengthened(cInter1, new Tangent(cInter1)));
            given.Add(new Strengthened(cInter2, new Tangent(cInter2)));
            given.Add(new Strengthened(cInter3, new Tangent(cInter3)));
            given.Add(new Strengthened(cInter4, new Tangent(cInter4)));

            known.AddSegmentLength(da, 6);
            known.AddSegmentLength((Segment)parser.Get(new Segment(a, b)), 6);
            known.AddSegmentLength((Segment)parser.Get(new Segment(c, d)), 6);

            List<Point> wanted = new List<Point>();
            wanted.Add(new Point("", 3, .5));
            wanted.Add(new Point("", 3, 5.5));
            goalRegions = parser.implied.GetAtomicRegionsByPoints(wanted);

            SetSolutionArea(36 - System.Math.PI * 3 * 3);

            problemName = "Jurgensen Page 5 Problem 17";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
Example #19
0
        public Page2Prob20(bool onoff, bool complete)
            : base(onoff, complete)
        {
            double x = System.Math.Sqrt(3);
            double y = 1;
            Point a = new Point("A", -x, y); points.Add(a);
            Point b = new Point("B", x, y); points.Add(b);
            Point c = new Point("C", -x, -y); points.Add(c);
            Point d = new Point("D", x, -y); points.Add(d);
            Point o = new Point("O", 0, 0); points.Add(o);

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

            List<Point> pnts = new List<Point>();
            pnts.Add(a);
            pnts.Add(o);
            pnts.Add(d);
            collinear.Add(new Collinear(pnts));

            pnts = new List<Point>();
            pnts.Add(b);
            pnts.Add(o);
            pnts.Add(c);
            collinear.Add(new Collinear(pnts));

            Circle circle = new Circle(o, 2);
            circles.Add(circle);

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

            MinorArc arcAB = (MinorArc)parser.Get(new MinorArc(circle, a, b));
            MinorArc arcBD = (MinorArc)parser.Get(new MinorArc(circle, b, d));
            MinorArc arcDC = (MinorArc)parser.Get(new MinorArc(circle, d, c));
            MinorArc arcAC = (MinorArc)parser.Get(new MinorArc(circle, a, c));

            known.AddSegmentLength(ac, 2);
            known.AddArcMeasureDegree(arcAB, 120);
            known.AddArcMeasureDegree(arcBD, 60);
            known.AddArcMeasureDegree(arcDC, 120);
            known.AddArcMeasureDegree(arcAC, 60);

            given.Add(new GeometricArcEquation(arcAB, new NumericValue(120)));
            given.Add(new GeometricArcEquation(arcBD, new NumericValue(60)));
            given.Add(new GeometricArcEquation(arcDC, new NumericValue(120)));
            given.Add(new GeometricArcEquation(arcAC, new NumericValue(60)));

            List<Point> unwanted = new List<Point>();
            unwanted.Add(new Point("", 0, y+0.2));
            unwanted.Add(new Point("", 0, -y-0.2));
            goalRegions = parser.implied.GetAllAtomicRegionsWithoutPoints(unwanted);

            SetSolutionArea((4.0 / 3.0) * System.Math.PI + 2.0 * System.Math.Sqrt(3.0));

            problemName = "Jurgensen Page 2 Problem 20";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
Example #20
0
 public MajorArc(Circle circle, Point e1, Point e2, List<Point> minorPts, List<Point> majorPts)
     : base(circle, e1, e2, minorPts, majorPts)
 {
     if (circle.DefinesDiameter(new Segment(e1, e2)))
     {
         System.Diagnostics.Debug.WriteLine("Major Arc should not be constructed when a semicircle is appropriate.");
     }
 }
Example #21
0
        //Demonstrates: ExteriorAngleHalfDifferenceInterceptedArcs : two secants
        public Test04(bool onoff, bool complete)
            : base(onoff, complete)
        {
            //Circle
            Point o = new Point("O", 0, 0); points.Add(o);
            Circle circleO = new Circle(o, 5.0);
            circles.Add(circleO);

            //Intersection point for two secants
            Point x = new Point("X", 0, 6); points.Add(x);

            //Secant intersection points for circle O
            Point a = new Point("A", -3, -4); points.Add(a);
            Point b = new Point("B", 3, -4); points.Add(b);
            Point c, d, trash;
            circleO.FindIntersection(new Segment(b, x), out c, out trash);
            if (b.StructurallyEquals(c)) c = trash;
            c = new Point("C", c.X, c.Y);
            points.Add(c);
            circleO.FindIntersection(new Segment(a, x), out d, out trash);
            if (a.StructurallyEquals(d)) d = trash;
            d = new Point("D", d.X, d.Y);
            points.Add(d);

            //Create point for another arc (Arc(CE)) of equal measure to (1/2)*(Arc(AB)-Arc(CD))
            Point e = new Point("E", 3, 4); points.Add(e);

            //Should now be able to form segments for a central angle of equal measure to (1/2)*(Arc(AB)-Arc(CD))
            Segment oc = new Segment(o, c); segments.Add(oc);
            Segment oe = new Segment(o, e); segments.Add(oe);

            //Label the intersection betweeen OE and BX
            Point i = oe.FindIntersection(new Segment(b, x));
            i = new Point("I", i.X, i.Y); points.Add(i);

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

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

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

            MinorArc farMinor1 = (MinorArc)parser.Get(new MinorArc(circleO, a, b));
            MinorArc closeMinor1 = (MinorArc)parser.Get(new MinorArc(circleO, c, d));
            MinorArc centralAngleArc = (MinorArc)parser.Get(new MinorArc(circleO, c, e));
            given.Add(new GeometricArcEquation(new Multiplication(new NumericValue(2), centralAngleArc), new Subtraction(farMinor1, closeMinor1)));

            goals.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(a, x, b)), (Angle)parser.Get(new Angle(c, o, e))));
        }
Example #22
0
        public OsProb8(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point a = new Point("A", 0, 0); points.Add(a);
            Point b = new Point("B", 0, 40); points.Add(b);
            Point c = new Point("C", 40, 0); points.Add(c);
            Point n = new Point("N", 20, 20); points.Add(n);
            Point o = new Point("O", 0, 20); points.Add(o);
            Point p = new Point("P", 20, 0); points.Add(p);

            //Needed until triangles are sent for processing
            Segment on = new Segment(o, n); segments.Add(on);
            Segment pn = new Segment(p, n); segments.Add(pn);

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

            pnts = new List<Point>();
            pnts.Add(a);
            pnts.Add(p);
            pnts.Add(c);
            collinear.Add(new Collinear(pnts));

            pnts = new List<Point>();
            pnts.Add(b);
            pnts.Add(n);
            pnts.Add(c);
            collinear.Add(new Collinear(pnts));

            Circle circle1 = new Circle(o, 20);
            Circle circle2 = new Circle(p, 20);
            circles.Add(circle1);
            circles.Add(circle2);

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

            Triangle tri = (Triangle)parser.Get(new Triangle(a, b, c));
            given.Add(new Strengthened(tri, new RightTriangle(tri)));

            known.AddSegmentLength((Segment)parser.Get(new Segment(o, a)), 20);
            known.AddSegmentLength((Segment)parser.Get(new Segment(a, p)), 20);

            List<Point> wanted = new List<Point>();
            wanted.Add(new Point("", 15, 14.8));
            wanted.Add(new Point("", 15, 15.2));
            wanted.Add(new Point("", 21, 19.1));
            wanted.Add(new Point("", 18, 22.2));
            goalRegions = parser.implied.GetAtomicRegionsByPoints(wanted);

            SetSolutionArea(400 * System.Math.PI - 800);

            problemName = "Old School Problem 8";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
Example #23
0
        public TvPage1Prob6(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point a = new Point("A", 0, 0); points.Add(a);
            Point b = new Point("B", 0, 8); points.Add(b);
            Point c = new Point("C", 10, 8); points.Add(c);
            Point d = new Point("D", 10, 0); points.Add(d);
            Point o = new Point("O", 0, 2); points.Add(o);
            Point p = new Point("P", 10, 4); points.Add(p);
            Point q = new Point("Q", 0, 4); points.Add(q);

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

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

            pnts = new List<Point>();
            pnts.Add(c);
            pnts.Add(p);
            pnts.Add(d);
            collinear.Add(new Collinear(pnts));

            Circle small = new Circle(o, 2);
            Circle big = new Circle(p, 4);
            circles.Add(small);
            circles.Add(big);

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

            CircleSegmentIntersection cInter1 = (CircleSegmentIntersection)parser.Get(new CircleSegmentIntersection(c, big, bc));
            CircleSegmentIntersection cInter2 = (CircleSegmentIntersection)parser.Get(new CircleSegmentIntersection(d, big, da));
            CircleSegmentIntersection cInter3 = (CircleSegmentIntersection)parser.Get(new CircleSegmentIntersection(a, small, da));

            given.Add(new Strengthened(cInter1, new Tangent(cInter1)));
            given.Add(new Strengthened(cInter2, new Tangent(cInter2)));
            given.Add(new Strengthened(cInter3, new Tangent(cInter3)));

            known.AddSegmentLength((Segment)parser.Get(new Segment(b, q)), 4);
            known.AddSegmentLength((Segment)parser.Get(new Segment(c, d)), 8);
            known.AddSegmentLength(bc, 10);

            List<Point> unwanted = new List<Point>();
            unwanted.Add(new Point("", -0.5, 2));
            unwanted.Add(new Point("", 0.5, 2));
            goalRegions = parser.implied.GetAllAtomicRegionsWithoutPoints(unwanted);

            SetSolutionArea(80 + 6 * System.Math.PI);

            problemName = "Tutor Vista Page 1 Problem 6";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
Example #24
0
        public MgProb7(bool onoff, bool complete)
            : base(onoff, complete)
        {
            double y = 4 * System.Math.Sqrt(3);
            Point m = new Point("M", 0, 0); points.Add(m);
            Point j = new Point("J", -4, 0); points.Add(j);
            Point k = new Point("K", 0, y); points.Add(k);
            Point l = new Point("L", 4, 0); points.Add(l);
            Point n = new Point("N", -2, y / 2); points.Add(n);
            Point o = new Point("O", 2, y / 2); points.Add(o);

            Segment mk = new Segment(m, k); segments.Add(mk);
            Segment mn = new Segment(m, n); segments.Add(mn);
            Segment mo = new Segment(m, o); segments.Add(mo);

            List<Point> pnts = new List<Point>();
            pnts.Add(j);
            pnts.Add(n);
            pnts.Add(k);
            collinear.Add(new Collinear(pnts));

            pnts = new List<Point>();
            pnts.Add(k);
            pnts.Add(o);
            pnts.Add(l);
            collinear.Add(new Collinear(pnts));

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

            Circle circle = new Circle(m, 4);
            circles.Add(circle);

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

            Triangle tri = (Triangle)parser.Get(new Triangle(j, k, l));

            given.Add(new Strengthened(tri, new EquilateralTriangle(tri)));

            known.AddSegmentLength((Segment)parser.Get(new Segment(m, j)), 4);

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

            SetSolutionArea((40/3.0) * System.Math.PI - 4 * y);

            problemName = "Magoosh Problem 7";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
Example #25
0
        public CongruentCircles(Circle c1, Circle c2)
            : base()
        {
            cc1 = c1;
            cc2 = c2;

            if (!Utilities.CompareValues(c1.radius, c2.radius))
            {
                throw new ArgumentException("Circles deduced congruent when radii differ " + this);
            }
        }
        public CircleCircleIntersection(Point p, Circle c1, Circle c2)
            : base(p, c1)
        {
            otherCircle = c2;

            // Find the intersection points
            Point pt1, pt2;
            theCircle.FindIntersection(otherCircle, out pt1, out pt2);
            intersection1 = pt1;
            intersection2 = pt2;
        }
        public CircleSegmentIntersection(Point p, Circle circ, Segment thatSegment)
            : base(p, circ)
        {
            segment = thatSegment;
            isTangent = CalcTangency();

            // Find the intersection points
            Point pt1, pt2;
            theCircle.FindIntersection(segment, out pt1, out pt2);
            intersection1 = pt1;
            intersection2 = pt2;
        }
Example #28
0
        public Page4Prob19(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point a = new Point("A", 0, 0); points.Add(a);
            Point b = new Point("B", 0, 3); points.Add(b);
            Point c = new Point("C", 0, 6); points.Add(c);
            Point d = new Point("D", 4, 3); points.Add(d);
            Point e = new Point("E", 8, 0); points.Add(e);
            Point f = new Point("F", 4, 0); points.Add(f);

            Point x = new Point("X", -3, 3); points.Add(x);
            Point y = new Point("Y", 8, 6); points.Add(y);
            Point z = new Point("Z", 4, -4); points.Add(z);

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

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

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

            Circle circleI = new Circle(b, 3);
            Circle circleII = new Circle(f, 4);
            Circle circleIII = new Circle(d, 5);

            semicircles.Add(new Semicircle(circleI, a, c, x, new Segment(a, c)));
            semicircles.Add(new Semicircle(circleII, a, e, z, new Segment(a, e)));
            semicircles.Add(new Semicircle(circleIII, c, e, y, new Segment(c, e)));

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

            known.AddSegmentLength((Segment)parser.Get(new Segment(a, c)), 6);
            known.AddSegmentLength((Segment)parser.Get(new Segment(a, e)), 8);

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

            SetSolutionArea(42.25 * System.Math.PI - 30);
        }
Example #29
0
        //Demonstrates: If two inscribed angles intercept the same arc, the angles are congruent
        public Test11(bool onoff, bool complete)
            : base(onoff, complete)
        {
            //Circles
            Point o = new Point("O", 0, 0); points.Add(o);
            Circle circleO = new Circle(o, 5.0);
            circles.Add(circleO);

            Point r = new Point("R", 0, 5); points.Add(r);
            Circle circleR = new Circle(r, 10.0);
            circles.Add(circleR);

            //Chords
            Point a = new Point("A", 0, -5); points.Add(a);
            Point d = new Point("D", -5, Math.Sqrt(75) + 5); points.Add(d);
            Point e = new Point("E", 5, Math.Sqrt(75) + 5); points.Add(e);
            Point f = new Point("F", 6, 13); points.Add(f);
            Point b, c, trash;
            circleO.FindIntersection(new Segment(a, d), out b, out trash);
            if (b.StructurallyEquals(a)) b = trash;
            circleO.FindIntersection(new Segment(a, e), out c, out trash);
            if (c.StructurallyEquals(a)) c = trash;
            b = new Point("B", b.X, b.Y); points.Add(b);
            c = new Point("C", c.X, c.Y); points.Add(c);
            Point g = (new Segment(a, e)).FindIntersection(new Segment(f, d));
            g = new Point("G", g.X, g.Y); points.Add(g);

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

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

            pnts = new List<Point>();
            pnts.Add(f);
            pnts.Add(g);
            pnts.Add(d);
            collinear.Add(new Collinear(pnts));

            Segment fe = new Segment(f, e); segments.Add(fe);

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

            goals.Add(new GeometricCongruentAngles((Angle)parser.Get(new Angle(d, a, e)), (Angle)parser.Get(new Angle(d, f, e))));
        }
Example #30
0
        public Page64(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point a = new Point("A", 0, 0); points.Add(a);
            Point b = new Point("B", 6, 4); points.Add(b);
            Point c = new Point("C", 14, 4); points.Add(c);
            Point d = new Point("D", 20, 0); points.Add(d);
            Point o = new Point("O", 10, 4); points.Add(o);
            Point p = new Point("P", 10, 0); points.Add(p);

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

            List<Point> pnts = new List<Point>();
            pnts.Add(b);
            pnts.Add(o);
            pnts.Add(c);
            collinear.Add(new Collinear(pnts));

            pnts = new List<Point>();
            pnts.Add(a);
            pnts.Add(p);
            pnts.Add(d);
            collinear.Add(new Collinear(pnts));

            Circle circle = new Circle(o, 4);
            circles.Add(circle);

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

            Segment ad = (Segment)parser.Get(new Segment(a, d));
            Angle a1 = (Angle)parser.Get(new Angle(b, o, p));
            CircleSegmentIntersection cInter1 = (CircleSegmentIntersection)parser.Get(new CircleSegmentIntersection(p, circle, ad));

            given.Add(new Strengthened(a1, new RightAngle(a1)));
            given.Add(new Strengthened(cInter1, new Tangent(cInter1)));

            known.AddSegmentLength(ad, 20);
            known.AddSegmentLength((Segment)parser.Get(new Segment(b, c)), 8);

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

            SetSolutionArea(56 - 8 * System.Math.PI);

            problemName = "Collected Learning Page 64";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
Example #31
0
        public Page8Row6Prob44(bool onoff, bool complete)
            : base(onoff, complete)
        {
            Point o = new Point("O", 0, 0); points.Add(o);
            Point p = new Point("P", 2.5, 0); points.Add(p);
            Point q = new Point("Q", 5, 0); points.Add(q);
            Point r = new Point("R", 7.5, 0); points.Add(r);
            Point s = new Point("S", 10, 0); points.Add(s);
            Point t = new Point("T", 12.5, 0); points.Add(t);
            Point u = new Point("U", 15, 0); points.Add(u);

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

            Circle outer = new Circle(r, 7.5);
            Circle left = new Circle(p, 2.5);
            Circle middle = new Circle(r, 2.5);
            Circle right = new Circle(t, 2.5);

            circles.Add(outer);
            circles.Add(left);
            circles.Add(middle);
            circles.Add(right);

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

            known.AddSegmentLength((Segment)parser.Get(new Segment(o, u)), 15);

            //Problem is slightly ambiguous as written, appears to be reliant on assumption that the diameter of each inner circle is 1/3 the total diameter
            Segment oq = (Segment)parser.Get(new Segment(o, q));
            oq.multiplier = 3;
            given.Add(new GeometricSegmentEquation(oq, (Segment)parser.Get(new Segment(o, u))));
            given.Add(new GeometricCongruentCircles(left, middle));
            given.Add(new GeometricCongruentCircles(middle, right));

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

            SetSolutionArea(18.75 * System.Math.PI);

            problemName = "Glencoe Page 8 Row 6 Problem 44";
            GeometryTutorLib.EngineUIBridge.HardCodedProblemsToUI.AddProblem(problemName, points, circles, segments);
        }
        /// <summary>
        /// Parse a CircleBase.
        /// </summary>
        /// <param name="c"> The circle to parse.</param>
        private void ParseCircle(CircleBase cb)
        {
            // Acquire the defining characteristics from the UI
            IPoint center = cb.Dependencies.FindPoint(cb.Center, 0);
            double radius = cb.Radius;

            // Parse the center of the circle.
            Parse(center as IFigure);

            // Create the Tutor version of the point
            GeometryTutorLib.ConcreteAST.Circle tutorCircle = new GeometryTutorLib.ConcreteAST.Circle(uiToEngineMap[center] as Point, radius);

            // Add to the list of known circles from the UI
            circles.Add(tutorCircle);

            uiToEngineMap.Add(cb, tutorCircle);
        }
Example #33
0
        //
        // Atomize the circle by creating:
        //    (1) all radii connecting to other known polygon / circle intersection points.
        //    (2) all chords connecting the radii
        //
        //    All constructed segments may intersect at imaginary points; these need to be calculated
        //
        public static List <GeometryTutorLib.Area_Based_Analyses.Atomizer.AtomicRegion> Atomize(GeometryTutorLib.ConcreteAST.Circle circle)
        {
            List <GeometryTutorLib.Area_Based_Analyses.Atomizer.AtomicRegion> atoms = new List <GeometryTutorLib.Area_Based_Analyses.Atomizer.AtomicRegion>();
            List <GeometryTutorLib.ConcreteAST.Point> interPts = circle.GetIntersectingPoints();

            //
            // Construct the radii
            //
            List <GeometryTutorLib.ConcreteAST.Segment> radii = new List <GeometryTutorLib.ConcreteAST.Segment>();

            foreach (GeometryTutorLib.ConcreteAST.Point interPt in interPts)
            {
                radii.Add(new GeometryTutorLib.ConcreteAST.Segment(circle.center, interPt));
            }

            //
            // Construct the chords
            //
            List <GeometryTutorLib.ConcreteAST.Segment> chords = new List <GeometryTutorLib.ConcreteAST.Segment>();

            for (int p1 = 0; p1 < interPts.Count - 1; p1++)
            {
                for (int p2 = p1 + 1; p2 < interPts.Count; p2++)
                {
                    chords.Add(new GeometryTutorLib.ConcreteAST.Segment(interPts[p1], interPts[p2]));
                }
            }

            //
            // Do any of the chords intersect the radii?
            //


            //
            // Do the chords intersect each other?
            //
            return(new List <GeometryTutorLib.Area_Based_Analyses.Atomizer.AtomicRegion>());
        }