6

I am using the pst-spirograph package. An image produced by this package will show the spirograph curve, but will also show the gears and the pen point. I would like to obtain just the curve. Consider the following code:

\documentclass{standalone}
\usepackage{pstricks}
\usepackage{pst-spirograph}

\begin{document}
\begin{pspicture}(-6.2,-6.2)(6.2,6.2)   
\psSpirograph[Z1=105,
              Z2=56,
              m=0.1,
              ap=10,
              holenumber=1,
              polarangle=0,
              thetamax=2880,
              color1=white,
              color2=white,
              linecolor=red,
              curvecolor=black]
\end{pspicture}
\end{document}

This produces a drawing of the curve together with the gears that produce the curve: Curve with gears

If I change linecolor to white, the gears will no longer show, but the inner gear is printed in white over the curve, producing breaks in the curve. Also, the pen point is still showing. Curve without gears but with breaks

How can I eliminate the breaks and the pen point?

5

The following code modifies \psSpirograph's internals to remove the inner and outer gears from the PostScript code entirely, leaving only the inner cycloid:

enter image description here

\documentclass{standalone}

\usepackage{pst-spirograph,etoolbox}
\makeatletter
\patchcmd{\psSpirograph@ii}{Roue2}{}{}{}% Remove Roue2
\patchcmd{\psSpirograph@ii}{Roue1}{
  /Roue {} def % Overwrite definition of /Roue
  /COURONNE {} def % Overwrite definition of /COURONNE
  Roue1
}{}{}
\makeatother

\begin{document}

\begin{pspicture}(-6.2,-6.2)(6.2,6.2)   
  \psSpirograph[Z1=105,
                Z2=56,
                m=0.1,
                ap=10,
                holenumber=1,
                polarangle=0,
                thetamax=2880,
                color1=white,
                color2=white,
                linecolor=red,
                curvecolor=black]
\end{pspicture}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.