Math 421  •  September 2006

Preparing a polar representation figure

Copyright © 2006 by Murray Eisenberg.  All rights reserved.

Good graphics takes a lot of work!

The code below creates the figure used in the section "The principal argument of a complex number" of the notebook nthRoots.nb. It is shown here just in case you're interested in seeing how such a figure might be created in Mathematica.

Needs["Cardano3`ComplexGraphics`"]
Needs["Cardano3`ComplexRoutines`"]

pt  =  4   +  3  I;  r  =  Abs[pt];  xval  =  Re[pt];  
    yval  =  Im[pt];  
    sweep  =  
      ArcTan[yval/xval];

ComplexGraphics[
{
UltramarineViolet,  PointSize[0.025],  
          ComplexPoint[pt],  
SlateBlue,  
          ComplexArrow[
            0,   pt  -  0.05  -  
              0.05  I], 
DeepNaplesYellow,   ComplexCurve[
            0.75  r Exp[θ I],  {θ,  0,  
              sweep}],  
MediumVioletRed, 
ComplexText[TraditionalForm[HoldForm[θ]],  
            0.675  r Exp[0.5 I sweep],  
            TextStyle  ->  {FontSize  ->  
                  16}], 
ComplexText[
            TraditionalForm[HoldForm[r]],  0.5  pt  +  0.25  I,  
            TextStyle  ->  {FontSize  ->  
                  16}], 
ComplexText[
            TraditionalForm[
              HoldForm[
                z  =  x  +  y I  =  
                    r Cos[θ]  +  r Sin[θ]]], 
            pt  +  0.5  +  0.5  I,  
            TextStyle  ->  {FontSize  ->  
                  16}], 
SlateBlue,  
          Dashing[{0.025,  0.045}],  
ComplexLine[{pt,  
              xval}],   ComplexLine[{pt,  
              yval I}],  
MediumVioletRed, 
ComplexPoint[xval],  
          ComplexPoint[yval I],  
ComplexText[
            TraditionalForm[HoldForm[x  =  r Cos[θ]]],  
            xval  -  0.4  I,  
            TextStyle  ->  {FontSize  ->  
                  16}], 
ComplexText[
            TraditionalForm[HoldForm[y  =  r Sin[θ]]],  
            yval I  -  1.8,  
            TextStyle  ->  {FontSize  ->  
                  16}]
}, 
PlotRange  ->  {{-3.5,  8},  {-1.5,  4}},  Frame  ->  False,  
        Ticks  ->  {None,  None},  
        ImageSize  ->  72 * 4.35];

Note: After I created this figure by evaluating the preceding two input cells, I inserted it into a text cell in notebook nthRoots.nb, changed the Text Alignment of that text cell to be Align Center, and then made the cell non-deletable and non-editable, so you could not accidentally delete it there.
If you happen to change the magnification in nthRoots.nb from the setting I used here and there, 125% of normal, the figure may not display as nicely as it otherwise would.  Graphics prepared ahead of time should always be done using the same notebook magnification at which those graphics are expected to be viewed.