public void FindIntersection2() { var polygon = new Polygon(Color.White); polygon.AddPoint(23, 4); polygon.AddPoint(12, 36); polygon.AddPoint(36, 34); //edge1 polygon.AddPoint(23, 13); //edge1 polygon.AddPoint(28, 24); //edge2 polygon.AddPoint(28, 18); //edge2 Assert.IsTrue(polygon.IsSelfIntersecting()); }
public void FindIntersection1() { var polygon = new Polygon(Color.White); polygon.AddPoint(33, 18); polygon.AddPoint(25, 1); polygon.AddPoint(8, 13); polygon.AddPoint(13, 26); polygon.AddPoint(34, 36); polygon.AddPoint(28, 14); polygon.AddPoint(30, 19); polygon.AddPoint(30, 9); Assert.IsTrue(polygon.IsSelfIntersecting()); }
public void FindIntersection2() { var polygon = new Polygon(Color.White); polygon.AddPoint(23, 4); polygon.AddPoint(12, 36); polygon.AddPoint(36, 34); //edge1 polygon.AddPoint(23, 13); //edge1 polygon.AddPoint(28,24); //edge2 polygon.AddPoint(28,18); //edge2 Assert.IsTrue(polygon.IsSelfIntersecting()); }
public void FindIntersection1() { var polygon = new Polygon(Color.White); polygon.AddPoint(33,18); polygon.AddPoint(25, 1); polygon.AddPoint(8, 13); polygon.AddPoint(13, 26); polygon.AddPoint(34, 36); polygon.AddPoint(28, 14); polygon.AddPoint(30, 19); polygon.AddPoint(30, 9); Assert.IsTrue(polygon.IsSelfIntersecting()); }