Exemple #1
0
        /// <summary>
        /// Skews the specified coordinate to the skewing of a containing box.
        /// </summary>
        /// <param name="coordinate">The coordinate.</param>
        /// <param name="stationaryReferencePoint">The stationary reference point of the skew box.</param>
        /// <param name="skewingReferencePoint">The skewing reference point of the skew box.</param>
        /// <param name="magnitude">The magnitude to skew along the x-axis and y-axis.</param>
        /// <returns>CartesianCoordinate.</returns>
        public static CartesianCoordinate SkewWithinBox(
            CartesianCoordinate coordinate,
            CartesianCoordinate stationaryReferencePoint,
            CartesianCoordinate skewingReferencePoint,
            CartesianOffset magnitude)
        {
            CartesianOffset skewBoxOffset = skewingReferencePoint.OffsetFrom(stationaryReferencePoint);
            double          lambdaX       = magnitude.X() / skewBoxOffset.Y();
            double          lambdaY       = magnitude.Y() / skewBoxOffset.X();

            return(Skew(coordinate, lambdaX, lambdaY));
        }
Exemple #2
0
 /// <summary>
 /// Skews the specified coordinate about the origin.
 /// </summary>
 /// <param name="coordinate">The coordinate.</param>
 /// <param name="lambda">The magnitude to skew along the x-axis and y-axis.</param>
 /// <returns>CartesianCoordinate.</returns>
 public static CartesianCoordinate Skew(CartesianCoordinate coordinate, CartesianOffset lambda)
 {
     return(Skew(coordinate, lambda.X(), lambda.Y()));
 }