[pstricks] computed coordinates

Michael Sharpe msharpe at ucsd.edu
Sun Apr 25 19:05:59 CEST 2010


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}
>> \usepackage{pst-grad, pst-func, pst-text}
>> \usepackage{pstricks-add}
>> 
>> \listfiles
>> 	\newcommand{\vectorfieldtwo}[8]{
>> 			\multido{\rx=#1+#2}{#3}{%
>> 				\multido{\ry=#4+#5}{#6}{%
>> 					\psline{->}(!\rx\space \ry)(!\rx\space #7 add \ry\space #8 add)
>> 						}}
>> 				}%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)
>> 		(!#1\space #4\space add, #2\space #5\space add, #3\space #6\space add)
>> 	}
>> 		% 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




More information about the PSTricks mailing list