[pstricks] What is wrong here?
Michael Sharpe
msharpe at ucsd.edu
Sat May 1 05:14:23 CEST 2010
On Apr 30, 2010, at 11:30 AM, Zbigniew Nitecki wrote:
> I'm attaching a file and an output picture. Briefly, here is the code:
>> \begin{pspicture}(-3.5,-3)(3.5,3.5)
>> \psset{Alpha=90, Beta=30}
>> \multido{\rt=0+20}{18}{%
>> \pstThreeDLine[arrows=->, arrowscale=2, linewidth=2pt, linecolor=gray]%
>> (\rt\space cos 3 mul, \rt\space sin 3 mul, 0)%
>> (\rt\space cos 3 \rt\space 2 div sin 1.5 mul sub mul,%
>> \rt\space sin 3 \rt\space 2 div sin 1.5 mul sub mul,%
>> \rt\space 2 div cos 1.5 mul)%
>> }
>>
>> \parametricplotThreeD[yPlotpoints=100](-1,1)(0,360){
>> u 0.5 mul cos t mul 3 add u cos mul %
>> u 0.5 mul cos t mul 3 add u sin mul %
>> u 0.5 mul sin t mul%
>> }
>>
>> \parametricplotThreeD[plotstyle=curve, linewidth=2pt](0,720){
>> t 0.5 mul cos 3 add t cos mul %
>> t 0.5 mul cos 3 add t sin mul %
>> t 0.5 mul sin%
>> }
>>
>> \parametricplotThreeD[plotstyle=curve, linestyle=dashed, linewidth=2pt]%
>> (0,360){t cos 3 mul t sin 3 mul 0}
>> \end{pspicture}
>
> Note the following features: the first multido draws gray arrows, whose starting points should lie on the dashed given by the last parametricplot.
> I don't see any difference between the coding of the curve and of the starting points (other than \rt in place of u). Yet look where the arrow start.
>
> What have I done wrong?
I don't believe you did anything wrong here. I get exactly the same output using pst-3dplot.tex dated 2010/02/17 (v1.90). It seems to me that there is a bug in the way arguments to \pstThreeDLine are being parsed. The following offers a workaround.
\begin{pspicture}(-3.5,-6)(3.5,5.5)
\psset{Alpha=90, Beta=30}
\multido{\it=0+20}{18}{%
\pstThreeDNode(\it\space cos 3 mul, \it\space sin 3 mul, 0){A}%
\pstThreeDNode(\it\space cos 3 \it\space 2 div sin 1.5 mul sub mul,%
\it\space sin 3 \it\space 2 div sin 1.5 mul sub mul,%
\it\space 2 div cos 1.5 mul){B}%
\psline[arrows=->, arrowscale=2, linewidth=2pt, linecolor=gray](A)(B)}
\parametricplotThreeD[yPlotpoints=100](-1,1)(0,360){
u 0.5 mul cos t mul 3 add u cos mul %
u 0.5 mul cos t mul 3 add u sin mul %
u 0.5 mul sin t mul%
}
\parametricplotThreeD[plotstyle=curve, linewidth=2pt](0,720){
t 0.5 mul cos 3 add t cos mul %
t 0.5 mul cos 3 add t sin mul %
t 0.5 mul sin%
}
\parametricplotThreeD[plotstyle=curve, linestyle=dashed, linewidth=2pt]%
(0,360){t cos 3 mul t sin 3 mul 0}
\end{pspicture}
More information about the PSTricks
mailing list