[pstricks] arrows and arrowheads in pst3d-solides
Zbigniew Nitecki
zbigniew.nitecki at tufts.edu
Fri Jul 23 18:26:48 CEST 2010
The code shown below is intended to draw a sphere, a point on the sphere, the plane tangent to the sphere there, and the normal vector there.
Everything works well, except the normal vector. When I try to use the predefined pst3d-solides object vecteur, I get the appropriate vector, but
the arrowhead on it is awful (is there a way to control arrowheads in this setting?)
So I tried a pst-3dplot macro(defined just before \begin{document} which has worked in the past;
it is called in the last uncommented line before \end{pspicture}. When this call is commented out, the code compiles fine (of course,
with no vector shown), but when it is not commented out, the error message is
> Error: /typecheck in --show--
> Operand stack:
> --nostringval--
> Execution stack:
> %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop 1739 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval--
> Dictionary stack:
> --dict:1150/1684(ro)(G)-- --dict:0/20(G)-- --dict:80/200(L)-- --dict:771/1012(L)-- --dict:180/300(L)-- --dict:38/200(L)-- --dict:186/200(L)--
> Current allocation mode is local
> Last OS error: 2
> Current file position is 551632
> GPL Ghostscript 8.70: Unrecoverable error, exit code 1
Where is the conflict causing this problem? Does anyone have a workaround?
> % !TEX TS-program = latex
> \listfiles
> \documentclass[11pt]{article}
> \usepackage{pst-solides3d, pst-3dplot, pst-math,pstricks-add}
> \usepackage{pst-3d}
> %\usepackage{graphicsmacros}
> \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)
>
> \begin{document}
> a little text before, going on and on and on and on....
> \begin{figure}[htbp]
> \begin{center}
> \begin{pspicture}(-3,-3.5)(3,3)
> \psset{unit=0.75}
> \psset{lightsrc=50 -20 40, viewpoint=20 20 50 rtp2xyz,
> Decran=50}
>
> \axesIIID[linecolor=red](1,1,1)(2,2,2)
>
> %
> \psSolid[
> object=sphere,
> r=1,
> ngrid=20 20,
> fillcolor=lightgray,
> grid,
> ]
> \psPoint(0.612,-0.612,0.5){P}
> \psPolygonIIID[linestyle=none,fillstyle=solid,fillcolor=red!20, opacity=0.1]%
> (0.259,-0.29,1.366)%
> (0,-1.224,0.5)%
> (0.965,-0.965,-0.366)%
> (1.224,0,0.5)%
> \psdots[dotstyle=o, dotsize=0.2,fillcolor=red](P)
> % \psSolid[
> % object=vecteur,
> % linecolor=red,
> % args=0.53 -0.53 0.433] (0.612,-0.612,0.5)
> % ]
> \vecThree[linecolor=red, arrows=->] {0.612}{-0.612}{0.5}{1.142}{-1.142}{0.933}
> % \pstThreeDPut(1,0.5,0.3){\textcolor{red}{$(1,\half,\recip{8})$}}
>
> \end{pspicture}
>
>
> \caption{Tangent Plane to Sphere at $\left(\frac{\sqrt{3}}{2\sqrt{2}},-\frac{\sqrt{3}}{2\sqrt{2}},\frac{1}{2}\right)$}
> \label{fig:spheretan}
> \end{center}
> \end{figure}
>
> a little text after
> \end{document}
Picture when line "vecThree[linecolor=red..." is commented out:
Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155
telephones:
Office (617)627-3843
Dept. (617)627-3234
Dept. fax (617)627-3966
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100723/16f3d338/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pst3d test 1.3.pdf
Type: application/pdf
Size: 20694 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20100723/16f3d338/attachment-0001.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100723/16f3d338/attachment-0003.html>
More information about the PSTricks
mailing list