Пример #1
0
        public override Point2d ClosestPoint(Point2d from)
        {
            if (Linear)
            {
                return(new Line2d(start, end).ClosestPoint(from));
            }

            Point2d ce     = Center;
            Point2d oncirc = ce.Polar(ce.Angle(from), Radius);

            if (IsCirclePointOnArc(oncirc))
            {
                return(oncirc);
            }

            return(from.ClosestPoint(start, end));
        }
Пример #2
0
 public override Point2d ClosestPoint(Point2d from)
 {
     return(from.ClosestPoint(Perpendicular(from)));
 }