[pstricks] Points and vectors on a sphere with pst-3dplot

Felix Suwald felix.suwald at gmail.com
Thu Jul 6 16:15:50 CEST 2006


Hello

On 7/5/06, Herbert Voss <LaTeX at zedat.fu-berlin.de> wrote:
> Felix Suwald wrote:
>
> > I would like to draw a sphere with the
> > invisible axis dashed, and the visible
> > part of the axis pointing outwards as an
> > arrow. The problem is, that the outer axis
> > lines seem not to start at the surface
> > of the sphere, but somewhere below,
> > when I say that the start point is at a
> > distance equal to the radius of the sphere.
> > I tried with and without spherical coordinates.
> > What am I missing? What is wrong with
> > the radius of the sphere? I am confused,
>
> I get exactly what you want ...
>
> http://perce.de/temp/sphere.png


Yes, this looks very nice indeed!
But with the code below (I changed
one color to blue and the linethicknes),
I get:

http://www.astro.phys.ethz.ch/staff/fsuwald/private/sphere_3dplot.png

and that does not look like your
picture at all.


> \documentclass[a4paper]{article}
> \usepackage{pstricks}
> \usepackage{pst-3dplot}
> \begin{document}
>
> \begin{pspicture}(-5,-5)(5,5)
>     \pstThreeDSphere[linewidth=0.5pt](0,0,0){3}
>
> \pstThreeDCoor[linestyle=dashed,xMin=0,yMin=0,zMin=0,xMax=6,yMax=6,zMax=5.5]
>     \psset{SphericalCoor,linecolor=red}
>     \pstThreeDLine{->}(3,0,90)(5.5,0,90)
>     \pstThreeDLine{->}(3,0,0)(6,0,0)
>     \pstThreeDLine{->}(3,90,0)(6,90,0)
> \end{pspicture}
>
> \end{document}
>
>
> Herbert
>
>
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>

So maybe we should check versions? When I run
LaTeX, it says:

(/usr/share/texmf/tex/generic/pstricks/pstricks.tex
`PSTricks' v1.04  <2004/06/22> (tvz)
(/usr/share/texmf/tex/generic/pstricks/pstricks.con)))
(/usr/share/texmf/tex/latex/pstricks/pst-3dplot.sty
(/usr/share/texmf/tex/generic/pstricks/pst-3dplot.tex
(/usr/share/texmf/tex/generic/pstricks/pst-node.tex  v97 patch 11, 2000/11/09)
(/usr/share/texmf/tex/generic/pstricks/pst-plot.tex  v97 patch 2, 1999/12/12
(/usr/share/texmf/tex/generic/multido/multido.tex  v1.41, 2004/05/18 <tvz>))
(/usr/share/texmf/tex/generic/pstricks/pst-vue3d.tex
(/usr/share/texmf/tex/generic/pstricks/pst-key.tex)
`PST-VUE3D v1.0i, 2004/06/17 (ML))
(/usr/share/texmf/tex/generic/multido/multido.tex  v1.41, 2004/05/18 <tvz>)
`PST-3dplot' v1.51, 2004/12/03 (HV)
(/usr/share/texmf/tex/generic/xkeyval/pst-xkey.tex
(/usr/share/texmf/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texmf/tex/generic/xkeyval/xkeyval.tex)))))

This might be a little old.
When I use newer (?) versions instead, e.g.

(/usr/share/texmf/tex/generic/pstricks/pstricks.tex
`PSTricks' v1.04  <2004/06/22> (tvz)
(/usr/share/texmf/tex/generic/pstricks/pstricks.con))) (./pst-3dplot.sty
(./pst-3dplot.tex (/usr/share/texmf/tex/generic/pstricks/pst-3d.tex
 v97, 1997/03/25) (/usr/share/texmf/tex/generic/pstricks/pst-node.tex
 v97 patch 11, 2000/11/09) (/usr/share/texmf/tex/generic/pstricks/pst-plot.tex
 v97 patch 2, 1999/12/12 (/usr/share/texmf/tex/generic/multido/multido.tex
 v1.41, 2004/05/18 <tvz>)) (/usr/share/texmf/tex/generic/multido/multido.tex
 v1.41, 2004/05/18 <tvz>) `PST-3dplot' v1.72, 2006/02/07 (HV)

I get the error message:
! Package xcolor Error: Undefined color `[cmyk]{0.2,0.6,1,0}'.

I still miss the point.

Felix



More information about the PSTricks mailing list