[pstricks] order of commands
Jon Joseph
josco.jon at gmail.com
Thu Aug 9 21:43:33 CEST 2012
All: I have run into this problem before and I am wondering if there is a general rule I should be aware of. In the code below I have indicated three locations where I am trying to draw a 3D line. Two work and one doesn't. When I forget about this ordering issue it can take me along time to figure out the goof. Advice please. Jon
\documentclass[12pt]{article}
\usepackage[letterpaper,asymmetric=true, total={18cm,22cm},
top=3cm, bindingoffset=1cm]{geometry}
\usepackage[svgnames]{pstricks}
\usepackage{pst-plot,pst-infixplot}
\usepackage{pst-solides3d}
\usepackage{pstricks-add}
\begin{document}
\psset{unit=2cm}
\begin{pspicture}[showgrid=true](-1,-1)(4,5)
\psset{ viewpoint=50 -30 -15, lightsrc=50 -10 65, Decran=250}
\psLineIIID[linecolor=black, linestyle=dashed](0,0,0)(0.519615, 0.3, 1.03923) %<-- Does work if \psLineIIID command is here
\defFunction[algebraic]{patch1}(u,v){cos(u)*sin(v)}{sin(u)*sin(v)}{cos(v)}
\defFunction[algebraic]{patch2}(u,v){1.2*cos(u)*sin(v)}{1.2*sin(u)*sin(v)}{1.2*cos(v)}
% \psLineIIID[linecolor=black](0,0,0)(0.519615, 0.3, 1.03923) %<---- Does NOT work if \psLineIIID command is here
\psSolid[object=surfaceparametree,
base= 0 pi 6 div pi 6 div pi 4 div,
ngrid=25 25,
grid=false,
action=draw**,
function=patch1]
\psSolid[object=surfaceparametree,
base= 0 pi 6 div pi 6 div pi 4 div,
ngrid=25 25,
grid=false,
action=draw**,
function=patch2]
\psset{linestyle=dashed}
\psLineIIID[linecolor=black](0,0,0)(0.734847, 0.424264, 0.848528)
\psLineIIID[linecolor=black](0,0,0)(0.848528, 0., 0.848528)
% \psLineIIID[linecolor=black](0,0,0)(0.519615, 0.3, 1.03923) % <--- Does work if \psLineIIID command is here.
\psLineIIID[linecolor=black](0,0,0)(0.6, 0., 1.03923)
\psset{linestyle=solid}
\axesIIID[arrowscale=1.5](1.2,1.2,1.2)
\end{pspicture}
\end{document}
More information about the PSTricks
mailing list