I'd like to do the next graph:

enter image description here

(Sorry for my terrible draw!) I pretend the red line to be a dashed black spiral line, and I'd like the blue line to be a dashed black circular line.

What I've got so far:

\draw [<->] (0,4) node[left]{$ \mbox{Im} (z) $} -- (0,0) -- (4,0) node[below]{$ \mbox{Re} (z) $};
\draw [<->] (1,3)node[right]{$ \alpha z $} -- (0,0) -- (2,1)node[right]{$ z $};

Anyone could help me?


4 Answers 4


The radius, the start and end angles for the arc command can be calculated, see the following example.

(Update:) For the red "spiral" line I have used the plot function with a polar coordinate. The length of the polar coordinate linearly increases with the angle going from point (z) to (a):


  \draw [<->]
    (0,4) node[left]{$ \mbox{Im} (z) $}
    -- (0,0)
    -- (4,0) node[below]{$ \mbox{Re} (z) $};
  \draw [<->]
    (1,3) coordinate (a) node[above] {$ \alpha z $}
    -- (0,0)
    -- (2,1) coordinate (z) node[right] {$ z $};

    let \p{z} = (z),
        \n{angle_z} = {atan(\y{z}/\x{z})},
        \p{a} = (a),
        \n{angle_a} = {atan(\y{a}/\x{a})},
        \n{radius} = {sqrt(\x{z}*\x{z} + \y{z}*\y{z})}
      (z) arc[start angle=\n{angle_z},
              end angle=\n{angle_a},

  \draw[red, densely dashed]
    let \p{z} = (z),
        \p{a} = (a),
        \n{zAngle} = {atan2(\y{z}, \x{z})},
        \n{aAngle} = {atan2(\y{a}, \x{a})},
        \n{diffAngle} = {\n{aAngle} - \n{zAngle}},
        \n{zLength} = {sqrt(\x{z}*\x{z} + \y{z}*\y{z})},
        \n{aLength} = {sqrt(\x{a}*\x{a} + \y{a}*\y{a})},
        \n{diffLength} = {\n{aLength} - \n{zLength}}
    (\t:{\n{zLength} + \n{diffLength} * (\t - \n{zAngle}) / \n{diffAngle}})



The order of arguments for function atan2 has changed in TikZ 3.0: atan2(<y>, <x>). In case of older TikZ versions, <y> and <x> has to be exchanged.


A combination of rotation and scaling does the job neatly in Metapost.

enter image description here

prologues := 3;
outputtemplate := "%j%c.eps";


path re, im;
re = origin -- right scaled 4cm;
im = re rotated 90;
drawarrow im; label.lft(btex $\mathop{\rm Im}(z)$ etex, point 1 of im);
drawarrow re; label.bot(btex $\mathop{\rm Re}(z)$ etex, point 1 of re);

z1 = (2.828cm,1.414cm);
alpha = 0.3;
theta = 45;

s = 20;
draw z1 for i=1 upto s: -- z1 rotated (theta*i/s)                      endfor withcolor .67 blue;
draw z1 for i=1 upto s: -- z1 rotated (theta*i/s) scaled (1+alpha*i/s) endfor dashed evenly withcolor .73 red;

drawarrow origin -- z1;
drawarrow origin -- z1 scaled (1+alpha) rotated theta;

label.rt (btex $z$ etex, z1);
label.top(btex $\alpha z$ etex, z1 scaled (1+alpha) rotated theta);

  • I would suggest the use of the zscaled operator in this case. May 21, 2015 at 12:09
  • @FranckPastor yes it's a natural for zscaled but I was trying to show the basic approach. It would be interesting to see a version for comparison.
    – Thruston
    May 21, 2015 at 17:29

Another try with MetaPost, inspired by Thruston's solution, but using the zscaled operator of MetaPost which is in fact the complex multiplication. Also, I have incorporated it in a LuaLaTeX program, as I use to do.

\usepackage{luamplib, amsmath}
      r = 1.3; theta = 45;
      z = (2.828cm,1.414cm);
      pair alpha, alphaz, re, im; 
      re = (4cm, 0); im = (0, 4cm);
      alpha = r*dir theta; 
      alphaz = z zscaled alpha;
      for m = re, im, z, alphaz: drawarrow origin -- m; endfor
      s = 20;
      draw z
        for i = 1 upto s: .. z zscaled ((i/s)[1,r]*dir(i/s*theta))
        endfor withcolor .73red dashed evenly;
      draw z
        for i = 1 upto s: .. z rotated (i/s*theta)
        endfor withcolor .67blue;
      label.bot(btex $\text{Re}(z)$ etex, re);
      label.lft(btex $\text{Im}(z)$ etex, im);
      label.rt(btex $z$ etex, z);
      label.top(btex $\alpha z$ etex, alphaz);

enter image description here


Here is a short code for an Archimedean spiral between two points (the equation was calculated) with pstricks:

\documentclass[pdf, x11names]{standalone}


\begin{pspicture} $
    \psset{ticks=none, labels=none, arrowinset=0.2,arrows =c->, labelsep=3pt}
    \psaxes{c->}(0,0)(4.6,4.6)[\re (z),-90][\im (z),180]
    \uput[r](T){\alpha z}\uput[r](Z){z}
    \ncline{O}{T} \ncline{O}{Z}
    \psset{linewidth =0.6pt}
    \psplot[linecolor=Tomato3, polarplot, algebraic, plotpoints=200]{\Pi6}{\Pi3}{10.8*x/Pi + 1}%


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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