I'm new to Mathematica and I need some help with the following problem. I would like given some positive integer n, to have mathematica plot the level sets of a (say monic) polynomial of degree n, p(z), with roots z_j in the unit disk. The trick is that I want to be able to change the position of z_j in an interactive way (e.g dragging them around inside the unit disk or choose the roots in advance by clicking at some points in the plane and then have Mathematica read that input and draw the level set of the corresponding polynomial). For example, I've tried something like the following piece of code (for n=2) but it's not exactly what I need. Any help is appreciated. Thank you!
Manipulate[
Show[ContourPlot[
Abs[(x + I*y - x1 - I*y1) (x + I*y - x2 - I*y2)] ==
Abs[(x1 + I*y1) (x2 + I*y2)], {x, -15, 15}, {y, -15, 15}]],
{{x1, {-5, 5}}, Locator}, {{y1, {-5, 5}}, Locator},
{{x2, {-5, 5}}, Locator}, {{y2, {-5, 5}}, Locator}]
Abs[(x + I*y - x1 - I*y1) (x + I*y - x2 - I*y2)] == Abs[(x1 + I*y1) (x2 + I*y2)]
? You could plot the real and imaginary parts, but I don't know if that would be what you want. $\endgroup$Manipulate[Show[ContourPlot[Abs[(x + I*y - Complex @@ x1) (x + I*y - Complex @@ x2)] == Abs[(Complex @@ x1) (Complex @@ x2)], {x, -15, 15}, {y, -15, 15}]], {{x1, {-5, 5}}, Locator}, {{x2, {-5, 5}}, Locator}]
$\endgroup$