Exemple #1
0
        public static double CompareSitesDistances_MAX(Edge e0, Edge e1)
        {
            double l0 = e0.SitesDistance();
            double l1 = e1.SitesDistance();

            if (l0 < l1)
            {
                return(1);
            }
            if (l0 > l1)
            {
                return(-1);
            }

            return(0);
        }
Exemple #2
0
        public List <Circle> Circles()
        {
            List <Circle> circles = new List <Circle>();

            foreach (Site s in sites)
            {
                double radius      = 0;
                Edge   nearestEdge = s.NearestEdge();

                if (!nearestEdge.IsPartOfConvexHull())
                {
                    radius = nearestEdge.SitesDistance() * 0.5;
                }

                circles.Add(new Circle(s.coord.x, s.coord.y, radius));
            }

            return(circles);
        }