\DocumentMetadata{lang=en}
%% $Id: pst-nutation-doc.tex 1199 2025-12-20 13:34:36Z herbert $
\documentclass[fontsize=11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,
   headings=small, headinclude=false,footinclude=false,twoside]{pst-doc}
\usepackage{pst-plot}
\usepackage{animate}
\usepackage{enumitem,minted-code}
\setlist{nosep}
\usepackage{pst-tools,pst-nutation}
\let\PSTfileversion\fileversion
\let\PSTfiledate\filedate

\renewcommand\bgImage{\begin{pspicture}(-4,-4)(4,4)
\psset{viewpoint=500 30 30 rtp2xyz,Decran=500,solidmemory}
\psNutation[dtheta=0,frequency=0,LargeSphere=false]
\psSolid[object=plan,definition=equation,args={[0 0 1 -4]},action=none,RotX=0,name=sensRotationOz]
\psProjection[object=cercle,linewidth=0.025,resolution=360,range=-120 120,
              plan=sensRotationOz,args=0 0 0.5]%
\psProjection[object=vecteur,linewidth=0.05,plan=sensRotationOz,
              args=-0.5  -0.342 sub 0.5 mul 0.866 0.94 sub 0.5 mul ](-0.25,0.433)%
\psPoint(0,0,3.8){Z}\uput[dr](Z){$\alpha$}
\psSolid[object=plan,definition=normalpoint,args={0 2 3.464 [0 0.5 0.866 ]},
         action=none,RotX=0, name=sensRotationAxe]
\psProjection[object=cercle,linewidth=0.025,resolution=360,range=-120 120,linecolor=red,
              plan=sensRotationAxe,args=0 0 0.5]%
\psProjection[object=vecteur,linewidth=0.05,linecolor=red,plan=sensRotationAxe,
              args=-0.5  -0.342 sub 0.5 mul 0.866 0.94 sub 0.5 mul ](-0.25,0.433)%
\psPoint(0,2,3.464){Axe}\uput[ur](Axe){\textcolor{red}{$\omega$}}
\psSolid[object=plan,definition=normalpoint,args={0 0 0 [1 0 0 180] },
         action=none,RotX=0,name=inclinaison]
\psProjection[object=cercle,linewidth=0.025,resolution=360,range=0 -30,linecolor=blue,
              plan=inclinaison,args=0 0 3]%
\psProjection[object=vecteur,linewidth=0.05,
              plan=inclinaison,linecolor=blue,
              args=-0.073 -0.136 ](2.67,-1.36)%
\psProjection[object=line,linewidth=0.05,linestyle=dashed,
              plan=inclinaison,linecolor=orange,
              args= -2.6 1.5 2.6 -1.5]%
\psPoint(0,0.776,2.9){T}\uput[u](T){\blue$\theta$}
\axesIIID(2,2,2)(4,4,4)
\end{pspicture}}

\addbibresource{\jobname.bib}
\begin{document}

\title{\texttt{pst-nutation}}
\subtitle{Rotation, Precession, Nutation with pst-nutation; v.\PSTfileversion}
\author{Manuel Luque\\ Herbert Voß}
\docauthor{}
\date{\today}
\settitle

\begin{abstract}
This exercise illustrates the concepts of rotation, precession, and 
nutation.~\parencite{wikipedia,fitzpatrick}
\LPack{pst-nutation} 
package is designed for this purpose, using the command 
\Lcs{psNutation}\Largs{options}.
\end{abstract}

\section{The options}
\begin{center}
\begin{pspicture}(-4,-4)(4,4)
\psset{viewpoint=500 30 30 rtp2xyz,Decran=500,solidmemory}
\psNutation[dtheta=0,frequency=0,LargeSphere=false]
\psSolid[object=plan,definition=equation,args={[0 0 1 -4]},
         action=none,RotX=0,
         name=sensRotationOz]
\psProjection[object=cercle,linewidth=0.025,resolution=360,range=-120 120,
              plan=sensRotationOz,
              args=0 0 0.5]%
\psProjection[object=vecteur,linewidth=0.05,
              plan=sensRotationOz,
              args=-0.5  -0.342 sub 0.5 mul 0.866 0.94 sub 0.5 mul ](-0.25,0.433)%
\psPoint(0,0,3.8){Z}\uput[dr](Z){$\alpha$}
\psSolid[object=plan,definition=normalpoint,args={0 2 3.464 [0 0.5 0.866 ]},
         action=none,RotX=0,
         name=sensRotationAxe]
\psProjection[object=cercle,linewidth=0.025,resolution=360,range=-120 120,linecolor=red,
              plan=sensRotationAxe,
              args=0 0 0.5]%
\psProjection[object=vecteur,linewidth=0.05,linecolor=red,
              plan=sensRotationAxe,
              args=-0.5  -0.342 sub 0.5 mul 0.866 0.94 sub 0.5 mul ](-0.25,0.433)%
\psPoint(0,2,3.464){Axe}\uput[ur](Axe){\textcolor{red}{$\omega$}}
\psSolid[object=plan,definition=normalpoint,args={0 0 0 [1 0 0 180] },
         action=none,RotX=0,
         name=inclinaison]
\psProjection[object=cercle,linewidth=0.025,resolution=360,range=0 -30,linecolor=blue,
              plan=inclinaison,
              args=0 0 3]%
\psProjection[object=vecteur,linewidth=0.05,
              plan=inclinaison,linecolor=blue,
              args=-0.073 -0.136 ](2.67,-1.36)%
\psProjection[object=line,linewidth=0.05,linestyle=dashed,
              plan=inclinaison,linecolor=orange,
              args= -2.6 1.5 2.6 -1.5]%
\psPoint(0,0.776,2.9){T}\uput[u](T){\blue$\theta$}
\axesIIID(2,2,2)(4,4,4)
\end{pspicture}
\end{center}

All angles are in degrees.

\begin{description}
\item[\LKeyset{theta=-30}]: tilt of the axis relative to $Oz$;
\item[\LKeyset{omega=0}]: angle of rotation around the sphere's axis;
\item[\LKeyset{alpha=0}]: angle of rotation of the entire system around $Oz$;
\item[\LKeyset{dtheta=5}]: amplitude of the tilt variations in the case of nutation;
\item[\LKeyset{frequency=6}]: frequency of the axis's oscillations in the case of nutation.
\item[\LKeyset{LargeSphere=true}]: A Boolean to draw the large sphere on which the curves will be inscribed.
\end{description}

\section{The rotation}

%\begin{center}
%\begin{animateinline}[controls,loop,
%                     begin={\begin{pspicture}[showgrid=](-5,-5)(5,5)},
%                     end={\end{pspicture}}]{20}% 20 images/s
%\multiframe{19}{i=0+1}{
%\psset{viewpoint=500 0 40 rtp2xyz,Decran=500}
%\psNutation[omega=\i,dtheta=0,frequency=0,theta=-30]}
%\end{animateinline}
%\end{center}

\begin{center}
\begin{pspicture}[showgrid=](-5,-5)(5,5)
\psset{viewpoint=500 0 40 rtp2xyz,Decran=500}
\psNutation[omega=10,dtheta=0,frequency=0,theta=-30]
\end{pspicture}
\end{center}

\begin{codeblockA}[title=Animation of first image]
\begin{animateinline}[controls,loop,
                     begin={\begin{pspicture}[showgrid=](-5,-5)(5,5)},
                     end={\end{pspicture}}]{20}% 20 images/s
\multiframe{19}{iA=0+1}{%
  \psset{viewpoint=1000 0 40 rtp2xyz, Decran=1000}
  \psNutation[omega=\iA,dtheta=0,frequency=0,theta=-30]}
\end{animateinline}
\end{codeblockA}

By default on the sphere, the meridians are spaced 20 degrees apart 
\LKeyset{ngrid=9 18}. The loop rotates the sphere by 1 degree at each step, 
thus creating the illusion of a complete rotation with the \Lkeyword{loop} 
option of the animate package.


\section{Rotation and Precession}
\begin{center}
\begin{pspicture}[showgrid=](-5,-5)(5,5)
  \psset{viewpoint=500 0 40 rtp2xyz,Decran=500}
  \psNutation[omega=0,alpha=0,frequency=0,dtheta=0]
\end{pspicture}
\end{center}

\begin{codeblockA}[title=Animation of second image]
\begin{animateinline}[controls,loop,
                     begin={\begin{pspicture}[showgrid=](-5,-5)(5,5)},
                     end={\end{pspicture}}]{20}% 20 images/s
\multiframe{73}{n=0.00+0.25,N=0.0+5.0}{
\psset{viewpoint=500 0 40 rtp2xyz,Decran=500}
\psNutation[omega=\n,alpha=\N,frequency=0,dtheta=0]}
\end{animateinline}
\end{codeblockA}

\section{Rotation with Precession and Nutation}
\begin{center}
\begin{pspicture}[showgrid=](-5,-5)(5,5)
\psset{viewpoint=500 0 40 rtp2xyz,Decran=500}
\psNutation[omega=0,alpha=0,frequency=6,theta=25,linecolor={[rgb]{0.8 0 0}}]
\end{pspicture}
\end{center}

\begin{codeblockA}[title=Animation of third image]
\begin{animateinline}[controls,loop,
                     begin={\begin{pspicture}[showgrid=](-5,-5)(5,5)},
                     end={\end{pspicture}}]{10}% 10 images/s
\multiframe{73}{n=0.00+0.25,N=0.0+5.0}{
\psset{viewpoint=1000 0 40 rtp2xyz,Decran=1000}
\psNutation[omega=\n,alpha=\N,frequency=6,theta=25]}
\end{animateinline}
\end{codeblockA}

\section{Animation}
The conversion to \Lext{gif} is done by the program \Lprog{magick}, formerly known
as \Lprog{convert}:

\begin{codeblock}[minted language=bash, title=Converting pdf to gif]
magick convert -delay 5 -density 100x100 -alpha remove anim1.pdf -loop 0 anim1.gif
\end{codeblock}

\printbibliography

\printindex

\end{document} 