3

Can someone please help to draw this circle? I have started out with some code as shown below but I couldn't get exactly what I need.

\documentclass[12pt,a4paper,oneside]{article}
\usepackage{tikz}
\begin{document}
    \begin{tikzpicture}
    \draw (0,0) node[circle,draw,inner sep=1pt,label=below:$0$](z0) {}
    circle (pi);
    \draw[-stealth] (z0) -- (45:pi) node[midway,above]{$x$};
    \draw[-stealth] (z0) -- (45:pi) node[left,right]{$z$};
    \draw[-stealth] (z0) -- (0:pi) node[midway,below]{$\cos \theta$};
    \draw[-stealth] (z0) -- (0:pi) node[left,right]{$1$};
    \draw[-stealth] (z0) -- (90:pi) node[left,above]{$i$};
    \draw[-stealth] (z0) -- (90:pi) node[left,above]{$i$};
    \end{tikzpicture}
\end{document}

I want to get something like this:

enter image description here

1
  • Have you looked at chapter 2 in the TikZ manual? Commented Oct 25, 2019 at 20:13

2 Answers 2

3

One possibility is to use the angles and quotes library. I also removed unnecessary duplications of paths.

\documentclass[12pt,a4paper,oneside]{article}
\usepackage{tikz}
\usetikzlibrary{angles,quotes}
\begin{document}
    \begin{tikzpicture}
    \draw (-4,0) -- (4,0) (0,-4) -- (0,4);
    \draw (0,0) coordinate(O) node[circle,draw,inner sep=1pt,label=below left:$0$](z0) {}
    circle (pi);
    \draw[-stealth] (O) -- node[midway,above]{$x$} (45:pi) coordinate(z)
    node[pos=1.1]{$z$};
    \path (0:pi) coordinate(x) node[below right]{$1$};
    \draw (O) -- ({pi*cos(45)},0) node[midway,below]{$\cos \theta$}
     -- (45:pi) node[midway,above,rotate=-90]{$\sin \theta$};
    \draw (O) -- (90:pi) node[above left]{$i$};
    \pic ["$\theta$", draw, angle eccentricity=0.6,angle radius=1.2cm] {angle=x--O--z};
    \end{tikzpicture}
\end{document}

enter image description here

4
  • what about the vertical lines through the centre and extending outside the circumference of the circle? Commented Oct 25, 2019 at 19:03
  • @ShadrackKibet I added them now.
    – user194703
    Commented Oct 25, 2019 at 20:09
  • @ Schrödinger's cat Please help to add an arrow to z as shown in the diagram Commented Dec 18, 2019 at 14:21
  • 1
    @ShadrackKibet Done.
    – user194703
    Commented Dec 18, 2019 at 15:18
2

One variation of possible answers ... here the library quotes is exploited also for edge labels, circle is drawn by circle:

\documentclass[12pt,a4paper,oneside]{article}
\usepackage{tikz}
\usetikzlibrary{angles, arrows.meta,
                quotes}

\begin{document}
    \begin{tikzpicture}[auto=right]
\draw   (0,0) coordinate[label=225:0] (O) circle[radius=pi];
\draw   (-4,0) -- (4,0)
        (0,-4) -- (0,4);
\draw[thick,-{Triangle[angle=45:2pt 3]}]
    (0,0) to[sloped,"$\mathbf{x}$" ']
    (45:pi) coordinate[label=45:$z$] (z);
\draw[semithick]   
    (0,0)       to["$\cos\theta$"] (0,0 -| z) coordinate (x)
    (x -| z)    to[sloped, "$\sin\theta$"] (z);
\node[below right]  at (pi,0) {1};
\node[above  left] at (0,pi) {$i$};
%
\pic ["$\theta$", draw, angle eccentricity=0.8,angle radius=1 cm] {angle=x--O--z};
    \end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .