我正在做我的硕士学位期末项目,我需要一些图像来说明磁偶极子的图像方法。这是我目前拥有的:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{
calc,
decorations.pathreplacing
}
%
\newcommand\pgfmathsinandcos[3]{
\pgfmathsetmacro#1{sin(#3)}
\pgfmathsetmacro#2{cos(#3)}
}
\newcommand\LongitudePlane[3][current plane]{
\pgfmathsinandcos\sinEl\cosEl{#2} % elevation
\pgfmathsinandcos\sint\cost{#3} % azimuth
\tikzset{#1/.style={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}
}
\newcommand\LatitudePlane[3][current plane]{
\pgfmathsinandcos\sinEl\cosEl{#2} % elevation
\pgfmathsinandcos\sint\cost{#3} % latitude
\pgfmathsetmacro\yshift{\cosEl*\sint}
\tikzset{#1/.style={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} %
}
\newcommand\DrawLongitudeCircle[2][1]{
\LongitudePlane{\angEl}{#2}
\tikzset{current plane/.prefix style={scale=#1}}
% angle of "visibility"
\pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %
\draw[current plane,color=black!100] (\angVis:1) arc (\angVis:\angVis+180:1);
\draw[current plane,dashed,color=black!100] (\angVis-180:1) arc (\angVis-180:\angVis:1);
}
\newcommand\DrawLatitudeCircle[2][1]{
\LatitudePlane{\angEl}{#2}
\tikzset{current plane/.prefix style={scale=#1}}
\pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}
% angle of "visibility"
\pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}
\draw[current plane,color=black!100] (\angVis:1) arc (\angVis:-\angVis-180:1);
\draw[current plane,dashed,color=black!100] (180-\angVis:1) arc (180-\angVis:\angVis:1);
}
\begin{document}
\begin{tikzpicture}[scale=1,
interface/.style={postaction={draw, decorate, decoration={border,angle=45, amplitude=-3mm, segment length=2mm}}}
]
% \def\R{0.8} % sphere radius
\def\angEl{30} % elevation angle
\def\angAz{30} % azimuth angle
% \pgfmathsetmacro\H{\R*cos(\angEl)} % Distance to north pole
\LongitudePlane[xzplane]{\angEl}{\angAz} % x-axis plane
\def\ang{60}
\def\L{13mm}
\coordinate (O) at (0,0);
\node at (3,1.25) (Pr) {-};
\node at ($(Pr)+(\ang:\L/2)$) (mur){};
\node at (3,-1.25) (Pi) {-};
\node at ($(Pi)+(-\ang:\L/2)$) (mui){};
% \coordinate (O) at (0,0);
\fill[gray!10, rounded corners=2pt] (-3,-0.2) rectangle (5,0.2);
\draw[black,line width=.5pt,interface](-3,0)--(5,0);
\draw (O) node[xshift=-2mm, yshift=2mm] {$x_{0}$};
\draw [line width=1pt] (O) -- (1,0) node (y) {};
\filldraw[fill=white, line width=1pt] (1,0) circle(0.9mm) node[xshift=2mm, yshift=2mm]{$y_{0}$};
\draw[line width=1pt] (O) -- (0,1);
\filldraw[fill=white, line width=1pt] (0,1) circle(0.9mm) node[xshift=-2mm, yshift=2mm]{$z_{0}$};
\node at (-2,0.75) {Real};
\node at (-2,-0.75) [yshift=-1mm] {Image};
% Real
\draw[gray](O) -- ($(Pr)+(\ang:\L/2)$) node[midway, above]{${r}$};
\draw ($(Pr)+(\ang:\L/2)$) node[left] {$x$};
\draw [line width=0.5pt] ($(Pr)+(\ang:\L/2)$) -- ++(\ang-90:1);
\filldraw[fill=white, line width=0.5pt] ($(Pr)+(\ang:\L/2)+(\ang-90:1)$) circle(0.9mm) node[right]{$y$};
\draw[line width=0.5pt] ($(Pr)+(\ang:\L/2)$) -- ++(\ang:1);
\filldraw[fill=white, line width=0.5pt] ($(Pr)+(\ang:\L/2)+(\ang:1)$) circle(0.9mm) node[above]{$z$};
\draw[->, >=stealth, ultra thick, shorten >=1mm] (Pr) -- ++(\ang:\L) node (Pr2)[xshift=1mm, yshift=1mm]{+};
\draw[very thin] ($(mur)+({2.5mm*cos(90)},{2.5mm*sin(90)})$) arc (90:\ang:2.5mm);
\draw[very thin, ->] ($(mur)+({2.5mm*cos(150)},{2.5mm*sin(150)})$) arc (150:90:2.5mm) node [xshift=-1.5mm, yshift=1.5mm] {$\theta$};
\node at ($(Pr)+(\ang:\L/2)$) [xshift=3mm] {${\mu}$};
\filldraw[fill=white,line width=0.5pt]($(Pr)+(\ang:\L/2)$)circle(0.9mm);
\filldraw[fill=black,line width=0.25pt]($(Pr)+(\ang:\L/2)$)circle(.25mm);
% Image
\draw[gray](O) -- ($(Pi)+(-\ang:\L/2)$) node[midway, below]{${r^{\prime}}$};
\draw ($(Pi)+(-\ang:\L/2)$) node[left] {$x^{\prime}$};
\draw [line width=0.5pt] ($(Pi)+(-\ang:\L/2)$) -- ++(-\ang+90:1);
\filldraw[fill=white, line width=0.5pt] ($(Pi)+(-\ang:\L/2)+(-\ang+90:1)$) circle(0.9mm) node[xshift=3mm, yshift=1mm]{$y^{\prime}$};
\draw[line width=0.5pt] ($(Pi)+(-\ang:\L/2)$) -- ++(-\ang:1);
\filldraw[fill=white, line width=0.5pt] ($(Pi)+(-\ang:\L/2)+(-\ang:1)$) circle(0.9mm) node[xshift=2mm, yshift=-2mm]{$z^{\prime}$};
\draw[->, >=stealth, ultra thick, shorten >=1mm] (Pi) -- ++(-\ang:\L) node (Pi2)[xshift=1mm, yshift=-1mm]{+};
\draw[very thin] ($(mui)+({2.5mm*cos(-90)},{2.5mm*sin(-90)})$) arc (-90:-\ang:2.5mm);
\draw[very thin, ->] ($(mui)+({2.5mm*cos(-150)},{2.5mm*sin(-150)})$) arc (-150:-90:2.5mm) node [xshift=-1.5mm, yshift=-1.5mm] {$\theta$};
\node at ($(Pi)+(-\ang:\L/2)$) [xshift=3.5mm] {${\mu^{\prime}}$};
\filldraw[fill=white,line width=0.5pt]($(Pi)+(-\ang:\L/2)$)circle(0.9mm);
\filldraw[fill=black,line width=0.25pt]($(Pi)+(-\ang:\L/2)$)circle(.25mm);
% Projection
\draw[dashed, very thin] (mur) -- ($(O)!(mur)!(y)$) node[below](mux) {};
\draw[ultra thin] (mur) -- ($(mur)+(0,0.4)$);
\draw[dashed, very thin] (mui) -- ($(O)!(mui)!(y)$);
\draw[ultra thin] (mui) -- ($(mui)+(0,-0.4)$);
\filldraw[fill=white,line width=1pt](O)circle(0.9mm);
\filldraw[fill=black,line width=0.5pt](O)circle(.25mm);
% Field lines
\begin{scope}
[rotate around={\ang+90:(O)},
field line/.style={color=red!75!gray, smooth,
variable=\t, samples at={0,5,...,360}}
]
\newcommand{\fieldlinecurve}[2]{{(pow(#1,2)*(3*cos(#2)+cos(3*#2))}, {(pow(#1,2))*(sin(#2)+sin(3*#2))}}
% Longitudinal planes
\foreach \u in {0}{
\LongitudePlane[{{\u}zplane}]{\angEl}{\u}
\foreach \r in {0.1,0.2,...,0.6} {
\draw[{{\u}zplane}, field line, smooth]
plot (\fieldlinecurve{\r}{\t});
}
}
\end{scope}
\end{tikzpicture}
\end{document}
我在坐标原点添加了根据示例修改后的场线:http://www.texample.net/tikz/examples/dipolar-magnetic-field/但我不知道这个函数到底是如何绘制线条的,所以我不明白如何将它移动到偶极子的中心。
是否可以将场线移动到两个偶极子并将线压缩到水平面附近以获得类似于下图的任何东西?
答案1
感谢 Torbjørn T。我想我现在明白了你想要什么:你想绘制场线的卡通图,但实际上并不计算它们。这可以通过使用非线性变换来实现,有关详细信息,请参阅 pgfmanual 的第 103.4.2 节。我举了一个例子,其中线被“推离”边界。
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{
calc,
decorations.pathreplacing
}
\usepgfmodule{nonlineartransformations}
\makeatletter
\def\deformstart{20}
\def\uppertransformation{% modified version of the manual 103.4.2 Installing Nonlinear Transformation
\edef\relY{\the\pgf@y}
\pgfmathtruncatemacro{\itest}{ifthenelse(\relY>\deformstart,1,0)}
\ifnum\itest=0
\pgfmathsetmacro{\newY}{\deformstart*exp(\relY/\deformstart-1)} % y<\deformstart
\else
\pgfmathsetmacro{\newY}{\relY}
\fi
\setlength{\pgf@y}{\newY pt}
}
\def\lowertransformation{% modified version of the manual 103.4.2 Installing Nonlinear Transformation
\edef\relY{\the\pgf@y}
\pgfmathtruncatemacro{\itest}{ifthenelse(\relY<-\deformstart,1,0)}
\ifnum\itest=0
\pgfmathsetmacro{\newY}{-\deformstart*exp(-\relY/\deformstart-1)} % y>-\deformstart
\else
\pgfmathsetmacro{\newY}{\relY}
\fi
\setlength{\pgf@y}{\newY pt}
}
\begin{document}
\begin{tikzpicture}[scale=1,
interface/.style={postaction={draw, decorate, decoration={border,angle=45, amplitude=-3mm, segment length=2mm}}}
]
\coordinate (O) at (0,0);
\def\ang{60}
\def\L{13mm}
\node at (3,1.25) (Pr) {-};
\node at ($(Pr)+(\ang:\L/2)$) (mur){};
\node at (3,-1.25) (Pi) {-};
\node at ($(Pi)+(-\ang:\L/2)$) (mui){};
% \coordinate (O) at (0,0);
\fill[gray!10, rounded corners=2pt] (-3,-0.2) rectangle (5,0.2);
\draw[black,line width=.5pt,interface](-3,0)--(5,0);
\draw (O) node[xshift=-2mm, yshift=2mm] {$x_{0}$};
\draw [line width=1pt] (O) -- (1,0) node (y) {};
\filldraw[fill=white, line width=1pt] (1,0) circle(0.9mm) node[xshift=2mm, yshift=2mm]{$y_{0}$};
\draw[line width=1pt] (O) -- (0,1);
\filldraw[fill=white, line width=1pt] (0,1) circle(0.9mm) node[xshift=-2mm, yshift=2mm]{$z_{0}$};
\node at (-2,0.75) {Real};
\node at (-2,-0.75) [yshift=-1mm] {Image};
% Real
\draw[gray](O) -- ($(Pr)+(\ang:\L/2)$) node[midway, above]{${r}$};
\draw ($(Pr)+(\ang:\L/2)$) node[left] {$x$};
\draw [line width=0.5pt] ($(Pr)+(\ang:\L/2)$) -- ++(\ang-90:1);
\filldraw[fill=white, line width=0.5pt] ($(Pr)+(\ang:\L/2)+(\ang-90:1)$) circle(0.9mm) node[right]{$y$};
\draw[line width=0.5pt] ($(Pr)+(\ang:\L/2)$) -- ++(\ang:1);
\filldraw[fill=white, line width=0.5pt] ($(Pr)+(\ang:\L/2)+(\ang:1)$) circle(0.9mm) node[above]{$z$};
\draw[->, >=stealth, ultra thick, shorten >=1mm] (Pr) -- ++(\ang:\L) node (Pr2)[xshift=1mm, yshift=1mm]{+};
\draw[very thin] ($(mur)+({2.5mm*cos(90)},{2.5mm*sin(90)})$) arc (90:\ang:2.5mm);
\draw[very thin, ->] ($(mur)+({2.5mm*cos(150)},{2.5mm*sin(150)})$) arc (150:90:2.5mm) node [xshift=-1.5mm, yshift=1.5mm] {$\theta$};
\node at ($(Pr)+(\ang:\L/2)$) [xshift=3mm] {${\mu}$};
\filldraw[fill=white,line width=0.5pt]($(Pr)+(\ang:\L/2)$)circle(0.9mm);
\filldraw[fill=black,line width=0.25pt]($(Pr)+(\ang:\L/2)$)circle(.25mm);
% Image
\draw[gray](O) -- ($(Pi)+(-\ang:\L/2)$) node[midway, below]{${r^{\prime}}$};
\draw ($(Pi)+(-\ang:\L/2)$) node[left] {$x^{\prime}$};
\draw [line width=0.5pt] ($(Pi)+(-\ang:\L/2)$) -- ++(-\ang+90:1);
\filldraw[fill=white, line width=0.5pt] ($(Pi)+(-\ang:\L/2)+(-\ang+90:1)$) circle(0.9mm) node[xshift=3mm, yshift=1mm]{$y^{\prime}$};
\draw[line width=0.5pt] ($(Pi)+(-\ang:\L/2)$) -- ++(-\ang:1);
\filldraw[fill=white, line width=0.5pt] ($(Pi)+(-\ang:\L/2)+(-\ang:1)$) circle(0.9mm) node[xshift=2mm, yshift=-2mm]{$z^{\prime}$};
\draw[->, >=stealth, ultra thick, shorten >=1mm] (Pi) -- ++(-\ang:\L) node (Pi2)[xshift=1mm, yshift=-1mm]{+};
\draw[very thin] ($(mui)+({2.5mm*cos(-90)},{2.5mm*sin(-90)})$) arc (-90:-\ang:2.5mm);
\draw[very thin, ->] ($(mui)+({2.5mm*cos(-150)},{2.5mm*sin(-150)})$) arc (-150:-90:2.5mm) node [xshift=-1.5mm, yshift=-1.5mm] {$\theta$};
\node at ($(Pi)+(-\ang:\L/2)$) [xshift=3.5mm] {${\mu^{\prime}}$};
\filldraw[fill=white,line width=0.5pt]($(Pi)+(-\ang:\L/2)$)circle(0.9mm);
\filldraw[fill=black,line width=0.25pt]($(Pi)+(-\ang:\L/2)$)circle(.25mm);
% Projection
\draw[dashed, very thin] (mur) -- ($(O)!(mur)!(y)$) node[below](mux) {};
\draw[ultra thin] (mur) -- ($(mur)+(0,0.4)$);
\draw[dashed, very thin] (mui) -- ($(O)!(mui)!(y)$);
\draw[ultra thin] (mui) -- ($(mui)+(0,-0.4)$);
\filldraw[fill=white,line width=1pt](O)circle(0.9mm);
\filldraw[fill=black,line width=0.5pt](O)circle(.25mm);
\newcommand{\fieldlinecurve}[2]{{(pow(#1,2)*(3*cos(#2)+cos(3*#2))}, {(pow(#1,2))*(sin(#2)+sin(3*#2))}}
% Field lines
\begin{scope}[rotate around={\ang+90:(O)},
shift=(mur),
field line/.style={color=red!75!gray, smooth,
variable=\t, samples at={0,5,...,360}}
]
\begin{scope}[transform shape nonlinear=true]
\pgftransformnonlinear{\uppertransformation}
\foreach \r in {0.1,0.2,...,0.9} {
\draw[field line, smooth]
plot (\fieldlinecurve{\r}{\t});
}
\end{scope}
\end{scope}
%lower
\begin{scope}
[rotate around={-\ang+90:(O)},
shift=(mui),
field line/.style={color=red!75!gray, smooth,
variable=\t, samples at={0,5,...,360}}
]
\begin{scope}[transform shape nonlinear=true]
\pgftransformnonlinear{\lowertransformation}
\foreach \r in {0.1,0.2,...,0.9} {
\draw[ field line, smooth]
plot (\fieldlinecurve{\r}{\t});
}
\end{scope}
\end{scope}
\end{tikzpicture}
\end{document}
显然,这只是一幅漫画,你可以通过调整\deformstart
和/或编写不同的函数来修改它f(x)
,对于较大的,它x
类似于x
,对于较小的,x
它渐近达到 0。(我不得不使用一个技巧,因为我的假设f
涉及指数和 Ti钾Z 抱怨数字太大,即使它从来不需要评估这些点的指数。)还要注意,我踢出了Alain Matthes 很棒的宏因为我不明白为什么在这里需要它们,但是非线性变换也可以与它们一起使用。
只是为了好玩:使用此技巧相当接近地复制了您的第二张图片。
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,decorations.pathreplacing}
\usepgfmodule{nonlineartransformations}
\makeatletter
\def\deformstart{20}
\def\uppertransformation{% modified version of the manual 103.4.2 Installing Nonlinear Transformation
\edef\relY{\the\pgf@y}
\pgfmathtruncatemacro{\itest}{ifthenelse(\relY>\deformstart,1,0)}
\ifnum\itest=0
\pgfmathsetmacro{\newY}{\deformstart*exp(\relY/\deformstart-1)} % y<\deformstart
\else
\pgfmathsetmacro{\newY}{\relY}
\fi
\setlength{\pgf@y}{\newY pt}
}
\def\lowertransformation{% modified version of the manual 103.4.2 Installing Nonlinear Transformation
\edef\relY{\the\pgf@y}
\pgfmathtruncatemacro{\itest}{ifthenelse(\relY<-\deformstart,1,0)}
\ifnum\itest=0
\pgfmathsetmacro{\newY}{-\deformstart*exp(-\relY/\deformstart-1)} % y>-\deformstart
\else
\pgfmathsetmacro{\newY}{\relY}
\fi
\setlength{\pgf@y}{\newY pt}
}
\begin{document}
\begin{tikzpicture}[scale=1,
interface/.style={postaction={draw, decorate, decoration={border,angle=45, amplitude=-3mm, segment length=2mm}}}
]
\coordinate (O) at (0,0);
\def\ang{60}
\def\L{13mm}
\node at (1,1.25) (Pr) {-};
\coordinate (mur) at ($(Pr)+(\ang:\L/2)$) ;
\node at (1,-1.25) (Pi) {-};
\coordinate (mui) at ($(Pi)+(-\ang:\L/2)$) ;
\fill[gray!10, rounded corners=2pt] (-3,-0.2) rectangle (5,0.2);
\draw[black,line width=.5pt,interface](-3,0)--(5,0);
\node at (-2,0.75) {Real};
\node at (-2,-0.75) [yshift=-1mm] {Image};
\newcommand{\fieldlinecurve}[2]{{0.5*(pow(#1,2)*(3*cos(#2)+cos(3*#2))}, {(pow(#1,2))*(sin(#2)+sin(3*#2))}}
% Field lines
\begin{scope}[rotate around={\ang+90:(O)},
shift=(mur),
field line/.style={color=red!75!gray, smooth,
variable=\t, samples at={0,5,...,360}}
]
\begin{scope}[transform shape nonlinear=true]
\pgftransformnonlinear{\uppertransformation}
\foreach \r in {0.1,0.2,...,1.2} {
\draw[field line, smooth,gray]
plot (\fieldlinecurve{\r}{\t});
}
\end{scope}
\draw[line width=1mm,red,-latex] (0,1) --(0,-1);
\shade[ball color=gray] (0,0) circle (2mm);
\end{scope}
%image
\begin{scope}
[rotate around={-\ang+90:(O)},
shift=(mui),
field line/.style={color=red!75!gray, smooth,
variable=\t, samples at={0,5,...,360}}
]
\begin{scope}[transform shape nonlinear=true]
\pgftransformnonlinear{\lowertransformation}
\foreach \r in {0.1,0.2,...,1.2} {
\draw[field line, smooth,gray]
plot (\fieldlinecurve{\r}{\t});
}
\end{scope}
\draw[line width=1mm,red,-latex] (0,1) --(0,-1);
\shade[ball color=gray] (0,0) circle (2mm);
\end{scope}
\end{tikzpicture}
\end{document}
答案2
要移动地块,我认为最简单的方法是添加shift=(mui)
环境选项scope
。对于另一个,复制scope
,更改旋转角度,然后使用shift=(mur)
。
场线被绘制为参数图,其中(pow(#1,2)*(3*cos(#2)+cos(3*#2))
是 x 坐标,(pow(#1,2))*(sin(#2)+sin(3*#2))
是 y 坐标。#1
和分别#2
对应于\r
和\t
,即半径和角度。但我不知道更好的参数化是什么样的,所以我无法在这方面提供任何改进。
\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{
calc,
decorations.pathreplacing
}
%
\newcommand\pgfmathsinandcos[3]{
\pgfmathsetmacro#1{sin(#3)}
\pgfmathsetmacro#2{cos(#3)}
}
\newcommand\LongitudePlane[3][current plane]{
\pgfmathsinandcos\sinEl\cosEl{#2} % elevation
\pgfmathsinandcos\sint\cost{#3} % azimuth
\tikzset{#1/.style={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}
}
\newcommand\LatitudePlane[3][current plane]{
\pgfmathsinandcos\sinEl\cosEl{#2} % elevation
\pgfmathsinandcos\sint\cost{#3} % latitude
\pgfmathsetmacro\yshift{\cosEl*\sint}
\tikzset{#1/.style={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} %
}
\newcommand\DrawLongitudeCircle[2][1]{
\LongitudePlane{\angEl}{#2}
\tikzset{current plane/.prefix style={scale=#1}}
% angle of "visibility"
\pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %
\draw[current plane,color=black!100] (\angVis:1) arc (\angVis:\angVis+180:1);
\draw[current plane,dashed,color=black!100] (\angVis-180:1) arc (\angVis-180:\angVis:1);
}
\newcommand\DrawLatitudeCircle[2][1]{
\LatitudePlane{\angEl}{#2}
\tikzset{current plane/.prefix style={scale=#1}}
\pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}
% angle of "visibility"
\pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}
\draw[current plane,color=black!100] (\angVis:1) arc (\angVis:-\angVis-180:1);
\draw[current plane,dashed,color=black!100] (180-\angVis:1) arc (180-\angVis:\angVis:1);
}
\newcommand{\fieldlinecurve}[2]{{(pow(#1,2)*(3*cos(#2)+cos(3*#2))}, {(pow(#1,2))*(sin(#2)+sin(3*#2))}}
\begin{document}
\begin{tikzpicture}[scale=1,
interface/.style={postaction={draw, decorate, decoration={border,angle=45, amplitude=-3mm, segment length=2mm}}}
]
% \def\R{0.8} % sphere radius
\def\angEl{30} % elevation angle
\def\angAz{30} % azimuth angle
% \pgfmathsetmacro\H{\R*cos(\angEl)} % Distance to north pole
\LongitudePlane[xzplane]{\angEl}{\angAz} % x-axis plane
\def\ang{60}
\def\L{13mm}
\coordinate (O) at (0,0);
\node at (3,1.25) (Pr) {-};
\node at ($(Pr)+(\ang:\L/2)$) (mur){};
\node at (3,-1.25) (Pi) {-};
\node at ($(Pi)+(-\ang:\L/2)$) (mui){};
% \coordinate (O) at (0,0);
\fill[gray!10, rounded corners=2pt] (-3,-0.2) rectangle (5,0.2);
\draw[black,line width=.5pt,interface](-3,0)--(5,0);
\draw (O) node[xshift=-2mm, yshift=2mm] {$x_{0}$};
\draw [line width=1pt] (O) -- (1,0) node (y) {};
\filldraw[fill=white, line width=1pt] (1,0) circle(0.9mm) node[xshift=2mm, yshift=2mm]{$y_{0}$};
\draw[line width=1pt] (O) -- (0,1);
\filldraw[fill=white, line width=1pt] (0,1) circle(0.9mm) node[xshift=-2mm, yshift=2mm]{$z_{0}$};
\node at (-2,0.75) {Real};
\node at (-2,-0.75) [yshift=-1mm] {Image};
% Real
\draw[gray](O) -- ($(Pr)+(\ang:\L/2)$) node[midway, above]{${r}$};
\draw ($(Pr)+(\ang:\L/2)$) node[left] {$x$};
\draw [line width=0.5pt] ($(Pr)+(\ang:\L/2)$) -- ++(\ang-90:1);
\filldraw[fill=white, line width=0.5pt] ($(Pr)+(\ang:\L/2)+(\ang-90:1)$) circle(0.9mm) node[right]{$y$};
\draw[line width=0.5pt] ($(Pr)+(\ang:\L/2)$) -- ++(\ang:1);
\filldraw[fill=white, line width=0.5pt] ($(Pr)+(\ang:\L/2)+(\ang:1)$) circle(0.9mm) node[above]{$z$};
\draw[->, >=stealth, ultra thick, shorten >=1mm] (Pr) -- ++(\ang:\L) node (Pr2)[xshift=1mm, yshift=1mm]{+};
\draw[very thin] ($(mur)+({2.5mm*cos(90)},{2.5mm*sin(90)})$) arc (90:\ang:2.5mm);
\draw[very thin, ->] ($(mur)+({2.5mm*cos(150)},{2.5mm*sin(150)})$) arc (150:90:2.5mm) node [xshift=-1.5mm, yshift=1.5mm] {$\theta$};
\node at ($(Pr)+(\ang:\L/2)$) [xshift=3mm] {${\mu}$};
\filldraw[fill=white,line width=0.5pt]($(Pr)+(\ang:\L/2)$)circle(0.9mm);
\filldraw[fill=black,line width=0.25pt]($(Pr)+(\ang:\L/2)$)circle(.25mm);
% Image
\draw[gray](O) -- ($(Pi)+(-\ang:\L/2)$) node[midway, below]{${r^{\prime}}$};
\draw ($(Pi)+(-\ang:\L/2)$) node[left] {$x^{\prime}$};
\draw [line width=0.5pt] ($(Pi)+(-\ang:\L/2)$) -- ++(-\ang+90:1);
\filldraw[fill=white, line width=0.5pt] ($(Pi)+(-\ang:\L/2)+(-\ang+90:1)$) circle(0.9mm) node[xshift=3mm, yshift=1mm]{$y^{\prime}$};
\draw[line width=0.5pt] ($(Pi)+(-\ang:\L/2)$) -- ++(-\ang:1);
\filldraw[fill=white, line width=0.5pt] ($(Pi)+(-\ang:\L/2)+(-\ang:1)$) circle(0.9mm) node[xshift=2mm, yshift=-2mm]{$z^{\prime}$};
\draw[->, >=stealth, ultra thick, shorten >=1mm] (Pi) -- ++(-\ang:\L) node (Pi2)[xshift=1mm, yshift=-1mm]{+};
\draw[very thin] ($(mui)+({2.5mm*cos(-90)},{2.5mm*sin(-90)})$) arc (-90:-\ang:2.5mm);
\draw[very thin, ->] ($(mui)+({2.5mm*cos(-150)},{2.5mm*sin(-150)})$) arc (-150:-90:2.5mm) node [xshift=-1.5mm, yshift=-1.5mm] {$\theta$};
\node at ($(Pi)+(-\ang:\L/2)$) [xshift=3.5mm] {${\mu^{\prime}}$};
\filldraw[fill=white,line width=0.5pt]($(Pi)+(-\ang:\L/2)$)circle(0.9mm);
\filldraw[fill=black,line width=0.25pt]($(Pi)+(-\ang:\L/2)$)circle(.25mm);
% Projection
\draw[dashed, very thin] (mur) -- ($(O)!(mur)!(y)$) node[below](mux) {};
\draw[ultra thin] (mur) -- ($(mur)+(0,0.4)$);
\draw[dashed, very thin] (mui) -- ($(O)!(mui)!(y)$);
\draw[ultra thin] (mui) -- ($(mui)+(0,-0.4)$);
\filldraw[fill=white,line width=1pt](O)circle(0.9mm);
\filldraw[fill=black,line width=0.5pt](O)circle(.25mm);
% Field lines
\begin{scope}
[rotate around={\ang+90:(O)},
shift=(mur),
field line/.style={color=red!75!gray, smooth,
variable=\t, samples at={0,5,...,360}}
]
% Longitudinal planes
\foreach \u in {0}{
\LongitudePlane[{{\u}zplane}]{\angEl}{\u}
\foreach \r in {0.1,0.2,...,0.6} {
\draw[{{\u}zplane}, field line, smooth]
plot (\fieldlinecurve{\r}{\t});
}
}
\end{scope}
\begin{scope}
[rotate around={-\ang+90:(O)},
shift=(mui),
field line/.style={color=red!75!gray, smooth,
variable=\t, samples at={0,5,...,360}}
]
% Longitudinal planes
\foreach \u in {0}{
\LongitudePlane[{{\u}zplane}]{\angEl}{\u}
\foreach \r in {0.1,0.2,...,0.6} {
\draw[{{\u}zplane}, field line, smooth]
plot (\fieldlinecurve{\r}{\t});
}
}
\end{scope}
\end{tikzpicture}
\end{document}