[pstricks] arrows and arrowheads in pst3d-solides

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Sat Jul 24 16:15:28 CEST 2010


Thanks to both Jean-Paul and Florian;  both solutions work.
I am still, however, puzzled as to why mine doesn't---but no big deal.

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 Jul 23, 2010, at 15:20, Jean-Paul Vignault wrote:

> 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?)

http://melusine.eu.org/lab/bpst/pst-solides3d/vecteur

Jean-Paul Vignault


On Jul 23, 2010, at 13:49, Florian Schubert wrote:

> Isn`t it possible to define two points and connecting it with a line:
> 
> \pspoint(<x0>,<y0>,<z0>){A1}
> \pspoint(<x1>,<y1>,<z1>){A2}
> \psline[<param>]{<arrows>}(A1)(A2)
> 
> \vecThree[linecolor=red, arrows=->] {0.612}{-0.612}{0.5}{1.142}{-1.142}{0.933}:
> 
> \psPoint (0.612,-0.612,0.5){A1}
> \psPoint(1.142,-1.142,0.933){A2}
> \psline[linecolor=red,arrowsize=.5pt]{->}(A1)(A2)
> 
> See "pst-solides3d: The Documentation – The Basics v.  4.10 (2008/07/24)"
>  CHAPTER 10 Interaction with PSTricks
> 
> Florian
> 
> Am 23.07.2010 18:26, schrieb Zbigniew Nitecki:
>> 
>> 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
>> 
>> 
>> _______________________________________________
>> PSTricks mailing list
>> PSTricks at tug.org
>> http://tug.org/mailman/listinfo/pstricks
>> archive: http://www.tug.org/pipermail/pstricks/
> 
> -- 
> 
> Florian Schubert
> Pestalozzistraße 47
> 
> D-79540 Lörrach
> 
> 47° 35' 50'' nördliche Breite, 7° 39' 35'' östliche Länge
> 
> _______________________________________________
> 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/20100724/d0dc23df/attachment-0001.html>


More information about the PSTricks mailing list