public List <Trapezoid> FollowEdge(Edge edge)
        {
            List <Trapezoid> trapezoids = new List <Trapezoid>();

            trapezoids.Add(Locate(edge));
            int j = 0;

            while (edge.Q.X > trapezoids[j].RightPoint.X)
            {
                if (edge.IsAbove(trapezoids[j].RightPoint))
                {
                    trapezoids.Add(trapezoids[j].UpperRight);
                }
                else
                {
                    trapezoids.Add(trapezoids[j].LowerRight);
                }
                j += 1;
            }
            return(trapezoids);
        }
Example #2
0
 // Determines if this point lies inside the trapezoid
 public bool Contains(Point point)
 {
     return(point.X > LeftPoint.X && point.X < RightPoint.X && Top.IsAbove(point) && Bottom.IsBelow(point));
 }