public bool Start(cVertexList p, cVertexList q) { p0.X = p0.Y = 0; if (!CheckForConvexity(p, q)) { System.Diagnostics.Debug.WriteLine("Second polygon is not convex..."); return(false); } else { B = new cVertexList(); q.ListCopy(B); n = p.n; s = q.n; m = n + m; P = new cVertexList(); cVertex v = p.head; do { cVertex t = new cVertex(v.Point.X, v.Point.Y); P.InsertBeforeHead(t); v = v.NextVertex; } while (v != p.head); j0 = ReadVertices(); output = new cVertexList(); } Vectorize(); System.Diagnostics.Debug.WriteLine("Before sorting ..."); PrintPoints(); Qsort(); System.Diagnostics.Debug.WriteLine("After sorting ... "); PrintPoints(); Convolve(); return(true); }
public void Start(cVertexList myList) { this.Vertices = new cVertexList(); myList.ListCopy(this.Vertices); ReadVertices(); if (doubleTriangle()) { ConstructHull(); LowerFaces(); Print(); } else { System.Windows.Forms.MessageBox.Show("Delaunay Failed"); } }
public void Start(cVertexList myList) { this.Vertices = new cVertexList(); myList.ListCopy(this.Vertices); ReadVertices(); if (DoubleTriangle()) { ConstructHull(); LowerFaces(); Print(); } else { throw new Exception("Delaunay Failed"); } }
/* Equivalent of main() function in the C code, * returns false if polygons are not convex */ public bool Start(cVertexList p, cVertexList q) { intersection = true; this.P = new cVertexList(); this.Q = new cVertexList(); p.ListCopy(P); q.ListCopy(Q); if (!CheckForConvexity()) { System.Diagnostics.Debug.WriteLine("Polygons are not convex..."); return(false); } else { System.Diagnostics.Debug.WriteLine("Polygons are convex..."); n = P.n; m = Q.n; inters = new cVertexList(); ConvexIntersect(P, Q, n, m); } return(true); }