\DocumentMetadata{lang=en} %% $Id: pst-sphericaltrochoid-doc.tex 1205 2025-12-23 15:56:28Z herbert $ \PassOptionsToPackage{backref}{biblatex} \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-sphericaltrochoid} \let\PSTfileversion\fileversion \let\PSTfiledate\filedate \renewcommand\bgImage{\psscalebox{0.75}{\begin{pspicture}(-5,-5)(5,5) \psSphericalTrochoid[Sphere=false,rG=0.8,rR=0.5,viewpoint=500 0 90 rtp2xyz,w=180] \end{pspicture}}} \addbibresource{\jobname.bib} \begin{document} \title{\texttt{pst-sphericaltrochoid}} \subtitle{Spherical Trochoids with PSTricks; v.\PSTfileversion} \author{Manuel Luque\\ Herbert Voß} \docauthor{} \date{\today} \settitle \begin{abstract} This package involves the drawing of spherical trochoids with PSTricks using the command \Lcs{psSphericalTrochoid}\Largs{options}. A spherical trochoid motion is one of the following: \begin{itemize} \item rolling of a circle $k$ on a circle $k0$ (both in the same sphere) \item rolling of two concentric (not coaxial) cones of revolution \item rolling of a sphere on two coaxial circles \end{itemize} \end{abstract} \section{The sources} There is, of course, the reference \url{https://mathcurve.com/courbes3d/cycloidspheric/trochoidspheric.shtml}, which includes the formulas and is beautifully illustrated.~\parencite{ferreol} Patrick Clément attempted this with \Index{GeoGebra}: \url{https://www.geogebra.org/m/RCyfhMqw}, but the source file is missing.~\parencite{clement} %For my part, I tried to reproduce the work done by This package is based on the work of Erik Mahieu, who does it with Mathematica\footnote{% Erik Mahieu is the author of numerous remarkable projects: \url{https://demonstrations.wolfram.com/author.html?author=Erik+Mahieu}} \url{https://demonstrations.wolfram.com/SphericalTrochoid/}.~\parencite{wolfram} There are two advantages over the previous methods: the simplicity of the diagram, which only shows the essentials, and especially the proof of the equations. The following animations were created with the package; the \Lext{tex} files are included in the zip archive. \section{The options for \nxLcs{psSphericalTrochoid}} \begin{enumerate}[nosep] \item[\LKeyset{rB=1}]: radius of the base disk; \item[\LKeyset{rR=1}]: radius of the rolling disk; \item[\LKeyset{rG=1}]: distance from the generating point to the center of the rolling disk; \item[\LKeyset{w=90}]: angle in degrees formed between the xy plane and the plane of the rolling disk (0 < ω < π); \item[\LKeyset{t=30}]: angular displacement, in degrees, of the rotating disk around the edge of the base disk; \item[\LKeyset{tmax=360}]: maximum angular displacement for drawing the curve; \item[\LKeyset{Sphere=true}]: a boolean value to determine whether or not to draw the sphere, set to true by default. \end{enumerate} The \Lkeyset{linecolor=red} option in PSTricks allows you to choose the color of the curve (red by default). The options \LKeyset{viewpoint=500 0 30 rtp2xyz}, \LKeyset{Decran=1000} and \LKeyset{resolution=360} of package \LPack{pst-solides3d} are the default options; they will be modified if necessary in the command, as shown in the next example: \begin{exampleM}{Using the macro} \begin{pspicture}(-5,-5)(5,5) \psSphericalTrochoid[Sphere=false,rG=0.8,rR=0.5,viewpoint=500 0 90 rtp2xyz,w=180] \end{pspicture} \end{exampleM} \section{Examples} View the following animations with the AdopeReader. \begin{codeblockA}[title=Creating an inline animation with package \texttt{animate}] \begin{animateinline}[controls,palindrome, begin={\begin{pspicture}[showgrid=](-5,-3)(5,5)}, end={\end{pspicture}}]{10}% 10 images/s \multiframe{37}{i=0+10}{% \psSphericalTrochoid[rG=0.8,rR=0.5,tmax=\i,t=\i,Decran=1200,viewpoint=500 10 30 rtp2xyz]} \end{animateinline} \end{codeblockA} \begin{center} \begin{animateinline}[controls,palindrome, begin={\begin{pspicture}[showgrid=](-5,-3)(5,5)}, end={\end{pspicture}}]{10}% 10 images/s \multiframe{37}{i=0+10}{ \psSphericalTrochoid[rG=0.8,rR=0.5,tmax=\i,t=\i,Decran=1200,viewpoint=500 10 30 rtp2xyz]} \end{animateinline} \end{center} %\begin{exampleM}{Graphic state for i=5} %\begin{pspicture}[showgrid=](-5,-3)(5,5) %\psSphericalTrochoid[rG=0.8,rR=0.5,tmax=5,t=5,Decran=1200,viewpoint=500 10 30 rtp2xyz] %\end{pspicture} %\end{exampleM} \begin{codeblockA}[title=Creating an inline animation with package \texttt{animate}] \begin{animateinline}[controls,palindrome, begin={\begin{pspicture}[showgrid=](-5,-5)(5,5)}, end={\end{pspicture}}]{10}% 10 images/s \multiframe{73}{i=0+10}{% \psSphericalTrochoid[Sphere=false,rG=0.75,rR=0.66667,tmax=\i,t=\i,viewpoint=500 0 90 rtp2xyz, w=180]} \end{animateinline} \end{codeblockA} %\begin{exampleM}{Graphic state for i=5} %\begin{pspicture}[showgrid=](-5,-3)(5,5) %\psSphericalTrochoid[Sphere=false,rG=0.75,rR=0.66667,tmax=5,t=5, % viewpoint=500 0 90 rtp2xyz, w=180] %\end{pspicture} %\end{exampleM} \begin{center} \begin{animateinline}[controls,palindrome, begin={\begin{pspicture}[showgrid=](-5,-5)(5,5)}, end={\end{pspicture}}]{10}% 10 images/s \multiframe{73}{i=0+10}{ \psSphericalTrochoid[Sphere=false,rG=0.75,rR=0.66667,tmax=\i,t=\i, viewpoint=500 0 90 rtp2xyz,w=180]} \end{animateinline} \end{center} \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} The example files are saved in the directory \path{animations/}. \nocite{wien,pottmann} \printbibliography \printindex \end{document}