# How can I draw a hyperbola of a complex form

How can I use Mathematica to draw locus of point in complex plane given by $||z-i|-|z+i||=1.$
I have tried few codes, but not succeed.

• Replace $z$ with $x+iy$ and use ContourPlot[]. – J. M.'s technical difficulties Dec 10 '15 at 7:06
• @J.M.: Aren't there any direct way to draw it? – Bumblebee Dec 10 '15 at 7:07
• Nothing built-in. So, try my suggestion and report back. – J. M.'s technical difficulties Dec 10 '15 at 7:36
• Thank you very much. Definitely I will report. – Bumblebee Dec 10 '15 at 9:47

f = Abs[z - I] - Abs[z + I] /. z :> x + I y;

Show[

DensityPlot[f, {x, -10, 10}, {y, -2 Pi, 2 Pi},
PlotPoints -> 60,
ColorFunction -> "DarkRainbow",
ImageSize -> 400],

ContourPlot[{f == 1, -f == 1}, {x, -10, 10}, {y, -2 Pi, 2 Pi},
ContourStyle -> Black,
ImageSize -> 400]] Or

DensityPlot[f, {x, -10, 10}, {y, -2 Pi, 2 Pi},
PlotPoints -> 60,
ColorFunction -> "DarkRainbow",
ImageSize -> 400,
Mesh -> {{1}},
MeshFunctions -> (Function[{x, y}, #] & /@ {f, -f})] This function finds the points that satisfy the complex equation and then plots it.

 complexPlot[complexEq_, range_, points_] := Module[{sol, data},

sol = FindInstance[complexEq && -range < Re[z] < range, z, points];
data = z /. sol;
ListPlot[(Tooltip[{Re[#1], Im[#1]}] &) /@ data, AspectRatio -> 1,
PlotRange -> Full, Frame -> True,
FrameLabel -> {{"y", None}, {"x", None}},
PlotLabel -> "Argand diagram"]
]


You can input your expression as it is in the complex form and specify the x range and number of data points.

f = Norm[Norm[z - I] - Norm[z + I]] == 1;
complexPlot[f, 10, 1000] 