Decoração da “bobina” Tikz: como mudar a orientação da bobina?
Tenho um problema ao usar a coil
decoração no Tikz:
Você deve saber que uma partícula carregada gira em torno das linhas do campo magnético (chamado de movimento do ciclotron ). No entanto, próximo à superfície polarizada, o movimento do centro guia (isto é, o centro dos loops) interrompe o movimento linear ao longo da linha de campo B e tende a seguir a direção perpendicular à superfície. Isso é o que parece no Tikz:

Com o seguinte código:
\documentclass[tikz]{standalone}
\usetikzlibrary{calc,decorations.pathreplacing,angles,quotes,decorations.pathmorphing}
\usepackage{newpxtext,newpxmath}
\usepackage[european,RPvoltages]{circuitikz}
\standaloneenv{circuitikz}
\begin{document}
\begin{tikzpicture}[thick,scale=1, every node/.style={scale=1}]
\def\ion#1#2{
%\draw node[circle,shading=ball,minimum width=1cm,color = white] at (#1,#2) {$\textbf{+}$};
\fill[white, ball color=blue!80!white] (#1, #2, 0) circle (0.5);
\draw (#1,#2) node[color = white] {\Huge $\textbf{+}$};
}
\def\electron#1#2{
%\draw node[circle,shading=ball,minimum width=1cm,color = white] at (#1,#2) {$\textbf{+}$};
\fill[line width=0.0mm, white, ball color=red] (#1, #2, 0) circle (0.30);
\draw (#1,#2) node[color = white] {\Large $\textbf{-}$};
}
% Electrodes
\shade [left color = gray , right color = gray!25] (10,0) -- (11,0) -- (11,7) -- (10,7) -- cycle;
\draw (10.5,3.5) node [rotate = -90] {Cathode, $V<0$ V};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% plasma
\shade [right color = blue!30 , left color = blue!10] (-0.5,0) -- (10,0) -- (10,7) -- (-0.5,7) -- cycle;
\draw [thick] (-0.5,0) -- (11,0);
\draw [thick] (-0.5,7) -- (11,7);
\draw [very thick] (10,0) -- (10,7);
\draw [ultra thick, ->,>=stealth] (0.5,5) -- (0.5,6.25);
\draw (0.5,6) node [above left] {$x$};
\draw [ultra thick, ->,>=stealth] (0.5,5) -- (1.75,5);
\draw (1.5,5) node [below left] {$z$};
\draw (0.5,5) node {$\bullet$};
\draw [very thick,->,>=stealth] (0.5,5) --++ (45:1.4);
\draw (0.5,5) ++ (45:1.4) node [above right] {$\vec{B}=B~\vec{b}$};
\draw [very thick] (0.5,5.5) arc(90:45:0.5);
\draw (0.5,5) ++ (70:0.75) node [] {$\psi$};
\draw [dashed, very thick, red!40!blue] (0,0) -- (3,3) to[out = 45, in = -170] (7,5) -- (10,5);
\draw [dashed, white!10!black, ultra thick](3,0) -- (3,7);
\draw [dashed, white!10!black, ultra thick](7,0) -- (7,7);
\draw (1.5,0) node [below, text width = 3cm,align = center] {Prégaine \\ collisionnelle $\sim\lambda_i$};
\draw (5,0) node [below, text width = 4cm,align = center] {Prégaine \\ magnétique $\sim\rho_\text{ci}$};
\draw (8.5,0) node [below, text width = 2.5cm,align = center] {Gaine de Debye $\sim\lambda_\text{De}$};
% THIS IS THE FRAGMENT TO DRAW THE BLUE COIL !!!!
\draw [very thick, blue!50!white,->,>=stealth,decorate,decoration={coil,amplitude=10mm,segment length=10mm,post length=1mm}]
(0,0) -- (3,3) to[out = 45, in = -170] (7,5) -- (10,5);
% THIS was THE FRAGMENT TO DRAW THE BLUE COIL !!!!
\draw [ultra thick,->,>=stealth,blue] (1,1) --++ (45:1);
\draw (1,1) ++ (45:1) node [above left,blue] {$\vec{v}_i$};
\ion{1}{1};
\draw [ultra thick,->,>=stealth,blue] (3,3) --++ (45:1.4);
\draw (3,3) ++ (45:1.4) node [below right,blue] {$\vec{v}_{i\parallel}=c_s~\vec{b}$};
\ion{3}{3};
\draw [ultra thick,->,>=stealth,blue] (7,5) --++ (0:1.4);
\draw (7,5) ++ (0:1.4) node [below,blue] {$\vec{v}_{iz}=c_s~\vec{e}_z$};
\ion{7}{5};
\draw [very thick, red!80!white,->,>=stealth,decorate,decoration={coil,amplitude=1.4mm,segment length=2mm,post length=1mm}]
(0,2.75) -- (4.25,7);
\electron{0}{2.75};
\draw [very thick, red!80!white,->,>=stealth,decorate,decoration={coil,amplitude=1.4mm,segment length=2mm,post length=1mm}]
(5,0.5) -- (8,3.5);
\draw [very thick , dotted , red!80!white] (8,3.5) -- ++(45:0.25);
\electron{5}{0.5};
\end{tikzpicture}
\end{document}
O problema é que a bobina deve ser perpendicular à direção B , e não ao caminho do centro de orientação (o código relativo ao desenho da bobina fica entre os dois comentários % THIS IS THE FRAGMENT TO DRAW THE BLUE COIL !!!!
).
Portanto, minha pergunta de Tikz: Existe uma maneira de obrigar a bobina a manter a mesma inclinação (ou seja, perpendicular a B), mas também seguir a linha tracejada roxa?
Eu quero isso (desculpe pela má qualidade):

Agradeço antecipadamente por sua ajuda!
Respostas
Primeiro uma versão que não funciona:
\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}
\draw [very thick, orange] (0,0) -- (3,3) to[out = 45, in = -180] (7,5) -- (10,5);
\draw [very thick, blue!50, decorate, decoration={coil,amplitude=10mm,segment length=10mm, transform={shift only, rotate=45}}] (0,0) -- (3,3) to[out = 45, in = -180] (7,5) -- (10,5);
\end{tikzpicture}
\end{document}

O transform={shift only, rotate=45}
não funciona bem com a transformação do caminho da bobina.
Eu faço o caminho paramétrico - optei por unir as duas seções retas por uma parábola, e espero que esteja tudo bem. Em seguida, desenho uma bobina girada paramétrica adicionada a este caminho:
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw [very thick, green!50, domain={0:1}, smooth, variable=\t, samples=100] plot ({3*\t}, {3*\t});
\draw [very thick, green!50, domain={0:1}, smooth, variable=\t, samples=100] plot ({4*\t+3},{-2*(\t-1)^2+5});
\draw [very thick, green!50, domain={0:1}, smooth, variable=\t, samples=100] plot ({3*\t+7}, {5});
%
\draw[very thick, red!50, domain={0:10}, smooth, variable=\t, samples=100] plot ( {(0.3*\t+0.8*sin((\t*pi-pi/2) r)*cos(45)-cos((\t*pi-pi/2) r)*sin(45)}, {0.3*\t+cos((\t*pi-pi/2) r)} );
\draw[very thick, red!50, domain={0:10}, smooth, variable=\t, samples=100] plot ( {(0.4*\t+3+0.8*sin((\t*pi-pi/2) r)*cos(45)-cos((\t*pi-pi/2) r)*sin(45)}, {-2*(0.1*\t-1)^2+5+cos((\t*pi-pi/2) r)} );
\draw[very thick, red!50, domain={0:5}, smooth, variable=\t, samples=100] plot ( {(0.5*\t+7+0.8*sin((\t*pi-pi/2) r)*cos(45)-cos((\t*pi-pi/2) r)*sin(45)}, {5+cos((\t*pi-pi/2) r)} );
\end{tikzpicture}
\end{document}

Coisas que poderiam ser melhores:
- Devido ao modo como inclino a bobina, ela não começa no ponto inicial do caminho.
- Tanto o caminho quanto a bobina são desenhados em três seções. Seria melhor definir uma função e desenhá-los de uma vez. Dessa forma, não haveria junções e
smooth
funcionaria em todo o caminho. Eu não sei como fazer aquilo. - Por causa das três seções, sou forçado a escolher quantos números inteiros de loops adicionar em cada seção. Isso faz com que os loops pareçam mais espaçados na primeira distância da parábola. Talvez ajustes possam ser feitos no caminho, se o caminho exato não for crítico, de modo que as seções tenham comprimentos de razão inteira.
Editar:
Percebi que o ponto de partida está errado não por causa da inclinação, mas porque eu inicio o loop meio ciclo antes - aqui está uma versão corrigida:
\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}
\draw [very thick, green!50, domain={0:1}, smooth, variable=\t, samples=100] plot ({3*\t}, {3*\t});
\draw [very thick, green!50, domain={0:1}, smooth, variable=\t, samples=100] plot ({4*\t+3},{-2*(\t-1)^2+5});
\draw [very thick, green!50, domain={0:1}, smooth, variable=\t, samples=100] plot ({3*\t+7}, {5});
%
\draw[very thick, blue, domain={0:10}, smooth, variable=\t, samples=100] plot ( {(0.3*\t+sqrt(18)/7+0.8*sin((\t*pi-pi/2) r)*cos(45)-cos((\t*pi-pi/2) r)*sin(45)}, {0.3*\t+cos((\t*pi-pi/2) r)} );
\draw[very thick, blue, domain={0:10}, smooth, variable=\t, samples=100] plot ( {(0.4*\t+sqrt(18)/7+3+0.8*sin((\t*pi-pi/2) r)*cos(45)-cos((\t*pi-pi/2) r)*sin(45)}, {-2*(0.1*\t-1)^2+5+cos((\t*pi-pi/2) r)} );
\draw[very thick, blue, domain={0:3}, smooth, variable=\t, samples=100] plot ( {(0.6*\t+sqrt(18)/7+7+0.8*sin((\t*pi-pi/2) r)*cos(45)-cos((\t*pi-pi/2) r)*sin(45)}, {5+cos((\t*pi-pi/2) r)} );
\end{tikzpicture}
\end{document}
