0
$\begingroup$

Initialisation code:

refunc = ComplexExpand[Re[(x + I*y)^6 + 6 (x + I*y) + 10]];
imfunc = ComplexExpand[Im[(x + I*y)^6 + 6 (x + I*y) + 10]];
contrans[func_, xtrans_, ytrans_] := 
func /. {x -> xtrans, y -> strains};

Manipulation:

Manipulate[
Grid[{{Text@"contour", 
Text@"image"}, {ParametricPlot[{{r*Cos[t], r*Sin[t]}}, {t, 0, 
  2 \[Pi]}, PlotStyle -> {Thickness[.003]}, 
 PlotRange -> {{-2, 2}, {-2, 2}}, AspectRatio -> Automatic, 
 ImageSize -> {295}], 
ParametricPlot[{{contrans[refunc, r*Cos[t], r*Sin[t]], 
   contrans[imfunc, r*Cos[t], r*Sin[t]]}}, {t, 0, 2 \[Pi]}, 
 PlotStyle -> {Thickness[.003]}, 
 PlotRange -> {{-70, 90}, {-80, 80}}, AspectRatio -> Automatic, 
 ImageSize -> {295}]}}], {{r, 1}, 0.5, 2}, 
 SaveDefinitions -> True]

This is from a Wolfram Demonstration Project.

I would like to use this code to map f(z)=z^n rather than f(z)=z^6 + 6z +10 as they have used here. Each time I try, the image part of the plot remains blank, I'm not sure what I'm doing wrong!

Thanks a lot.

$\endgroup$
5
  • $\begingroup$ What is n in your case? $\endgroup$ Commented Mar 17, 2017 at 11:13
  • $\begingroup$ n is any natural number (what I want to show is f(z)=z^n has n roots) @niloderoock $\endgroup$
    – Pat
    Commented Mar 17, 2017 at 11:19
  • $\begingroup$ You have used a specific value for the plot, I assume? $\endgroup$ Commented Mar 17, 2017 at 11:29
  • $\begingroup$ Do you mean a specific value of n? If so, no I haven't. I just tried using n=3 but I'm not getting any winds on the image side. I should have 3 winds, instead I get a circle. Do you think I am expecting the wrong thing? $\endgroup$
    – Pat
    Commented Mar 17, 2017 at 11:38
  • $\begingroup$ I found the error it is a typo !! $\endgroup$ Commented Mar 17, 2017 at 11:40

1 Answer 1

0
$\begingroup$

y -> strains should be y-> ytrans

$\endgroup$
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.