I'm trying to do this. it doesn't have to be the same.
2 Answers
$\begingroup$ $\endgroup$
Use two functions of your choice:
f1[x_] := -x - Piecewise[{{2 Sin[x ], -2 Pi <= x <= 2 Pi}}] f2[x_] := x + Piecewise[{{2 Sin[2 x], Abs[ x] <= 3 Pi/2}}] options = {AspectRatio -> 1, PlotRange -> {{-3 Pi, 3 Pi}, {-3 Pi, 3 Pi}}, Frame -> True, Axes -> False, FrameTicks -> None, ImageSize -> 300}; Plot the functions f1 and f2 with the option Filling:
plota = Plot[{f1[x], f2[x]}, {x, -6 Pi, 6 Pi}, Exclusions -> None, PlotStyle -> ColorData[97]@1, Filling -> {1 -> {2}}, Evaluate @ options] Use GeometricTransformation + RotationTransform to rotate plota primitives by desired angles and use the option PlotRange to crop resulting graphics:
Multicolumn[ Table[Legended[ Show[MapAt[GeometricTransformation[#, RotationTransform[a]] &, plota, {1}], Evaluate @ options], Placed[Style[a, 16], {.5, .9}]], {a, Subdivide[0, 2 Pi, 8]}], 3, Appearance -> "Horizontal", Spacings -> {0, 0}] Animation above is produces using:
frames = Table[Show[MapAt[GeometricTransformation[#, RotationTransform[a]] &, plota, {1}], ImageSize -> 500, Evaluate @ options], {a, Subdivide[0, 2 Pi, 50]}]; Export["rotations.gif", frames, "AnimationRepetitions" -> Infinity] $\begingroup$ $\endgroup$
(b) is problematic because it does not contain the same pixels as (a) and (b).
Look at the following:
ImageRotate[im, #] & /@ {0,-Pi/4,-Pi/2} It looks like you rotated a larger picture and cut it to size.




