[pstricks] 3d "arrows"
Jean-Côme Charpentier
jean-come.charpentier at wanadoo.fr
Fri Dec 31 11:54:25 CET 2010
Le 30/12/2010 23:02, Per Ting a écrit :
> When I run your code, Miktex stops at pstricks-add (or pst-plot,
> included in it) with error messag:
>
> ("C:\Program Files (x86)\MiKTeX
> 2.9\tex\generic\pstricks-add\pstricks-add.tex"
> ("C:\Users\Main
> User\AppData\Local\MiKTeX\2.9\tex\generic\pst-plot\pst-plot.tex
> " v1.10, 2010/02/11
>
> ! LaTeX Error: Missing \begin{document}.
>
> See the LaTeX manual or LaTeX Companion for explanation.
> Type H <return> for immediate help.
> ...
>
> l.1006 \psset{labelFontSize={},mathLabel=true}
It's an internal error. There isn't any
\psset{labelFontSize={},mathLabel=true}
in the Jon's code. Maybe you should get the next release of some
PSTricks components. Herbert? What do you think about that?
>
> On Thu, Dec 30, 2010 at 4:44 PM, Jon Joseph <josco.jon at gmail.com
> <mailto:josco.jon at gmail.com>> wrote:
>
> All: I have included a program which draws a "circular" arrow
> indicating a direction of rotation. This is meant to demonstrate
> the right hand rule with the vector pointing in the z direction (as
> shown). The picture looks great and was exactly what I was trying
> to do.
Ok. That's a good point!
> However, my method is not very generalizable and if I wanted
> to do it again I would need to recalculate some absolute coordinates
> (e.g. the position of the arrow).
Position of the arrow relative with what? In fact, I don't understand
your question.
> Does any one have a suggestion as
> to how this type of object can be compartmentalized within
> pst-solides3d? Thanks and happy new year. Jon
Totaly not sure since I don't understand what you want :
\documentclass{article}
\usepackage{pst-solides3d}
\newcommand\AmpereLaw[1][5mm]{%
\begingroup
\psset{unit=#1}
\psset{viewpoint=10 30 30 rtp2xyz, Decran=30}
\defFunction{mycylinder}(u,v){2 u Cos mul}{2 u Sin mul}{v}
\psSolid[object=surfaceparametree,
base=pi 2 div 9 pi mul 4 div 0 .25,
ngrid=30,
function=mycylinder,
grid,
incolor=red!20,
fillcolor=red,
% RotY=-10,
action=draw**]
\psSolid[object=face,
fillcolor=red,
incolor=blue,
biface,
base=0 0 .5 0 .25 .75,
linecolor=red,
RotY=90,
RotZ = 60,
action=draw**](2 sqrt, 2 sqrt, .375)
\psSolid[object=vecteur,
args=0 0 2,
linewidth=2pt,
linecolor=blue]
\psPoint(0,0,2.2){A}
\uput[0](A){\large $\vec{\omega}$}
\axesIIID(0,0,0)(3,3,3)
\endgroup
}
\begin{document}
\begin{pspicture}[showgrid=false](-2.5,-2.5)(2.5,2.5)
\AmpereLaw
\rput(-2,2){\AmpereLaw[1mm]}
\rput{45}(2,2){\AmpereLaw[1mm]}
\end{pspicture}
\end{document}
BTW, note that only \usepackage{pst-solides3d} is needed here: all the
other packages are useless. (for Per) However, with theses packages, all
compile very well for me.
Jean-Côme Charpentier
More information about the PSTricks
mailing list