[pstricks] more 3d arrows

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sat Jan 1 12:03:07 CET 2011


Am 31.12.2010 17:52, schrieb Jon Joseph:

> 1)  When I place \AmpereLaw using \rput(0,0){\AmpereLaw{2mm}} as in the first example everything looks correct:

A happy new year.


(0,0) has no effect here, the reason why it _looks_ correct, but it isn't.


> 2) Now change the \rput to \rput(2,2){\AmpereLaw{2mm}}. I expect the entire drawing to move. However only the axes move?  Are the \psSolid commands overriding the \rput? 

put it into a pspicture environment. It must not be with
correct coordinates, because it is anyway placed
in another pspicture environemnt:

\documentclass{article}
\usepackage[dvipsnames]{pstricks}
\usepackage{pst-solides3d}

\newcommand{\AmpereLaw}[1]{%
 \begingroup
 	\psset{unit=#1}
	\psset{viewpoint=10 30 30 rtp2xyz, Decran=30}
    \pspicture(-8,-7)(12,12)
	\axesIIID(0,0,0)(3,3,3)
	\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,
		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}
    \endpspicture%
	% \uput[0](A){\psscalebox{1.5}{$\vec{\omega}$}}
 \endgroup%
}

\begin{document}

\psset{unit=8mm}
\begin{pspicture}[showgrid=true](-5,-5)(5,5)
	%\psset{viewpoint=10 30 30 rtp2xyz, Decran=30}
	%\AmpereLaw{2mm}
	\rput(2,2){\AmpereLaw{2mm}} %<--------------- ONLY CHANGE FROM EXAMPLE 1
	\qdisk(0,0){3pt}
	%\rput{90}(0,0){\AmpereLaw{2mm}}
	%\axesIIID(0,0,0)(3,3,3)
\end{pspicture}

\end{document}

Herbert


More information about the PSTricks mailing list