Re: ParametricPlot precision problem
- To: mathgroup at smc.vnet.net
- Subject: [mg90898] Re: ParametricPlot precision problem
- From: "Cristina Ballantine" <cballant at holycross.edu>
- Date: Tue, 29 Jul 2008 01:36:41 -0400 (EDT)
Maxim, Thank you for your help and your insight. This helps me very much and solves my dilemma. Now I have to figure out the mathematical implications to the problem I am working on. Also thank you for the nice animation. Best wishes, Cristina >>> <m.r at inbox.ru> 07/28/08 1:52 AM >>> On Jul 27, 1:43 am, "Cristina Ballantine" <cball... at holycross.edu> wrote: > Hi, > > With the code below, plot1 gives a line from -a to 0 (in the complex > plane). plot2 should give the the symmetric of plot1 with respect to the > unit circle, i.e., a line from -1/Conjugate[a] to infinity (same slope = as > line from -a to 0). I cannot get plot2 to give the correct line. Any = help > is very much appreciated. > > Cristina > > --------------------------------- > > r := 1/3 > alpha := Pi/3 > a := r*Exp[I*alpha] > n := 3 > > B[z_] := z^n*((Conjugate[a]/a)*(a^2 - z^2)/(1 - (Conjugate[a])^2*z^2))^= n > > b := 1/(r*Sqrt[2])*Sqrt[3 - r^4 - Sqrt[(3 - r^4)^2 - 4*r^4]]* > Exp[I*alpha] > > s := -Abs[B[b]] > > z1[t_] := -(t/27) - ((1 + I Sqrt[3]) (27 - 27 (-1)^(1/3) - t^2))/( > 27 2^(2/3) (19602 t - 19602 (-1)^(1/3) t + 2 t^3 + Sqrt[ > 4 (27 - 27 (-1)^(1/3) - t^2)^3 + (19602 t - 19602 (-1)^(1/3) t + > 2 t^3)^2])^( > 1/3)) + ((1 - I Sqrt[3]) (19602 t - 19602 (-1)^(1/3) t + 2 t^3 + > Sqrt[4 (27 - 27 (-1)^(1/3) - t^2)^3 + (19602 t - > 19602 (-1)^(1/3) t + 2 t^3)^2])^(1/3))/(54 2^(1/3)) > > plot1:=ParametricPlot[{Re[z1[t]], Im[z1[t]]}, {t, s, 0}, > PlotStyle -> {Orange, Thick}, PlotPoints -> 100, MaxRecursion -> 5, > PlotRange -> 1, WorkingPrecision -> 100] > > plot2 := > ParametricPlot[{Re[1/Conjugate[z1[t]]], Im[1/Conjugate[z1[t]]]}, {t, > s, 0}, PlotStyle -> {Orange, Thick}, PlotPoints -> 2000, > MaxRecursion -> 15, PlotRange -> All, WorkingPrecision -> 100] There isn't a straight line going through the origin, what you're seeing in the first plot is several points very close to z1[s] and an outlier at {0, 0}. This is similar to Sqrt[-1 - I t^2] for real t near 0: both limits are equal to -I but the value at t=0 is +I. So basically z1[t] has a removable singularity at 0. You can make a nice demonstration out of your example: (*z1 as defined above*) Module[{c2p, f, closest, gr, t}, c2p = {Re@#, Im@#} &; f[p_, t_] := c2p@If[Norm[p] < 1, z1[t], z1[t]/Norm@z1[t]^2]; closest[p_] := Quiet[f[p, t] /. Last@FindMinimum[Norm[f[p, t] - p], {t, .01, -1, 1}, PrecisionGoal -> 2]]; gr = ParametricPlot[ c2p /@ {z1[t], z1[t]/Norm@z1[t]^2} // Evaluate, {t, -1, 1}, PlotStyle -> {Directive[Orange, Thick], Directive[Magenta, Thick]}]; DynamicModule[{p = c2p at z1[.01]}, LocatorPane[Dynamic[p, (p = closest[#]) &], Show[gr, Graphics[ {Circle[], Dashed, Line@Dynamic@Sort[{{0, 0}, p, p/Norm@p^2}, Norm@# < Norm@#2 &], Locator[Dynamic[p/Norm@p^2, None], Appearance -> Small], Locator[Dynamic[p, None], Appearance -> Small]}], PlotRange -> All], Appearance -> None] ]] Maxim Rytin m.r at inbox.ru