[pstricks] PS operations inside multido

Mikel Catania mikel.catania at gmail.com
Tue Dec 16 14:09:10 CET 2008


Hi all,

I was trying to automatize some drawings using the multido package and
PostScript operations (mul, add...). Let's suppose I want to draw a 3D
vector rotating around the z-axis. The following works fine:

\documentclass[a4paper,10pt]{article}

\usepackage{pstricks}
\usepackage{pst-3dplot}

\begin{document}
\begin{pspicture}(-4,-4)(4,4)
\psset{Alpha=60,Beta=10}
\pstThreeDCoor
\pstThreeDLine(0,0,0)(0 cos,0 sin,1)
\pstThreeDLine(0,0,0)(45 cos,45 sin,1)
\pstThreeDLine(0,0,0)(90 cos,90 sin,1)
\pstThreeDLine(0,0,0)(135 cos,135 sin,1)
\pstThreeDLine(0,0,0)(180 cos,180 sin,1)
\pstThreeDLine(0,0,0)(225 cos,225 sin,1)
\pstThreeDLine(0,0,0)(270 cos,270 sin,1)
\pstThreeDLine(0,0,0)(315 cos,315 sin,1)
\end{pspicture}
\end{document}

But when trying to use multido, the sine and cosine commands seem to not
work, nothing appears on the output (except the axes):

\documentclass[a4paper,10pt]{article}

\usepackage{pstricks}
\usepackage{pst-3dplot}
\usepackage{multido}

\begin{document}
\begin{pspicture}(-4,-4)(4,4)
\psset{Alpha=60,Beta=10}
\pstThreeDCoor
\multido{\rA=0.00+45.00}{8}{%
    \pstThreeDLine(0,0,0)(\rA cos,\rA sin,1)}
\end{pspicture}
\end{document}

Is there any way to get this working? Why doesn't multido perform the
operations?

Mikel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20081216/2c8c21ef/attachment.html 


More information about the PSTricks mailing list