# Illustrate the conformal mapping

Find the image of the circle $$|z|=1$$ by using the transformation

$$w=z+2+4i$$

• It occurs to me that we often have people ask questions here thinking that the title "Mathematica" means the site is for mathematics questions. Some might even think that the tag [mathematica-online] means one can ask such questions online. It's not. Mathematica is a software system implementing Wolfram Language. Is your question about how to use this software? Apr 12, 2022 at 22:37
• @bmf I just noticed that the OP's other question mentions Mathematica in the title. So probably it is. The only purpose in this (homework) exercise that I can see is to make sure the students can actually plot mappings before getting to the real conformal-mapping work. It hardly seems worth remarking that a translation is "conformal." Of course the PLZ in the other title suggests it was due at midnight, in whatever timezone. We're probably too late. Apr 12, 2022 at 22:49
• @bmf Funny thing is, I'm working today on a demo of conformal mapping to use in class. But instead of a circle, I was going to use a clipart elephant, I think. Apr 12, 2022 at 23:03
– bmf
Apr 12, 2022 at 23:27
• Conformal elephant: i.sstatic.net/5zNFP.png -- code to follow, maybe. It was harder to get what I wanted than I expected. Apr 15, 2022 at 1:09

Meet Ellie, the Mesh Elephant:

Graphics[
ellieGC = (* it's a GraphicsComplex[] *)
ToExpression@Import["https://pastebin.com/raw/Mht5nzVi", "Text"]
]


The mesh will show the angle-preserving nature of conformal maps.

OP's example $$f(z)=z+2+4i$$ -- does it seem to you that the angles are preserved?:

With[{mapping = Function[z, z + 2 + 4 I],
scaledEllie = MapAt[3 # &, ellieGC, 1]},
Show[
Graphics@{Gray, Circle[]},
Graphics[{Lighter@Lighter@Blue, scaledEllie}],
Graphics[{Black,
MapAt[ReIm[mapping[# . {1, I}]] &, scaledEllie, 1]}],
Frame -> True, Axes -> True,
AxesStyle -> Directive[Thickness@Small, Darker@Green]
]]


Taking a sip, $$f(z)=z^2$$:

With[{mapping = Function[z, z^2]},
Show[
Graphics@{Gray, Circle[]},
Graphics[{Lighter@Lighter@Blue, ellieGC}],
Graphics[{Black, MapAt[ReIm[mapping[# . {1, I}]] &, ellieGC, 1]}],
Frame -> True, Axes -> True,
AxesStyle -> Directive[Thickness@Small, Darker@Green]
]]


Celebrating, conformally of course, $$f(z) = \log z$$:

With[{mapping = Function[z, Log[z]]},
Show[
Graphics@{Gray, Circle[]},
Graphics[{Lighter@Lighter@Blue, ellieGC}],
Graphics[{Black, MapAt[ReIm[mapping[# . {1, I}]] &, ellieGC, 1]}],
Frame -> True, Axes -> True,
AxesStyle -> Directive[Thickness@Small, Darker@Green]
]]

• As you can see, this is an elephant with complex behavior patterns. Apr 15, 2022 at 5:39
• Thank you. Thank you so much. I am very happy that I saw the comment. Even happier, I was the first upvote :-)
– bmf
Apr 15, 2022 at 5:46
• @MichaelE2 this is wonderful. +1 of course. Apr 15, 2022 at 5:57
• @MichaelE2 did you design the elephant as a GraphicsComplex[...]? Apr 15, 2022 at 6:11
• @ubpdqn You're welcome. That the tip of the nose lies on the imaginary axis makes the z^2 elephant just touch the negative real one. I also like how the unit circle running through the backside of Ellie is transformed to the imaginary axis running through the corresponding points in the Log[z] celebratory Ellie (and the tip of the nose is at a height of $i\,\pi/2$). Apr 16, 2022 at 3:30

This is only meant to help you get started. I am hoping that you will look the commands in the documentation.

f[z_] := z + 2 + 4 I
fig1 = ComplexContourPlot[AbsArg[z], {z, -1 - 1 I, 1 + 1 I},
ContourLabels -> All, ImageSize -> Full];
fig2 = ComplexContourPlot[AbsArg[f[z]], {z, -1 - 1 I, 1 + 1 I},
ContourLabels -> All, ImageSize -> Full];
fig3 = ComplexContourPlot[ReIm[f[z]], {z, -1 - 1 I, 1 + 1 I},
ContourLabels -> All, ImageSize -> Full];
GraphicsRow[{fig1, fig2, fig3}]


Here we test four conformal mapping w=z, w=z + 4 + 2 I,w=(z - 1)^2 + 5 - 2 I, w=1/(z - 1/2)^2 - 5 I,use the ParametricRegion and add  Abs[z] == 1 as a restriction.

mapping =
f |-> Region[
Block[{w = f[z], z = x + I*y},
ParametricRegion[{ReIm[w], Abs[z] == 1}, {x, y}]]];
Show[mapping[z |-> z], mapping[z |-> z + 4 + 2 I],
mapping[z |-> (z - 1)^2 + 5 - 2 I],
mapping[z |-> 1/(z - 1/2)^2 - 5 I], PlotRange -> All]