Consider the following code, with which Herbert Voß helped me over at {TeX} SX:
Code: Select all
\documentclass{article}\usepackage{pst-solides3d}\usepackage{expl3}%% Parameters% Windings\def\lWind{20}\def\rWind{10}% Radii\def\rHelix{1.11}\def\rWire{0.015}% Floating point calculations\ExplSyntaxOn\cs_new_eq:NN\calc\fp_eval:n\ExplSyntaxOff% Constants\def\factor{80} % \factor > \lWind,\rWind\def\nLeft{\calc{2*\lWind/\factor} }\def\nRight{\calc{2*\rWind/\factor} }%% Colours\colorlet{wireColor}{red!60}\colorlet{coreColor}{cyan!50}%% Wire\newpsobject{wire}{psSolid}{%object=courbe,% Choose max(\nRight,\nLeft) -- the fewer windings, the larger% the constant multiplied by max(\nRight,\nLeft)ngrid=970 \nLeft mul cvi 15,r=\rWire,fillcolor=wireColor,incolor=wireColor}\pagestyle{empty}\begin{document}
\nLeft
and \nRight
if I want PSTricks to do them without activating the L3 fp syntax? I have triedCode: Select all
\def\nLeft{2 \lWind mul \factWind div }\def\nRight{2 \rWind mul \factWind div }
Thank you in advance!