# [GIF] Fourth Power (Fourth power of a square grid in the complex plane)

Posted 11 months ago
2651 Views
|
|
4 Total Likes
|
 Fourth PowerContinuing the series of conformal transformations (1, 2, 3). The first part shows a square grid in the first quadrant under the transformation $z \mapsto z^t$ as $t$ varies from 1 to 4, reflected through the line $y=-x$. The power is then reduced back to 1, but for the fourth quadrant rather than the first. This part makes use of @J. M.'s rational smoothstep function for smooth easing: ssteprat = #^3/(1 - 3 # (1 - #)) &; And here's the rest of the code for this part: DynamicModule[{width = .01, n = 16, m = 100, s, sign, cols = RGBColor /@ {"#ffeb00", "#457c39"}}, Manipulate[ s = ssteprat[1 - Abs[1 - t]]; sign = 2 UnitStep[t - 1] - 1; Graphics[{ FaceForm[cols[[1]]], Table[ Polygon[ Join @@ Transpose[ Table[ ReIm[-I (#/1.2)^(3 s + 1)] & /@ {x + sign I (y - width), 1 - x + sign I (y + width)}, {x, -width, 1 + width, (1 + 2 width)/m}]]], {y, 0, 1, 1/n}], Table[ Polygon[ Join @@ Transpose[ Table[ ReIm[-I (#/1.2)^(3 s + 1)] & /@ {x - width + sign I y, x + width + sign I (1 - y)}, {y, -width, 1 + width, (1 + 2 width)/m}]]], {x, 0, 1, 1/n}]}, PlotRange -> {{-2, 2}, {-1.5, 2.5}}, ImageSize -> 540, Background -> cols[[-1]]], {t, 0, 2}] ] The last part of the animation is just a simple $90^\circ$ rotation of the grid, but with a little bounce effect, which is realized by the following function: EaseOutBounce[t_] := Piecewise[{{7.5625 t^2, t < 1/2.75}, {7.5625 (t - 1.5/2.75)^2 + 0.75, t < 2/2.75}, {7.5625 (t - 2.25/2.75)^2 + 0.9375, t < 2.5/2.75}, {7.5625 (t - 2.625/2.75)^2 + 0.984375, True}}]; This is a translation to Wolfram Language of Emmanuel Oga's implementation of one of Robert Penner's easing functions, which you can see nicely visualized at easings.net (incidentally, I would be very interested to know if anybody has already implemented all of these [or similar] easing functions in Wolfram Language).Here's the code for this part: DynamicModule[{width = .01, n = 16, m = 100, s, cols = RGBColor /@ {"#ffeb00", "#457c39"}}, Manipulate[ s = EaseOutBounce[t]; Graphics[{ FaceForm[cols[[1]]], Table[ Polygon[ Join @@ Transpose[ Table[ ReIm[E^(-I ?/2 (1 + s)) #/1.2] & /@ {x + I (y - width), 1 - x + I (y + width)}, {x, -width, 1 + width, (1 + 2 width)/m}]]], {y, 0, 1, 1/n}], Table[ Polygon[ Join @@ Transpose[ Table[ ReIm[E^(-I ?/2 (1 + s)) #/1.2] & /@ {x - width + I y, x + width + I (1 - y)}, {y, -width, 1 + width, (1 + 2 width)/m}]]], {x, 0, 1, 1/n}]}, PlotRange -> {{-2, 2}, {-1.5, 2.5}}, ImageSize -> 540, Background -> cols[[-1]]], {t, 0, 1}] ]