\documentclass[pstricks]{standalone}
\usepackage{pst-plot,pst-3d,pst-gears,pst-node}
\usepackage[nomessages]{fp} \makeatletter
\define@key[psset]{}{theta1}{\def\psk@thetaA{#1}}
\define@key[psset]{}{theta2}{\def\psk@thetaB{#1}}
\psset{theta1=-90,theta2=90}
\def\psElasticFixedTwoWheels{\pst@object{psElasticFixedTwoWheels}}
\def\psElasticFixedTwoWheels@i{{\begin@SpecialObj
\FPset{\ZA}{\psk@ZA}\FPset{\ZB}{\psk@ZB} \FPset{\module}{\psk@m}
\FPeval{\RA}{\ZA*\module/2}\FPeval{\RB}{\ZB*\module/2} \FPeval{\OB}{\RA+\RB}
\FPeval{\RAp}{(\RA*2-2.5*0.2)/2} \FPeval{\RBp}{(\RB*2-2.5*0.2)/2}
\FPset{\OMEGAA}{-1} \FPeval{\OMEGAB}{(-\OMEGAA)*\ZA/\ZB}
\FPset{\ANGLE}{\psk@wheelrotation} \FPeval{\ANGLErad}{\ANGLE*\FPpi/180}
\FPeval{\nombrePoints}{trunc(2*\ANGLE+5,0)}
\FPeval{\thetaA}{(\psk@thetaA)*\FPpi/180} \FPeval{\thetaB}{(\psk@thetaB)*\FPpi/180}
\FPeval{\xA}{0.9*\RAp*cos(\thetaA+\OMEGAA*\ANGLErad)}
\FPeval{\yA}{sin(\thetaA+\OMEGAA*\ANGLErad)*\RAp*0.9}
\FPeval{\xB}{cos(\thetaB+\OMEGAB*\ANGLErad)*\RBp*0.9}
\FPeval{\yB}{sin(\thetaB+\OMEGAB*\ANGLErad)*\RBp*0.9+\OB}
\FPeval{\xM}{(\xA+\xB)/2} \FPeval{\yM}{(\yA+\yB)/2}
\ThreeDput[normal=0 0 1](0,0,0){\psgrid[subgriddiv=0,gridlabels=0pt]
\rput(0.05,-0.05){\pstgears[circles=false, polarangle=90, fillstyle=solid, color1=black, color2=black]}
\pstgears[circles=false,polarangle=90,fillstyle=solid]
\parametricplot[linecolor=red, plotpoints=\nombrePoints, algebraic, linewidth=0.1]{0}{\ANGLErad}{
  (\RAp*0.9*cos(\thetaA+\OMEGAA*t)+\RBp*0.9*cos(\thetaB+\OMEGAB*t))/2|
  (\RAp*0.9*sin(\thetaA+\OMEGAA*t)+\RBp*0.9*sin(\thetaB+\OMEGAB*t)+\OB)/2}
\psline{->}(0,0)(0,1) \psline{->}(0,0)(1,0)
\pscircle[linestyle=dotted](0,0){\RA} \pscircle[linestyle=dotted](0,\OB){\RB}}
\ThreeDput[normal=0 1 0](\xA,\yA,0) {\psline[linewidth=0.1]{-*}(0,0)(0,1) \pnode(0,1){P1}}
\ThreeDput[normal=0 1 0](\xB,\yB,0) {\psline[linewidth=0.1]{-*}(0,0)(0,1)\pnode(0,1){P2}}
\ThreeDput[normal=0 1 0](\xM,\yM,0) {\pnode(0,1){P3} \pnode(0,0){P4}}
\psline[linecolor=blue](P1)(P2) \psline[linecolor=red]{->}(P3)(P4) \psdot[linecolor=blue](P3)
\end@SpecialObj}\ignorespaces} \makeatother
\begin{document}
\multido{\i=0+45}{17}{\begin{pspicture}(-5,-5)(5,6)
\psElasticFixedTwoWheels[Z1=35, Z2=10, m=0.15, viewpoint=-1 -2 2, arrowinset=0, arrowsize=0.2, wheelrotation=\i, linewidth=0.025, color1=yellow, color2=green]
\end{pspicture}}
\end{document}