
:christmas_tree:
The Schwarz–Christoffel mappings are conformal transformations from the upper half-plane (or unit disk) to convex polygons; the existence of such maps is guaranteed by the Riemann Mapping Theorem. In general, these are somewhat challenging to compute/estimate, but in some cases they can be written down explicitly. For example, the following is an explicit Schwarz–Christoffel mapping to an equilateral triangle:
f[z_] := (E^((2 ? I)/3) Gamma[2/3])/(2^(1/3) Gamma[1/3] Gamma[4/3])
(z - 1)^(1/3) Hypergeometric2F1[1/3, 2/3, 4/3, (1 - z)/2];
To make the animation, simply apply this map to the rectangular grid on the upper half-plane (and apply some cheats); the motion comes from sliding the vertical lines to the right.
Here's the code:
With[{r = 12., s = .67, cols = RGBColor /@ {"#f2f9f1", "#388e3c"}},
Manipulate[
Graphics[
{cols[[1]],
Polygon[{{s Cos[?/3] - 1, s Sin[?/3]}, {s Cos[2 ?/3], s Sin[?/3]}, {-1/2, Sqrt[3]/2}}],
FaceForm[None], EdgeForm[Directive[cols[[1]], Thickness[.006]]],
Polygon[{{0, 0}, {-1, 0}, {-1/2, Sqrt[3]/2}}],
Thickness[.006], CapForm[None],
Table[Line[Table[ReIm[f[t^3 + I y]], {t, -3., 3, 1/40}]], {y, 1, r}],
Table[
Line[Table[ReIm[f[x + I Exp[t]]], {t, -13., 4, 1/6}]],
{x, -r + smootheststep[u], r + smootheststep[u], 1}]},
ImageSize -> 540, Background -> cols[[2]],
PlotRange -> {{-(6/5), 1/5}, {Sqrt[3]/4 - 7/10, Sqrt[3]/4 + 7/10}}],
{u, 0, 1}]
]