Re: Plotter for complex polynomials (complex coefficients)

• To: mathgroup at smc.vnet.net
• Subject: [mg124718] Re: Plotter for complex polynomials (complex coefficients)
• From: DrMajorBob <btreat1 at austin.rr.com>
• Date: Thu, 2 Feb 2012 04:55:35 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <201202010851.DAA15238@smc.vnet.net>
• Reply-to: drmajorbob at yahoo.com

```This seems a little faster:

Manipulate[
Module[{f, z},(*Convert 2D point to complex point*)
f[z_] = a.{1, I} z^3 + b.{1, I} z^2 + c.{1, I} z + d.{1, I};
Plot3D[Abs@f[x + y I], {x, -6, 6}, {y, -6, 6}, PlotPoints -> 100,
MaxRecursion -> 2, Mesh -> 11,
MeshStyle -> Directive[Gray, AbsoluteThickness[0.01]],
MeshFunctions -> ({x,
y} \[Function] (\[Pi] - Abs@Arg[f[x + I y]])/\[Pi]),
ColorFunctionScaling -> False,
ColorFunction -> ({x, y} \[Function]
Hue[0.425 \[LeftFloor]12 (\[Pi] -
Abs@Arg@f[x + I y])/\[Pi]\[RightFloor]/12, sat, bri]),
PlotStyle -> Opacity[opac],
AxesLabel -> {"x", "i y",
"|f(x + iy)|"}]],(*Item["The complex coefficients"],*){a, {-2, \
-2}, {2, 2}}, {b, {-2, -2}, {2, 2}}, {c, {-2, -2}, {2,
2}}, {d, {-2, -2}, {2, 2}}, {{opac, 0.75, "Opacity"}, 0,
1}, {{sat, 0.75, "Saturation"}, 0, 1}, {{bri, 1, "Brightness"}, 0,
1}, ControlPlacement -> {Left, Left, Left, Left, Bottom, Bottom,
Bottom}]

Bobby

On Wed, 01 Feb 2012 02:51:32 -0600, Chris Young <cy56 at comcast.net> wrote:

> Not sure if this is done right. Could I speed it up by using Set
> instead of SetDelayed in the converter to complex point? If so,
> shouldn't I protect the "z" by wrapping the definition in a Module with
> "z" as a local variable?
>
> I have the coloring going from green for 0 to red for Ï¤ and then back
> again, so colors are the same for plus and minus arguments (i.e.,
> angles) for the complex polynomial. Probably should have some
> indication which is which, or a way to toggle it.
>
> http://home.comcast.net/~cy56/Mma/ComplexCoeffPlotter.nb
> http://home.comcast.net/~cy56/Mma/ComplexCoeffPlotterPic2.png
>
> Chris Young
> cy56 at comcast.net
>
>
> Manipulate[
>  Module[
>   {f, \[ScriptCapitalC]},
>
>   \[ScriptCapitalC][P_] := P[[1]] + P[[2]] I;   (*
>   Convert 2D point to complex point *)
>
>   f[z_] = \[ScriptCapitalC][a]  z^3 + \[ScriptCapitalC][
>       b] z^2 + \[ScriptCapitalC][c] z + \[ScriptCapitalC][ d];
>
>   Plot3D[
>    Abs[f[x + y I]],   {x, -6, 6},  {y, -6, 6},
>
>    PlotPoints -> 100,
>    MaxRecursion -> 2,
>
>    Mesh -> 11,
>    MeshStyle -> Directive[Gray, AbsoluteThickness[0.01]],
>    MeshFunctions -> ({x, y} \[Function] (\[Pi] -
>        Abs[Arg[f[x + I y]]])/\[Pi]),
>
>    ColorFunctionScaling -> False,
>    ColorFunction -> ({x, y} \[Function]
>       Hue[0.425 \[LeftFloor]12 (\[Pi] -
>            Abs[Arg[f[x + I y]]])/\[Pi]\[RightFloor]/12, sat, bri]),
>    PlotStyle -> Opacity[opac],
>    AxesLabel -> {"x", "i y", "|f(x + iy)|"}]
>   ],
>  (*Item["The complex coefficients"],*)
>  {a, {-2, -2}, {2, 2}},
>  {b, {-2, -2}, {2, 2}},
>  {c, {-2, -2}, {2, 2}},
>  {d, {-2, -2}, {2, 2}},
>  {{opac, 0.75, "Opacity"}, 0, 1},
>  {{sat, 0.75, "Saturation"}, 0, 1},
>  {{bri, 1, "Brightness"}, 0, 1},
>
>  ControlPlacement -> {Left, Left, Left, Left, Bottom, Bottom, Bottom}
>  ]
>
>

--
DrMajorBob at yahoo.com

```

• Prev by Date: Re: Derivative of experimental data
• Next by Date: Re: large lists with variable and if condition (vrs. 8.0.4)
• Previous by thread: Re: Plotter for complex polynomials (complex coefficients)
• Next by thread: Re: Plotter for complex polynomials (complex coefficients)