//
        // Collinear(A, B, C, D, ...) -> Angle(A, B, C), Angle(A, B, D), Angle(A, C, D), Angle(B, C, D),...
        // All angles will have measure 180^o
        // There will be nC3 resulting clauses.
        //
        public static List<EdgeAggregator> Instantiate(GroundedClause clause)
        {
            annotation.active = EngineUIBridge.JustificationSwitch.STRAIGHT_ANGLE_DEFINITION;

            List<EdgeAggregator> newGrounded = new List<EdgeAggregator>();

            Collinear cc = clause as Collinear;
            if (cc == null) return newGrounded;

            for (int i = 0; i < cc.points.Count - 2; i++)
            {
                for (int j = i + 1; j < cc.points.Count - 1; j++)
                {
                    for (int k = j + 1; k < cc.points.Count; k++)
                    {
                        Angle newAngle = new Angle(cc.points[i], cc.points[j], cc.points[k]);
                        List<GroundedClause> antecedent = Utilities.MakeList<GroundedClause>(cc);
                        newGrounded.Add(new EdgeAggregator(antecedent, newAngle, annotation));
                    }
                }
            }

            return newGrounded;
        }
Beispiel #2
0
 public GeometricCongruentAngles(Angle a1, Angle a2) : base(a1, a2)
 {
 }
 public AlgebraicCongruentAngles(Angle a1, Angle a2) : base(a1, a2)
 {
 }
Beispiel #4
0
 //
 // Is this angle proportional to the given segment in terms of the coordinatization from the UI?
 // We should not report proportional if the ratio between segments is 1
 //
 public KeyValuePair <int, int> CoordinateProportional(Angle a)
 {
     return(Utilities.RationalRatio(a.measure, this.measure));
 }
Beispiel #5
0
 //
 // Is this angle congruent to the given angle in terms of the coordinatization from the UI?
 //
 public bool CoordinateCongruent(Angle a)
 {
     return(Utilities.CompareValues(a.measure, this.measure));
 }
Beispiel #6
0
 public bool IsSupplementaryTo(Angle thatAngle)
 {
     return(Utilities.CompareValues(this.measure + thatAngle.measure, 180));
 }
Beispiel #7
0
        public static GenericInstantiator.EdgeAggregator GenerateAngleCongruence(Triangle tri, Angle angle)
        {
            //
            // If we have already generated a reflexive congruence, avoid regenerating
            //
            foreach (Angle oldSharedAngle in knownSharedAngles)
            {
                if (oldSharedAngle.Equates(angle))
                {
                    return(null);
                }
            }

            // Generate
            GeometricCongruentAngles gcas = new GeometricCongruentAngles(angle, angle);

            // This is an 'obvious' notion so it should be intrinsic to any figure
            gcas.MakeIntrinsic();

            return(new GenericInstantiator.EdgeAggregator(Utilities.MakeList <GroundedClause>(Angle.AcquireFigureAngle(angle)), gcas, reflexAnnotation));
        }
Beispiel #8
0
 public Point SameVertex(Angle ang)
 {
     return(GetVertex().Equals(ang.GetVertex()) ? GetVertex() : null);
 }