# [pstricks] computed coordinates

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Sun Apr 25 19:48:23 CEST 2010

Thanks, that works for me too.
So can someone explain to me the role of the exclamation point?
I know it is needed sometimes when an entry is being computed.

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/

On Apr 25, 2010, at 13:05, Michael Sharpe wrote:

>
> On Apr 25, 2010, at 9:44 AM, Zbigniew Nitecki wrote:
>
>>> %!TEX TS-program =  latex
>>> \documentclass[11pt]{article}
>>> \usepackage{amsmath, amssymb}
>>> \usepackage{pstricks, pst-plot, pst-math, pst-3dplot}
>>>
>>> \listfiles
>>> 	\newcommand{\vectorfieldtwo}[8]{
>>> 			\multido{\rx=#1+#2}{#3}{%
>>> 				\multido{\ry=#4+#5}{#6}{%
>>> 						}}
>>> 				}%2-dim vectorfield: x starts at #1, increments by #2, #3 iterations;
>>> 				%y starts at #4, increments by #5, #6 iterations;
>>> 				%#7, #8 components of vector (in terms of \rx & \ry, postscript style
>>>
>>>
>>>
>>> 	\newcommand{\vecThree}[6]{\pstThreeDLine[arrows=->]%
>>> 		(#1\space,#2\space,#3\space)(#4\space,#5\space,#6\space)
>>> 	}
>>> 		%arrow from (#1,#2,#3) to (#4,#5,#6)
>>> 	\newcommand{\vecatThree}[6]{\pstThreeDLine[arrows=->]%
>>> 		(!#1\space,  #2\space,  #3\space)
>>> 	}
>>> 		% arrow pinned to (#1,#2,#3) with components (#4,#5,#6)
>>>
>>> \begin{document}
>>> \begin{pspicture}(-5,-5)(5,5)
>>> %	\vectorfieldtwo{-1}{0.5}{6}{-1}{0.5}{6}{\rx\space dup mul}{\ry\space \rx\space add}
>>> %	\vecThree{0.5}{1}{-1}{1}{-1}{2}
>>> 	\vecatThree{0.5}{1}{-1}{1}{-1}{2}
>>> \end{pspicture}
>>>
>>> \end{document}
>>
>
> Your file as gives me the same error message, but compiles correctly if you remove the ! in each of the  coordinates in the definition of \vecatThree.
>
> Michael
>
>
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> archive: http://www.tug.org/pipermail/pstricks/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100425/57428bd0/attachment.html>