7

These are the graphs I am trying to reproduce:

enter image description here enter image description here

This is what I've done:

enter image description here

My problems are:

  1. How to make those arrows in each loops in the second graph.
  2. (If possible) How to decrease the letter's size (P, dB and ids) in the firs graph.
  3. How to centralize what I've done in the same line.

Code:

\documentclass[11pt]{article}

\usepackage[english]{babel}
\usepackage{array}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows, shapes.arrows,decorations.pathmorphing, matrix,chains,scopes,positioning,fit,shapes.gates.logic.US, shapes.gates.logic.IEC, calc}

\begin{document}

\begin{center}
    \begin{tikzpicture}[baseline=(current bounding box.center)]
    \draw (0,0) .. controls (3,-1.8) and (0.5,-3.2) .. (0.75,-5);
    \draw (0.12,0.06) .. controls (3.12,-1.8) and (0.62,-3.2) .. (0.87,-5);
    \draw[dashed] (1.116,-0.2) -- (1.991,-2.8);
    \draw[thick, ->] (1.65,-1.4188) -- (1.4025,-0.6875);
    \coordinate (P) at (3.6,-2);
    \draw[->] (1.65,-1.4188) -- (P);
    \draw[thick, ->] (1.65,-1.4188) -- (2.3813, -1.6368);
    \draw[line width = 1.15mm] (1.44,-1.35) -- (1.51, -1.56);
    \draw (3.8,-2.08) node {$\times$};
    \draw (3.8,-2.06) circle (0.17cm);
    \coordinate [label=below left:$ds$] (ds) at (1.4,-1.3);
    \coordinate [label=above right:$id\vec{s}$] (ids) at (1.41,-0.7);
    \coordinate [label=below right:$\hat{r}$] (hr) at (1.74,-1.53);
    \coordinate [label=below right:$d\vec{B}$] (hr) at (3.65,-1.27);
    \draw (3.85,-2.55) node {$P$};
    \coordinate [label=above right:$r$] (r) at (2.5,-1.75);
    \draw (1.9242,-1.5006) arc (-15:105:0.3);
    \draw (2.08,-1.03) node {$\theta$};
    \coordinate (ci) at (0.45, -4.7);
    \coordinate (ce) at (0.6, -3.9);
    \draw[->] (ci) to [bend left] node [left] {$i$} (ce);
    \end{tikzpicture}

    \hspace{0.5in}

    \begin{tikzpicture}[baseline=(current bounding box.center)]
    \draw[fill=black] (0,0) circle (0.07cm);
    \draw (0,0) circle (0.15cm);
    \draw (0,0) circle (0.35cm);
    \draw (0,0) circle (0.45cm);
    \draw (0,0) circle (0.55cm);
    \draw (0,0) circle (0.75cm);
    \draw (0,0) circle (1.05cm);
    \draw (0,0) circle (1.45cm);
    \draw (0,0) circle (1.95cm);
    \draw (0,0) circle (2.55cm);
    \draw[thick, ->] (-1.05,0) -- (-1.05,-2) node [above left] {$\vec{B}$};
    \draw[thick, ->] (-2.55,0) -- (-2.55,-0.5) node [left] {$\vec{B}$};
    \draw (0,0) -- (1.4,2.4) node [above right] {wire with current};
    \draw (2.9,2.3) node {out of the page};
    \end{tikzpicture}
    \end{center}

\end{document}
5

For first, you can use a decoration like this. First define one

\usetikzlibrary{decorations.markings,arrows.meta,bending}
\tikzset{
  myarrows/.style ={
    postaction=decorate,
    decoration={
      markings,
      mark={between positions 0.001 and 1 step 0.25 with \arrow{Latex[reversed,fill=none,flex]}}
    }
  },
  }

Then use a \foreach loop like

\foreach \x in {0.35,0.45,0.55,0.75,1.05,1.45,1.95,2.55}{
      \draw[myarrows] (0,0) circle (\x cm);
    }

arrows.meta provides Latex[reversed,fill=none,flex], bending gives better alignment of arrows with flex.

For second, you can pass font=\footnotesize (or \small etc) to the respective nodes.

\draw (3.85,-2.55) node[font=\footnotesize] {$P$};

If you want it for all nodes, put everything in a scope and use

\begin{scope}[font=\footnotesize]

or even, without a scope

\begin{tikzpicture}[font=\footnotesize]

For three, if I understand correctly ('in the same line' phrase), you can use a scope and shift it like

 \begin{scope}[shift={(8cm,-2.45cm)}]

Note that I have removed two tikzpictures and used scope instead.

Full code:

\documentclass[11pt]{article}

\usepackage[english]{babel}
\usepackage{array}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows, shapes.arrows,decorations.pathmorphing, decorations.markings, matrix,chains,scopes,positioning,fit,shapes.gates.logic.US, shapes.gates.logic.IEC, calc,arrows.meta,bending}

\tikzset{
  myarrows/.style ={
    postaction=decorate,
    decoration={
      markings,
      mark={between positions 0 and 1 step 0.25 with \arrow{Latex[reversed,fill=none,flex]}}
    }
  },
  }

\begin{document}

\begin{center}
    \begin{tikzpicture}[baseline=(current bounding box.center)]
    \begin{scope}[font=\footnotesize]
    \draw (0,0) .. controls (3,-1.8) and (0.5,-3.2) .. (0.75,-5);
    \draw (0.12,0.06) .. controls (3.12,-1.8) and (0.62,-3.2) .. (0.87,-5);
    \draw[dashed] (1.116,-0.2) -- (1.991,-2.8);
    \draw[thick, ->] (1.65,-1.4188) -- (1.4025,-0.6875);
    \coordinate (P) at (3.6,-2);
    \draw[->] (1.65,-1.4188) -- (P);
    \draw[thick, ->] (1.65,-1.4188) -- (2.3813, -1.6368);
    \draw[line width = 1.15mm] (1.44,-1.35) -- (1.51, -1.56);
    \draw (3.8,-2.08) node {$\times$};
    \draw (3.8,-2.06) circle (0.17cm);
    \coordinate [label=below left:$ds$] (ds) at (1.4,-1.3);
    \coordinate [label=above right:$id\vec{s}$] (ids) at (1.41,-0.7);
    \coordinate [label=below right:$\hat{r}$] (hr) at (1.74,-1.53);
    \coordinate [label=below right:$d\vec{B}$] (hr) at (3.65,-1.27);
    \draw (3.85,-2.55) node {$P$};
    \coordinate [label=above right:$r$] (r) at (2.5,-1.75);
    \draw (1.9242,-1.5006) arc (-15:105:0.3);
    \draw (2.08,-1.03) node {$\theta$};
    \coordinate (ci) at (0.45, -4.7);
    \coordinate (ce) at (0.6, -3.9);
    \draw[->] (ci) to [bend left] node [left] {$i$} (ce);
    \end{scope}
    \begin{scope}[shift={(8cm,-2.45cm)}]
    \draw[fill=black] (0,0) circle (0.07cm);
    \draw (0,0) circle (0.15cm);
    \foreach \x in {0.35,0.45,0.55,0.75,1.05,1.45,1.95,2.55}{
      \draw[myarrows] (0,0) circle (\x cm);
    }
    \draw[thick, ->] (-1.05,0) -- (-1.05,-2) node [above left] {$\vec{B}$};
    \draw[thick, ->] (-2.55,0) -- (-2.55,-0.5) node [left] {$\vec{B}$};
    \draw (0,0) -- (1.4,2.4) node [above right] {wire with current};
    \draw (2.9,2.3) node {out of the page};
    \end{scope}
    \end{tikzpicture}
    \end{center}

\end{document}

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.