public void Test_Quadrilateral_With_Very_Strong_Partial_Symmetry() { // Prepare the objects var A = new LooseConfigurationObject(Point); var B = new LooseConfigurationObject(Point); var C = new LooseConfigurationObject(Point); var D = new LooseConfigurationObject(Point); var P = new ConstructedConfigurationObject(Midpoint, A, B); var Q = new ConstructedConfigurationObject(Midpoint, B, C); var R = new ConstructedConfigurationObject(Midpoint, C, D); var S = new ConstructedConfigurationObject(Midpoint, D, A); // Prepare the configuration var configuration = Configuration.DeriveFromObjects(Quadrilateral, P, Q, R, S); // Prepare the theorem // NOTE: I did not really try to make it be true in general var theorem = new Theorem(PerpendicularLines, new[] { new LineTheoremObject(P, R), new LineTheoremObject(Q, S) }); // Rank var rank = new SymmetryRanker().Rank(theorem, configuration, allTheorems: null); // Assert rank.Rounded().Should().Be((5d / 9).Rounded()); }
public void Test_Triangle_With_Partial_Symmetry() { // Prepare the objects var A = new LooseConfigurationObject(Point); var B = new LooseConfigurationObject(Point); var C = new LooseConfigurationObject(Point); var M = new ConstructedConfigurationObject(Midpoint, A, B); var N = new ConstructedConfigurationObject(Midpoint, A, C); // Prepare the configuration var configuration = Configuration.DeriveFromObjects(Triangle, A, B, C, M, N); // Prepare the theorem var theorem = new Theorem(ParallelLines, new[] { new LineTheoremObject(B, C), new LineTheoremObject(M, N) }); // Rank var rank = new SymmetryRanker().Rank(theorem, configuration, allTheorems: null); // Assert rank.Rounded().Should().Be((1d / 3).Rounded()); }
public void Test_Quadrilateral_With_Medium_Partial_Symmetry() { // Prepare the objects var A = new LooseConfigurationObject(Point); var B = new LooseConfigurationObject(Point); var C = new LooseConfigurationObject(Point); var D = new LooseConfigurationObject(Point); var P = new ConstructedConfigurationObject(Incenter, A, B, D); var Q = new ConstructedConfigurationObject(Incenter, C, B, D); // Prepare the configuration var configuration = Configuration.DeriveFromObjects(Quadrilateral, P, Q); // Prepare the theorem // NOTE: I did not really try to make it be true in general var theorem = new Theorem(PerpendicularLines, new[] { new LineTheoremObject(P, Q), new LineTheoremObject(B, D) }); // Rank var rank = new SymmetryRanker().Rank(theorem, configuration, allTheorems: null); // Assert rank.Rounded().Should().Be((3d / 9).Rounded()); }