protected void DrawHull(ref Canvas imageObject)
 {
     Stack<Point> convexHull = LinearAlgebra.GetConvexHull(leaves);
     Point startPoint = convexHull.Pop();
     Point p1 = startPoint;
     while (convexHull.Count() > 0)
     {
         Point p2 = convexHull.Pop();
         imageObject.DrawLine(color, hullWidth, p1, p2);
         p1 = p2;
         if (convexHull.Count == 0)
         {
             imageObject.DrawLine(color, hullWidth, p1, startPoint);
         }
     }
 }
 protected void DrawBranches(ref Canvas imageObject)
 {
     for (int i = 0; i < previousGen.Count(); i++)
     {
         Point parent = new Point(previousGen[i].X, previousGen[i].Y);
         Point leaf = new Point(leaves[i].X, leaves[i].Y);
         imageObject.DrawLine(color, branchWidth, parent, leaf);
     }
 }