[pstricks] 3d circle around a line
Joel Salomon
joelcsalomon at gmail.com
Tue Dec 13 08:29:13 CET 2005
I'm trying to create a diagram for a paper on MRI, showing the
precession of a "spining" proton about the B₀ field — something like
<http://www.medinus.co.kr/special/mri01.files/image016.jpg>. Here's
the code I have so far:
\documentclass{article}
\usepackage{amssymb,pst-3dplot}
\begin{document}
\pagestyle{empty}
\begin{pspicture}(-3,-3)(3,3)%\psgrid
\pstThreeDCoor[%
xMin=-3.5,xMax=3.5,%
yMin=-3.5,yMax=3.5,%
zMin=-3,zMax=3,%
Alpha=45,Beta=0]
\pstThreeDLine[linewidth=1pt,linecolor=blue,arrows=->]%
(-1.06,1.06,-2.5)(1.06,-1.06,2.5)
\pstThreeDPut(1.2,-1.2,2.6){\blue $\vec\mu$}
\pstThreeDCircle(0,0,-2.5)(1.5,0,0)(0,1.5,0)
\pstThreeDLine[linewidth=2pt,linecolor=blue]%
(0,0,-3)(0,0,-1.5)
% \pstThreeDCircle[beginAngle=0,endAngle=90]%
% (0,0,0)(0,0,0)(0,0,0)
\pstThreeDSphere[linecolor={[cmyk]{0.2,0.6,1,0}},linewidth=0pt,%
SegmentColor={[cmyk]{0.2,0.6,1,0}}]%
(0,0,0){1.5}
\pstThreeDLine[linewidth=2pt,linecolor=blue,arrows=->]%
(0,0,1.5)(0,0,3)
\pstThreeDPut(-.2,.2,3){\blue $\vec B_0$}
\pstThreeDCircle(0,0,2.5)(1.5,0,0)(0,1.5,0)
\end{pspicture}
\end{document}
How can I get a circle (or part of one) normal to the axis of rotation μ⃗?
Also, can I draw the sphere tilted so the poles mathc up with the axis
of rotation μ⃗? Failing that, can I hide the lines in the sphere?
Thanks,
--Joel
More information about the PSTricks
mailing list