Click or drag to resize

PolygonMathToPointsD2D(IEnumerablePointD2D, Double, Double, Double, Double) Method

Creates integer polygon points from points consisting of doubles. The points can be transformed before converting to integers. First, the points are centered (x'=x-centerX, y'=y-centerY). Then the centered point is rotated. Lastly, the such transformated points is scaled.

Namespace: Altaxo.Geometry.Double_2D
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static IEnumerable<PointD2D> ToPointsD2D(
	this IEnumerable<PointD2D> points,
	double centerX = 0,
	double centerY = 0,
	double rotation_rad = 0,
	double scale = 1
)

Parameters

points  IEnumerablePointD2D
The original points.
centerX  Double  (Optional)
The x coordinate of the center. (first transformation x' = x - centerX).
centerY  Double  (Optional)
The y coordinate of the center. (first transformation y' = y - centerY).
rotation_rad  Double  (Optional)
The rotation in rad (second transformation x'' = Cos(phi) * x' - Sin(phi) * y', y'' = Sin(phi) * x' + Cos(phi) * y').
scale  Double  (Optional)
The scale (third transformation x''' = scale * x'', y''' = scale * y'').

Return Value

IEnumerablePointD2D
The centered, rotated and scaled points, rounded to integers.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerablePointD2D. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also