Пример #1
0
 /// <summary>Converts the current instance into a polar coordinate.</summary>
 private PolarCoordinate PointDToPolarCoordinate(PointD value)
 {
     //			double Value;
     //			double TempY = -pY;
     //			if(pX == 0)
     //				Value = 0;
     //			else
     //				Value = TempY / pX;
     // Calculate the coordinate using the default: 0° = East
     // and counter-clockwise movement
     Radian Result = new Radian(Math.Atan2(-value.Y, value.X));
     PolarCoordinate Result2 = new PolarCoordinate((float)Math.Sqrt(value.X * value.X + value.Y * value.Y), Result.ToAngle(), Azimuth.East, PolarCoordinateOrientation.Counterclockwise);
     // And re-orient it at North and Clockwise
     return Result2.ToOrientation(Azimuth.North, PolarCoordinateOrientation.Clockwise);
 }
Пример #2
0
		/// <summary>Converts a polar coordinate to a highly-precise pixel coordinate.</summary>
		public PointD ToPointD(PolarCoordinate coordinate)
		{
			return coordinate.ToOrientation(pOrigin, pOrientation).Rotate(-pRotation.DecimalDegrees).ToPointD()
				.Multiply(HorizontalScale, VerticalScale).Add(HalfWidth, HalfHeight); 
		}