当前位置: 首页>>代码示例>>C#>>正文


C# ConcreteAST.Segment类代码示例

本文整理汇总了C#中GeometryTutorLib.ConcreteAST.Segment的典型用法代码示例。如果您正苦于以下问题:C# Segment类的具体用法?C# Segment怎么用?C# Segment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Segment类属于GeometryTutorLib.ConcreteAST命名空间,在下文中一共展示了Segment类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page66Problem16

        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)));
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:25,代码来源:Page66Problem16.cs

示例2: Page301Problem42

        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));
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:28,代码来源:Page301Problem42.cs

示例3: Page145Problem04

        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));
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:34,代码来源:Page145Problem04.cs

示例4: IPage119Problem3

        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))));
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:34,代码来源:IPage119Problem3.cs

示例5: Triangle

        /// <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();
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:34,代码来源:Triangle.cs

示例6: Page223Problem23

        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))));
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:32,代码来源:Page223Problem23.cs

示例7: Page223Problem24

        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))));
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:30,代码来源:Page223Problem24.cs

示例8: IPage123Example6

        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));
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:30,代码来源:IPage123Example6.cs

示例9: Page2Prob15

        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);
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:26,代码来源:Page2prob15.cs

示例10: Page243Problem16

        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);
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:28,代码来源:Page243Problem16.cs

示例11: Page229Problem05

        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);
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:28,代码来源:Page229Problem05.cs

示例12: IPage120Problem6

        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));
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:32,代码来源:IPage120Problem6.cs

示例13: BasicPolygonTester

        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);
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:25,代码来源:BasicPolygonTester.cs

示例14: Page273Problem39

        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)));
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:33,代码来源:Page273Problem39.cs

示例15: Page164Problem36

        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)));
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:33,代码来源:Page164Problem36.cs


注:本文中的GeometryTutorLib.ConcreteAST.Segment类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。