1
2\documentclass{article}
3\usepackage{pst-3dplot}
4\usepackage{pstricks}
5\usepackage{hyperref}
6
7\begin{document}
8
9Note: set Engine in the CoCalc Build panel to XeLaTeX when using pstricks.
10
11\begin{center}
12\psset{unit=0.7,Alpha=75}
13\begin{pspicture}(-2.25,-3.5)(7.25,6.5)
14  \pstThreeDCoor[linecolor=red,xMax=7,yMax=7,zMax=7]
15  \pstThreeDLine[SphericalCoor,linecolor=blue]{->}(0,0,0)(10,45,60)
16  \pstThreeDDot[SphericalCoor,drawCoor](10,45,60)
17  \pstThreeDPut[SphericalCoor](10.5,45,65){$(x,y,z)$}
18  \pstThreeDNode[SphericalCoor](5,45,60){A}\pstThreeDNode(0,0,4){B}
19  \ncarc[arcangle=20]{->}{B}{A}
20  \pstThreeDPut[SphericalCoor](4,45,70){$\phi$}
21  \pstThreeDNode[SphericalCoor](2,45,0){B}\pstThreeDNode(2,0,0){A}
22  \ncarc[angleA=180]{<-}{B}{A}
23  \pstThreeDLine[SphericalCoor,linestyle=dashed](0,0,0)(5,45,0)
24  \pstThreeDPut[SphericalCoor](2.5,25,0){$\theta$}
25  \pstThreeDPut[SphericalCoor](6,45,50){$r$}
26\end{pspicture}
27
28Scheme of Spherical Coordinates in $\,R^3\,$ using \textit{pstricks}.
29
31\end{center}
32
33\bigskip
34\small
35\begin{verbatim}
36\psset{unit=0.7,Alpha=75}
37\begin{pspicture}(-2.25,-3.5)(7.25,6.5)
38  \pstThreeDCoor[linecolor=red,xMax=7,yMax=7,zMax=7]
39  \pstThreeDLine[SphericalCoor,linecolor=blue]{->}(0,0,0)(10,45,60)
40  \pstThreeDDot[SphericalCoor,drawCoor](10,45,60)
41  \pstThreeDPut[SphericalCoor](10.5,45,65){$(x,y,z)$}
42  \pstThreeDNode[SphericalCoor](5,45,60){A}\pstThreeDNode(0,0,4){B}
43  \ncarc[arcangle=20]{->}{B}{A}
44  \pstThreeDPut[SphericalCoor](4,45,70){$\phi$}
45  \pstThreeDNode[SphericalCoor](2,45,0){B}\pstThreeDNode(2,0,0){A}
46  \ncarc[angleA=180]{<-}{B}{A}
47  \pstThreeDLine[SphericalCoor,linestyle=dashed](0,0,0)(5,45,0)
48  \pstThreeDPut[SphericalCoor](2.5,25,0){$\theta$}
49  \pstThreeDPut[SphericalCoor](6,45,50){$r$}
50\end{pspicture}
51\end{verbatim}
52
53\end{document}
54
55