[pstricks] postscript calculation within pstricks arguments

Mathias Legrand mathias.legrand at mcgill.ca
Wed May 5 22:21:12 CEST 2010


Hi, I have the following:

\documentclass{article}
\usepackage{pstricks-add}
\usepackage{multido}

\begin{document}
\thispagestyle{empty}

\def\mypsframe#1#2{\psframe[linearc=#1 
pt,cornersize=absolute,fillstyle=solid,fillcolor=black!#2](0,0)(1,1)}

\psframe[fillstyle=solid,fillcolor=red!30](-8,-30)(21,30)

\multido{\i=0+1}{22}{%
    \multido{\I=0+1}{30}{%
       \rput[cc]{!4 \I\space mul 4 \i\space mul add}(!1 dup \i\space mul 
5.2 sub exch \I\space sub 2.7 add){%
       \mypsframe{\i}{\I}}%
                 }%
}%
\end{document}

but I would like to perform postscript calculations as follows (for 
instance) :

\mypsframe{\i}{\I\space \i add 10 mul}

but it does not work. Is there a systematic method for such requests?

Thank you


More information about the PSTricks mailing list