[pstricks] 3d arrows
Jon Joseph
josco.jon at gmail.com
Fri Dec 31 16:20:21 CET 2010
On Dec 31, 2010, at 5:00 AM, pstricks-request at tug.org wrote:
> Send PSTricks mailing list submissions to
> pstricks at tug.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://tug.org/mailman/listinfo/pstricks
> or, via email, send a message with subject or body 'help' to
> pstricks-request at tug.org
>
> You can reach the person managing the list at
> pstricks-owner at tug.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of PSTricks digest..."
>
>
> Today's Topics:
>
> 1. 3d "arrows" (Jon Joseph)
> 2. Re: 3d "arrows" (Per Ting)
> 3. Re: 3d "arrows" (Jean-C?me Charpentier)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 30 Dec 2010 15:44:49 -0600
> From: Jon Joseph <josco.jon at gmail.com>
> To: pstricks at tug.org
> Subject: [pstricks] 3d "arrows"
> Message-ID: <C7CCCAE0-F6C0-47FF-9556-F7C57182E51D at gmail.com>
> Content-Type: text/plain; charset=us-ascii
>
> 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. 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). 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
>
>
>
> \documentclass{article}
> \usepackage[dvipsnames]{pstricks}
> \usepackage{pst-solides3d}
> \usepackage{pstricks-add}
> \usepackage{amssymb, amsmath}
>
>
> \begin{document}
>
>
> \psset{unit=5mm}
> \begin{pspicture}[showgrid=false](-5,-5)(5,5)
> \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)
> \end{pspicture}
>
> \end{document}
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 30 Dec 2010 17:02:50 -0500
> From: Per Ting <perting at gmail.com>
> To: Graphics with PSTricks <pstricks at tug.org>
> Subject: Re: [pstricks] 3d "arrows"
> Message-ID:
> <AANLkTik4kTH7RGkOJ9NXxqCp3XHHv5ZbtEfndconkxAr at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> 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}
>
> ?
>
> but when I comment out \usepackage{pstricks-add}, it works fine. Any idea
> what is going wrong?
>
> Thanks,
>
> Per
The option labelFontSize is a fairly recent addition to pstricks-add. My guess is that your pstricks-add is a little older.
Yes, my question was a bit vague. What I'm after was command similar to the \psline (or better the \psarc) command in pstricks or the vecteur command from pst-solides3d. Specify the radius, direction, start angle, stop angle. You encapsulation gives me some more ideas which is really all I was looking for. Thanks, Jon.
>
> On Thu, Dec 30, 2010 at 4:44 PM, Jon Joseph <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. 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). 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
>>
>>
>>
>> \documentclass{article}
>> \usepackage[dvipsnames]{pstricks}
>> \usepackage{pst-solides3d}
>> \usepackage{pstricks-add}
>> \usepackage{amssymb, amsmath}
>>
>>
>> \begin{document}
>>
>>
>> \psset{unit=5mm}
>> \begin{pspicture}[showgrid=false](-5,-5)(5,5)
>> \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)
>> \end{pspicture}
>>
>> \end{document}
>> _______________________________________________
>> PSTricks mailing list
>> PSTricks at tug.org
>> http://tug.org/mailman/listinfo/pstricks
>> archive: http://www.tug.org/pipermail/pstricks/
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://tug.org/pipermail/pstricks/attachments/20101230/789c534f/attachment-0001.html>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 31 Dec 2010 11:54:25 +0100
> From: Jean-C?me Charpentier <jean-come.charpentier at wanadoo.fr>
> To: pstricks at tug.org
> Subject: Re: [pstricks] 3d "arrows"
> Message-ID: <4D1DB661.6080906 at wanadoo.fr>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> 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
>
>
> ------------------------------
>
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>
>
> End of PSTricks Digest, Vol 95, Issue 16
> ****************************************
More information about the PSTricks
mailing list