# [pstricks] computing coordinates

Leon Free leon.free at free.fr
Wed May 29 23:11:58 CEST 2013

Hi
I had to do something similar. I used the fp package to compute and
store the value of 2+\rx. It may not be the most elegant solution, but
it seems to produce the desired result

\documentclass{article}
\usepackage{pstricks,multido,fp}

\begin{document}
\multido{\rx=0.0+0.2}{11}{\FPeval{\rrxx}{2+\rx}\psline(\rx, -\rx)(\rrxx,
-\rx)}
\end{document}

L

> I know I have had this answered before, but can't remember how it works.
>
> I want to draw a family of horizontal lines (with arrowheads) filling out a parallelogram, bounded by
> the lines y=-x and y=-(x+2) from y=0 to y=-2.  I am trying to do it via \multido, so for t=0 to t=2 in increments of d,
> I want to repeat \psline{->}(t,-t)(t+2,-t).  I know that
> \multido{\rx=0.0+0.2}{11}{\psline(\rx,-\rx)(2+\rx,-\rx)}
> doesn't work, because postscript gets confused by "2+\rx".
> So my question is, how do I specify coordinates of a point to be computed from a parameter?
> I seem to recall there are two systems, one involving an exclamation point and the other a postscript reverse Polish format, but haven't on a quick search found the appropriate information in LGC2 or Herbert's book.
>
> Can someone (again) explain how this is done?
>
> Zbigniew Nitecki
> Department of Mathematics
> Tufts University
> Medford, MA 02155
>
> telephones:
> Office    (617)627-3843
> Dept.    (617)627-3234
> Dept. fax    (617)627-3966
> http://www.tufts.edu/~znitecki/
>
>
>
>
>
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> archive: http://www.tug.org/pipermail/pstricks/
>