public static Shape2 Mirror(this Shape2 shape, Vector2 center) { return(shape.Transform(p => p - 2 * (p - center))); }
public static Shape2 Move(this Shape2 shape, Vector2 move) { return(shape.Transform(p => p + move)); }
public static Shape2 Mirror(this Shape2 shape, Line2 line) { var n = line.Normal; return(shape.Transform(p => p - 2 * line.Fn(p) * n / line.Normal.Len2).Reverse()); }
public static Shape2 Rotate(this Shape2 shape, Vector2 center, double angle) { var m = Rotates2.Rotate(angle); return(shape.Transform(p => center + m * (p - center))); }
public static Shape2 Rotate(this Shape2 shape, double angle) { var m = Rotates2.Rotate(angle); return(shape.Transform(p => m * p)); }
public static Shape2 Mult(this Shape2 shape, double k) { return(shape.Transform(p => p * k)); }
public static Shape2 Scale(this Shape2 shape, Vector2 aSize, Vector2 bSize) { return(shape.Transform(p => p.Scale(aSize, bSize))); }