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

Herbert Voss LaTeX at zedat.fu-berlin.de
Wed Jul 5 14:20:40 CEST 2006

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

\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