Exemplo n.º 1
0
        /// <summary>
        /// Returns a coordinate that is the intersection of a line projected from a corner through a midpoint into the opposite side.
        /// </summary>
        /// <param name="point">The corner point.</param>
        /// <param name="opposingSide">The opposing side.</param>
        /// <param name="center">The center point used for creating the projection line.</param>
        /// <returns>CartesianCoordinate.</returns>
        private CartesianCoordinate projectionIntersection(
            CartesianCoordinate point,
            LineSegment opposingSide,
            CartesianCoordinate center)
        {
            if (point == center)
            {
                return(opposingSide.CoordinateOfPerpendicularProjection(center));
            }
            LineSegment segmentProjectionPartial = new LineSegment(point, center);

            return(segmentProjectionPartial.CoordinateOfSegmentProjectedToCurve(opposingSide.Curve));
        }