# Thomson Ring PSTricks

Explaining the Thomson's ring experiment, I used Thomas Söll's template. It's necessary to draw vectors symbolizing the current and the magnetic field.

Therefore, I used psline as the package pst-solides3d doesn't have a (3D-) circle or ellipse available. pst-3dplot has these functions (\pstThreeDCircle[beginAngle=...]), but it would be very difficult to draw coil, ring and iron core using that package.

As you can see below, the result is not satisfying. Moreover, vector B_0 should be "behind" the coil's windings but still visible ... Is there any chance to improve my solution?

MWE:

\documentclass{article}
\usepackage{pst-solides3d}

\begin{document}
\begin{center}
\begin{pspicture}[showgrid=true](-0.5,-3.7)(8.5,6)
\psset{viewpoint=20 20 15 rtp2xyz,lightsrc=20 45 50 rtp2xyz,Decran=30}
\psset{solidmemory}
%------------------------------------ Zylinder------------------------------------------------------------------------
\psSolid[opacity=0.5,incolor=red,fillcolor=gray!70,object=cylindre,h=5.2,r=0.8,ngrid=20 120,grid=false,action=none,name=Z1](0,0,0)
\psSolid[object=anneau,fillcolor=gray!10,incolor=yellow,h=0.5,R=1.2,r=1,ngrid=150,grid=false,action=none,name=R1](0,0,4.5)%
%--------------------------------------- wire----------------------------------------------------------------------
{\defFunction[algebraic]{helice}(t){0.95*cos(80*t)}{0.95*sin(80*t)}{4.5*t}
\psSolid[object=courbe,r=0.05,range=0.039 0.5890,linecolor=red!60,linewidth=0.5pt,resolution=720,function=helice,action=none,name=wendel1,r=0.05,fillcolor=red!90,incolor=red!60,ngrid=80 10](0,0,0)}%
%------------------------------------ Compose -------------------------------------------------------------------------
\psSolid[object=fusion,base=Z1 R1 wendel1,grid=false,linecolor=gray,name=ThomsonRing,RotX=-90,RotY=90]
%Projektionsebene
\psSolid[object=plan,definition=equation,args={[1 0 0 0] 90},name=monplan,action=none]
\psset{plan=monplan}
%Leiter
\psProjection[object=point,fontsize=7](1.5,2.45)
\psProjection[object=point,fontsize=7](1.8,2.45)
\psProjection[object=texte,text=+,fontsize=5,plan=monplan](1,2.57)
\psProjection[object=texte,text=-,fontsize=5,plan=monplan](1.2,2.565)
\psProjection[object=cercle,args=0 1 2.45 0.05,range=0 360,plan=monplan]
\psProjection[object=cercle,args=0 1.2 2.45 0.05,range=0 360,plan=monplan]
%\psProjection[object=point,text=$-$,fontsize=6,pos=uc](1.6,2.45)
\composeSolid
\psSolid[object=cylindre,h=1.51,r=0.05,fillcolor=red!90,grid=false,name=L1](0,2.65,0.94)
\psSolid[object=cylindre,h=1.5,r=0.05,fillcolor=red!90,grid=false,name=L1](0,0.18,0.95)
%Spannungsquelle
\psSolid[object=line,linewidth=3pt,linecolor=black,args=0 0.17 2.45 0 0.95 2.45]
\psSolid[object=line,linewidth=3pt,linecolor=black,args=0 1.25 2.45 0 1.5 2.45]
\psSolid[object=line,linewidth=3pt,linecolor=black,args=0 2.66 2.45 0 1.8 2.45]
%Befestigung
\psSolid[object=line,linewidth=3pt,linecolor=black,args=0.5 4.5 1.1 1.5 4.5 4]
\psSolid[object=line,linewidth=3pt,linecolor=black,args=-0.5 4.5 1.1 -1.5 4.5 4]
%\axesIIID(4,4,4)(6,6,6)
\pscurve[linewidth=2pt,linecolor=blue]{->}(6.5,-2)(6.5,-1)(6.7,0.3)
\rput[l](6.8,-0.8){\blue$\vec{I}$}
\psline[linewidth=2pt,linecolor=green]{->}(6.2,-0.9)(5,-0.8)
\rput[l](5.7,-0.5){\green$\vec{B}$}
\psline[linewidth=2pt,linecolor=green]{->}(2.2,-0.7)(4.2,-0.8)
\rput[l](3.3,-0.4){\green$\vec{B}_0$}
\end{pspicture}
\end{center}
\end{document}


Ideally, the result should similar to this:

You can try this for example.

Thomas

\documentclass{article}
\usepackage{pst-solides3d}

\begin{document}
\begin{center}
\begin{pspicture}[showgrid=true](-0.5,-3.7)(8.5,6)
\psset{viewpoint=20 40 15 rtp2xyz,lightsrc=20 45 50 rtp2xyz,Decran=30}
\psset{solidmemory}
%------------------------------------ Zylinder -------------------------
\psSolid[opacity=0.5,incolor=red,fillcolor=gray!70,object=cylindre,h=5.2,r=0.8,ngrid=20 120,grid=false,action=none,name=Z1](0,0,0)
\psSolid[object=anneau,fillcolor=gray!10,incolor=yellow,h=0.5,R=1.2,r=1,ngrid=150,grid=false,action=none,name=R1](0,0,4.5)%
%--------------------------------------------------------------------------
\psSolid[object=cone,h=0.4,r=0.1,fillcolor=blue,mode=4,RotX=-140,RotY=90,action=none,name=Pfeilspitze](-0.88,-1.1,4.55)%
{\defFunction[algebraic]{Kreis}(t){1.4*cos(t)}{1.4*sin(t)}{0}
\psSolid[object=courbe,r=0.01,range=-1.25 -2.25,linecolor=blue,linewidth=0.5pt,resolution=720,function=Kreis,action=none,name=Strom,r=0.05,fillcolor=blue!90,incolor=red!60,ngrid=60 20](0,0,4.55)}%
%--------------------------------------- wire----------------------------------------------------------------------
{\defFunction[algebraic]{helice}(t){0.95*cos(80*t)}{0.95*sin(80*t)}{4.5*t}
\psSolid[object=courbe,r=0.05,range=0.039 0.5890,linecolor=red!60,linewidth=0.5pt,resolution=720,function=helice,action=none,name=wendel1,r=0.05,fillcolor=red!90,incolor=red!60,ngrid=180 10](0,0,0)}%
%------------------------------------ Compose ----------------------
\psSolid[object=fusion,base=Z1 R1 wendel1 Strom Pfeilspitze,grid=false,linecolor=gray,name=ThomsonRing,RotX=-90,RotY=90]
%Projektionsebene
\psSolid[object=plan,definition=equation,args={[1 0 0 0] 90},name=monplan,action=none]
\psset{plan=monplan}
%Leiter
\psProjection[object=point,fontsize=7](1.5,2.45)
\psProjection[object=point,fontsize=7](1.8,2.45)
\psProjection[object=texte,text=+,fontsize=5,plan=monplan](1,2.57)
\psProjection[object=texte,text=-,fontsize=5,plan=monplan](1.2,2.565)
\psProjection[object=cercle,args=0 1 2.45 0.05,range=0 360,plan=monplan]
\psProjection[object=cercle,args=0 1.2 2.45 0.05,range=0 360,plan=monplan]
%\psProjection[object=point,text=$-$,fontsize=6,pos=uc](1.6,2.45)
\composeSolid
\psSolid[object=cylindre,h=1.51,r=0.05,fillcolor=red!90,grid=false,name=L1](0,2.65,0.94)
\psSolid[object=cylindre,h=1.5,r=0.05,fillcolor=red!90,grid=false,name=L1](0,0.18,0.95)
%Spannungsquelle
\psSolid[object=line,linewidth=3pt,linecolor=black,args=0 0.17 2.45 0 0.95 2.45]
\psSolid[object=line,linewidth=3pt,linecolor=black,args=0 1.25 2.45 0 1.5 2.45]
\psSolid[object=line,linewidth=3pt,linecolor=black,args=0 2.66 2.45 0 1.8 2.45]
%Befestigung
\psSolid[object=line,linewidth=3pt,linecolor=black,args=0.5 4.5 1.1 1.5 4.5 4]
\psSolid[object=line,linewidth=3pt,linecolor=black,args=-0.5 4.5 1.1 -1.5 4.5 4]
%\axesIIID(4,4,4)(6,6,6)
%\pscurve[linewidth=2pt,linecolor=blue]{->}(6.5,-2)(6.5,-1)(6.7,0.3)
%\rput[l](6.8,-0.8){\blue$\vec{I}$}
%\psline[linewidth=2pt,linecolor=green]{->}(6.2,-0.9)(5,-0.8)
%\rput[l](5.7,-0.5){\green$\vec{B}$}
%\psline[linewidth=2pt,linecolor=green]{->}(2.2,-0.7)(4.2,-0.8)
%\rput[l](3.3,-0.4){\green$\vec{B}_0$}
\end{pspicture}
\end{center}
\end{document}