| Download
pstricks example with CoCalc tex file
Project: 📚MOOC Studies
Path: Public/pstricks-demo.tex
Views: 6851\documentclass{article}2\usepackage{pst-3dplot}3\usepackage{pstricks}4\usepackage{hyperref}56\begin{document}78Note: set Engine in the CoCalc Build panel to XeLaTeX when using pstricks.910\begin{center}11\psset{unit=0.7,Alpha=75}12\begin{pspicture}(-2.25,-3.5)(7.25,6.5)13\pstThreeDCoor[linecolor=red,xMax=7,yMax=7,zMax=7]14\pstThreeDLine[SphericalCoor,linecolor=blue]{->}(0,0,0)(10,45,60)15\pstThreeDDot[SphericalCoor,drawCoor](10,45,60)16\pstThreeDPut[SphericalCoor](10.5,45,65){$(x,y,z)$}17\pstThreeDNode[SphericalCoor](5,45,60){A}\pstThreeDNode(0,0,4){B}18\ncarc[arcangle=20]{->}{B}{A}19\pstThreeDPut[SphericalCoor](4,45,70){$\phi$}20\pstThreeDNode[SphericalCoor](2,45,0){B}\pstThreeDNode(2,0,0){A}21\ncarc[angleA=180]{<-}{B}{A}22\pstThreeDLine[SphericalCoor,linestyle=dashed](0,0,0)(5,45,0)23\pstThreeDPut[SphericalCoor](2.5,25,0){$\theta$}24\pstThreeDPut[SphericalCoor](6,45,50){$r$}25\end{pspicture}2627Scheme of Spherical Coordinates in $\,R^3\,$ using \textit{pstricks}.2829Adapted from \url{http://tug.org/PSTricks/main.cgi?file=pst-plot/3D/examples}30\end{center}3132\bigskip33\small34\begin{verbatim}35\psset{unit=0.7,Alpha=75}36\begin{pspicture}(-2.25,-3.5)(7.25,6.5)37\pstThreeDCoor[linecolor=red,xMax=7,yMax=7,zMax=7]38\pstThreeDLine[SphericalCoor,linecolor=blue]{->}(0,0,0)(10,45,60)39\pstThreeDDot[SphericalCoor,drawCoor](10,45,60)40\pstThreeDPut[SphericalCoor](10.5,45,65){$(x,y,z)$}41\pstThreeDNode[SphericalCoor](5,45,60){A}\pstThreeDNode(0,0,4){B}42\ncarc[arcangle=20]{->}{B}{A}43\pstThreeDPut[SphericalCoor](4,45,70){$\phi$}44\pstThreeDNode[SphericalCoor](2,45,0){B}\pstThreeDNode(2,0,0){A}45\ncarc[angleA=180]{<-}{B}{A}46\pstThreeDLine[SphericalCoor,linestyle=dashed](0,0,0)(5,45,0)47\pstThreeDPut[SphericalCoor](2.5,25,0){$\theta$}48\pstThreeDPut[SphericalCoor](6,45,50){$r$}49\end{pspicture}50\end{verbatim}5152\end{document}53545556