
Square Grid
This shows a parametrized version of the SchwarzChristoffel transformation between the circle and the square.
To implement this, first of all we need the Cayley transformation between the upper half-plane and the unit disk:
Cayley[z_] := (z - I)/(z + I);
Now, I took some inspiration from a Math StackExchange answer of Lukas Geyer to realize that this particular SchwarzChristoffel mapping could be implemented using the Weierstrass $\wp$-function. We need to determine the specific parameters that will give us our map:
g2[ω1_, ω2_] := Block[{a, b, τ, q},
τ = ω2/ω1;
q = E^(π I τ);
a = EllipticTheta[2, q];
b = EllipticTheta[3, q];
4/3 (π/ω1)^4 (a^8 - a^4 b^4 + b^8)
];
g3[ω1_, ω2_] := Block[{a, b, τ, q},
τ = ω2/ω1;
q = E^(π I τ);
a = EllipticTheta[2, q];
b = EllipticTheta[3, q];
8/27 (π/ω1)^6 (a^12 - 3/2 a^8 b^4 - 3/2 a^4 b^8 + b^12)
];
And then it's basically just a matter of choosing colors and fiddling with the interpolation:
DynamicModule[{invts = {g2[2., 2. I], g3[2., 2. I]}, s, width = .012,
n = 8, c, cols = RGBColor /@ {"#21243d", "#88e1f2"}},
s = WeierstrassP[1, invts];
Manipulate[
c = 2 Cos[t] # + Sin[t] Cayley[-WeierstrassP[#, invts]/s] &[(1 + I)/2];
Graphics[{FaceForm[cols[[-1]]],
Table[
Polygon[
Join @@
Transpose[
Table[
ReIm[-c + 2 Cos[t] # + Sin[t] Cayley[-WeierstrassP[#, invts]/s]]
& /@ {x + I (y - width), 1 - x + I (y + width)},
{x, -width, 1 + width, (1 + 2 width)/100}]]],
{y, 0., 1, 1/n}],
Table[
Polygon[
Join @@
Transpose[
Table[
ReIm[-c + 2 Cos[t] # + Sin[t] Cayley[-WeierstrassP[#, invts]/s]]
& /@ {x - width + I y, x + width + I (1 - y)},
{y, -width, 1 + width, (1 + 2 width)/100}]]],
{x, 0., 1, 1/n}]},
ImageSize -> 540, PlotRange -> Sqrt[3], Background -> cols[[1]]],
{t, 0, ?}]
]