[pstricks] Re : Re : PSTricks Digest, Vol 98, Issue 11

Manuel Luque mluque5130 at aol.com
Mon Mar 21 20:27:24 CET 2011


Another method: 3D vectors, using \ codejps :

\documentclass{article}
\usepackage{pst-solides3d}

\begin{document}
\begin{center}
\psset{lightsrc=viewpoint,viewpoint=50 -10 30 rtp2xyz,Decran=50}
\begin{pspicture}(-5,-4)(6,3)
\codejps{
/a 2 def
/b 1 def
%
/g {
3 dict begin
   /t exch def
   t Cos a mul %% 
   t Sin a mul %% 
   3 t mul Sin b mul %%
end
} def
%
/g' {
3 dict begin
   /t exch def
    t Sin a neg mul %% 
    t Cos a mul %% 
    3 t mul Cos 3 b mul mul %% 
end
} def
% vecteur unitaire de la tangente
/uTangente {g' unitaire3d} def
% tangente unitaire en un point définie par les angles
/Angles {
     ti uTangente /uTangenteZ exch def /uTangenteY exch def /uTangenteX exch def
    /Phi uTangenteZ arcsin def
    /Theta uTangenteY uTangenteX atan def
     } def
1 0 0 setrgbcolor
0 pi 1.8 mul {g} CourbeR3
% stop
%
1 setlinewidth
% la flèche
/Fleche {
0 0.1 0.25 [4 8] newcone
dup
{0 Phi 90 sub neg Theta rotateOpoint3d} solidtransform
 {ti g translatepoint3d} solidtransform
dup (rouge) outputcolors
drawsolid** } def
% les tracés
% point N°1
/ti 0.1 pi mul def
Angles
Fleche
% point N°2
/ti 1.0 pi mul def
Angles
Fleche
% point N°3
/ti 1.8 pi mul def
Angles
Fleche
}
\gridIIID[Zmin=-2,Zmax=2](-2,2)(-2,2)
\end{pspicture}
\end{center}

\end{document}

M.L.

 

 


 

 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20110321/37e6328d/attachment.html>


More information about the PSTricks mailing list