Changeset 90

Show
Ignore:
Timestamp:
07/13/08 12:43:17 (6 months ago)
Author:
jpv
Message:

Ajout d'une sécu sur le ngrid de courbe

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/doc/ex-lettres3d.tex

    r89 r90  
    311311       1.61729   0.00131387 
    312312       1.67329   0.00131387} 
    313  
    314313\def\baseS{1.78932   2.70534 
    315314       1.70532   2.70534 
     
    11011100\psSolid[object=prisme,h=1,hue=0 1,incolor=yellow,base=\baseG,ngrid=1,decal=-2,RotZ=90,RotX=90,unit=4](0,0,0) 
    11021101\end{pspicture} 
     1102% 
    11031103\begin{pspicture}(-6,-2)(6,6) 
    11041104\psframe(-6,-2)(6,6) 
  • trunk/doc/par-anneaux.tex

    r80 r90  
    7878\begin{pspicture}(-5,-4)(5,4) 
    7979\psframe(-5,-4)(5,4) 
    80 \psset[pst-solides3d]{SphericalCoor,viewpoint=50 20 40,Decran=25,lightsrc=10 20 20} 
     80\psset[pst-solides3d]{viewpoint=50 20 40 rtp2xyz,Decran=25,lightsrc=10 20 20} 
    8181\psSolid[object=anneau,fillcolor=cyan,h=3,R=8,r=6,ngrid=4,RotX=10](0,0,0) 
    8282\end{pspicture} 
     
    8484\begin{pspicture}(-5,-4)(5,4) 
    8585\psframe(-5,-4)(5,4) 
    86 \psset[pst-solides3d]{SphericalCoor,viewpoint=50 -20 -40,Decran=25,lightsrc=-10 -20 -20} 
     86\psset[pst-solides3d]{viewpoint=50 -20 -40 rtp2xyz,Decran=25,lightsrc=-10 -20 -20} 
    8787\psSolid[object=anneau,fillcolor=yellow,h=3,R=8,r=6,RotX=90,RotZ=10](0,0,0) 
    8888\end{pspicture} 
     
    9191%% \begin{pspicture}(-5,-6)(5,6) 
    9292%% \psframe(-5,-4)(5,4) 
    93 %% \psset[pst-solides3d]{SphericalCoor,viewpoint=50 20 40,% 
     93%% \psset[pst-solides3d]{viewpoint=50 20 40 rtp2xyz,% 
    9494%%                       Decran=25,lightsrc=10 20 20} 
    9595%% \psSolid[object=anneau,fillcolor=cyan,h=3,R=8,r=6,ngrid=4,RotX=10](0,0,0) 
     
    9898%% \begin{pspicture}(-5,-6)(5,5) 
    9999%% \psframe(-5,-4)(5,4) 
    100 %% \psset[pst-solides3d]{SphericalCoor,viewpoint=50 -20 -40,% 
     100%% \psset[pst-solides3d]{viewpoint=50 -20 -40 rtp2xyz,% 
    101101%%        Decran=25,lightsrc=-10 -20 -20} 
    102102%% \psSolid[object=anneau,fillcolor=yellow,h=3,R=8,r=6,RotX=90,RotZ=10](0,0,0) 
     
    196196\begin{pspicture}(-5,-6)(5,6) 
    197197\psframe(-5,-4)(5,4) 
    198 \psset[pst-solides3d]{SphericalCoor,viewpoint=50 20 40,Decran=25,lightsrc=10 20 20} 
     198\psset[pst-solides3d]{viewpoint=50 20 40 rtp2xyz,Decran=25,lightsrc=10 20 20} 
    199199\psSolid[object=anneau,section=\SectionTriangulaire,fillcolor=cyan,h=3,R=8,r=4,RotX=10]% 
    200200\end{pspicture} 
     
    202202\begin{pspicture}(-5,-6)(5,5) 
    203203\psframe(-5,-4)(5,4) 
    204 \psset[pst-solides3d]{SphericalCoor,viewpoint=50 -20 -40,Decran=25,lightsrc=-10 -20 -20} 
     204\psset[pst-solides3d]{viewpoint=50 -20 -40 rtp2xyz,Decran=25,lightsrc=-10 -20 -20} 
    205205\psSolid[object=anneau,section=\SectionTriangulaire,fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10]% 
    206206\end{pspicture} 
     
    209209%% \begin{pspicture}(-5,-6)(5,6) 
    210210%% \psframe(-5,-4)(5,4) 
    211 %% \psset[pst-solides3d]{SphericalCoor,viewpoint=50 20 40,% 
     211%% \psset[pst-solides3d]{viewpoint=50 20 40 rtp2xyz,% 
    212212%%                       Decran=25,lightsrc=10 20 20} 
    213213%% \psSolid[object=anneau,section=\SectionTriangulaire,% 
     
    217217%% \begin{pspicture}(-5,-6)(5,5) 
    218218%% \psframe(-5,-4)(5,4) 
    219 %% \psset[pst-solides3d]{SphericalCoor,viewpoint=50 -20 -40,% 
     219%% \psset[pst-solides3d]{viewpoint=50 -20 -40 rtp2xyz,% 
    220220%%                       Decran=25,lightsrc=-10 -20 -20} 
    221221%% \psSolid[object=anneau,section=\SectionTriangulaire,% 
     
    340340\begin{pspicture}(-5,-5)(5,4) 
    341341\psframe(-5,-4)(5,4) 
    342 \psset[pst-solides3d]{SphericalCoor,viewpoint=50 20 40,Decran=25,lightsrc=10 20 20} 
     342\psset[pst-solides3d]{viewpoint=50 20 40 rtp2xyz,Decran=25,lightsrc=10 20 20} 
    343343\psSolid[object=anneau,section=\SectionPneu,fillcolor=cyan,h=3,R=8,r=4,RotX=10]% 
    344344\end{pspicture} 
     
    346346\begin{pspicture}(-5,-5)(5,4) 
    347347\psframe(-5,-4)(5,4) 
    348 \psset[pst-solides3d]{SphericalCoor,viewpoint=50 -20 -40,Decran=25,lightsrc=-10 -20 -20} 
     348\psset[pst-solides3d]{viewpoint=50 -20 -40 rtp2xyz,Decran=25,lightsrc=-10 -20 -20} 
    349349\psSolid[object=anneau,section=\SectionPneu,fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10]% 
    350350\end{pspicture} 
  • trunk/doc/par-definirplanquelconque.tex

    r89 r90  
    88\textsl{Labels\/} du paragraphe \textsl{Points}). 
    99 
    10 \endinput 
    11 \section {Définir un plan quelconque de projection} 
    12  
    13 Pour définir un plan de projection, on suppose que le dessin à projeter 
    14 est sur le plan $Oxy$, et l'utilisateur doit préciser l'image de la 
    15 base $(O, \overrightarrow {\imath }, \overrightarrow {\jmath }, 
    16 \overrightarrow k)$. Afin d'alléger la syntaxe, le minimum demandé à 
    17 l'utilisateur est de préciser l'image de l'origine $O$ et l'image de 
    18 $\overrightarrow k$, autrement dit de préciser l'image de l'origine et 
    19 les coordonnées d'un vecteur normal au plan de projection. 
    20  
    21 Le package propose alors une orientation du plan de projection. Si 
    22 l'utilisateur n'est pas satisfait de cette orientation, il peut la 
    23 préciser. 
    24  
    25 Les paragraphes qui suivent détaillent la syntaxe proposée. 
    26  
    27 \subsection{L'origine} 
    28  
    29 \Cadre{(x,y,z)} sont les coordonnées de l'origine du plan, ce sont 
    30 soit des valeurs numériques, soit des expressions calculables par 
    31 l'interpréteur \texttt{postscript}. 
    32  
    33 \Cadre{$\backslash$psProjection[\ldots](1,2,3)} placera l'origine du 
    34 plan au point de coordonnées $(1,2,3)$. 
    35  
    36  
    37 \Cadre{$\backslash$psProjection[\ldots](0.5 0.5 add,2 sqrt,1.5 2 exp)} 
    38 placera l'origine du plan au point de coordonnées 
    39 $(1,\sqrt{2},1.5^2)$. 
    40  
    41 S'il n'y a rien, pas de coordonnées à la fin de la commande, celle-ci 
    42 l'interprète comme $(0,0,0)$ et place donc l'origine en O. 
    43  
    44 \subsection{Définir la normale au plan} 
    45  
    46 Il y a deux façons de définir la normale au plan et la possibilité de 
    47 faire tourner le repère du plan d'un angle donné autour de cette 
    48 normale suivant la façon dont on écrit l'argument de l'option : 
    49 \texttt{|normal=...]} 
    50  
    51 \subsubsection{Méthode 1 : donner les coordonnées du vecteur normal} 
    52  
    53 Dans ce cas l'argument de \Cadre{[normal=nx ny nz]} comprend trois 
    54 valeurs : les coordonnées du vecteur normal, par exemple ici 
    55 \texttt{[normal=0 0 1]} pour le plan $Oxy$. 
    56  
    57 \vfill 
    58  
    59 \begin{minipage}{6cm} 
    60 \psset{unit=0.5} 
    61 \begin{pspicture}(-9,-6.5)(6,6) 
    62 \psframe*[linecolor=blue!50](-6,-6)(6,6) 
    63 \psset{lightsrc=10 -20 50,viewpoint=50 20 30 rtp2xyz,Decran=50} 
    64 {\psset{linewidth=0.5\pslinewidth,linecolor=gray} 
    65 \psSolid[object=grille,base=-4 4 -4 4]} 
    66 \defFunction[algebraic]{f1}(x){3*cos(x)}{3*sin(x)}{} 
    67 \psProjection[object=courbeR2, 
    68    range=-3.14 3.14, 
    69    linecolor=blue, 
    70    normal=0 0 1 , 
    71    function=f1] 
    72 \axesIIID(0,0,0)(4,4,4) 
    73 \psProjection[object=chemin, 
    74       linewidth=.1, 
    75       linecolor=red, 
    76       normal=1 0 0, 
    77       path= 
    78          newpath 
    79             0 0 smoveto 
    80             -1 0 slineto] 
    81 %\psProjection[object=chemin, 
    82 %      linewidth=.1, 
    83 %      linecolor=blue, 
    84 %      normal=1 0 0, 
    85 %      path= 
    86 %         newpath 
    87 %            0 0 moveto 
    88 %            0 1 lineto] 
    89 \rput(0,-6.75){ 
    90    \psframebox[linecolor=blue!50] 
    91    {\texttt{$\backslash${}defFunction[algebraic]% 
    92     \{f\}(x)\{3*cos(x)\}\{3*sin(x)\}\{\}}}} 
    93 \end{pspicture} 
    94 \end{minipage} 
    95 \hfill 
    96 \begin{minipage}{8cm} 
    97 %%\begin{boxedverbatim} 
    98 \begin{verbatim} 
    99 \psSolid[object=grille,base=-4 4 -4 4] 
    100 \psProjection[object=courbeR2, 
    101                     range=-3.14 3.14, 
    102                     linecolor=blue, 
    103                     normal=0 0 1, 
    104                     function=f] 
    105 \end{verbatim} 
    106 %%\end{boxedverbatim} 
    107 \end{minipage} 
    108 \vfill 
    109 Si on appelle 
    110 $\big(\overrightarrow{i}(1,0,0),\overrightarrow{j}(0,1,0),\overrightarrow{k}(0,0,1)\big)$ 
    111 les vecteurs du repère de référence et par 
    112 $\big(\overrightarrow{I},\overrightarrow{J},\overrightarrow{K}\big)$ 
    113 ceux du repère lié au plan à définir, les relations suivantes sont 
    114 vérifiées, en rappelant que $\overrightarrow{K}$ est le vecteur normal 
    115 choisi : 
    116 \begin{enumerate} 
    117   \item $\overrightarrow{J}=\overrightarrow{K}\wedge \overrightarrow{i}$ 
    118   \item $\overrightarrow{I}=\overrightarrow{J}\wedge \overrightarrow{K}$ 
    119 \end{enumerate} 
    120 Si $\overrightarrow{K}=\overrightarrow{i}$ on prend $\overrightarrow{J}=\overrightarrow{j}$ 
    121  
    122  En prenant comme convention que $\overrightarrow{K}$ sera dessiné en 
    123  rouge, $\overrightarrow{J}$ en bleu et $\overrightarrow{I}$ en vert, 
    124  illustrons par des exemples ces relations. 
    125  
    126 \vfill 
    127 \begin{minipage}{0.27\linewidth} 
    128 \psset{unit=0.4} 
    129 \psframebox{\centerline{\texttt{[normal=0 0 1]}}} 
    130  
    131 \begin{pspicture}(-6,-6)(4,7)% 
    132 \psframe*[linecolor=blue!50](-6,-6)(6,6) 
    133 \psset{lightsrc=10 -20 50,viewpoint=50 20 30 rtp2xyz,Decran=60} 
    134 {\psset{linewidth=0.5\pslinewidth,linecolor=gray} 
    135 \psSolid[object=grille,base=-4 4 -4 4]} 
    136 \axesIIID(0,0,0)(4,4,4) 
    137 \psProjection[object=chemin, 
    138       linewidth=.2, 
    139       linecolor=red, 
    140       normal=1 0 0, 
    141       path= 
    142          newpath 
    143             0 0 smoveto 
    144             -1 0 slineto] 
    145 \psProjection[object=chemin, 
    146       linewidth=.2, 
    147       linecolor=blue, 
    148       normal=0 0 1, 
    149       path= 
    150          newpath 
    151             0 0 smoveto 
    152             0 1 slineto] 
    153 \psProjection[object=chemin, 
    154       linewidth=.2, 
    155       linecolor=green, 
    156       normal=0 0 1, 
    157       path= 
    158          newpath 
    159             0 0 smoveto 
    160             1 0 slineto] 
    161 \end{pspicture} 
    162 \end{minipage} 
    163 \hfill 
    164 \begin{minipage}{0.27\linewidth} 
    165 \psset{unit=0.4} 
    166 \psframebox{\centerline{\texttt{[normal=1 0 0]}}} 
    167  
    168 \begin{pspicture}(-6,-6)(4,7) 
    169 \psframe*[linecolor=blue!50](-6,-6)(6,6) 
    170 \psset{lightsrc=50 20 30,viewpoint=50 20 30,Decran=70} 
    171 {\psset{linewidth=0.5\pslinewidth,linecolor=gray} 
    172 \psSolid[object=grille,base=-4 4 -4 4,RotY=90]} 
    173 \axesIIID(0,0,0)(4,4,4) 
    174 \psProjection[object=chemin, 
    175       linewidth=.2, 
    176       linecolor=green, 
    177       normal=1 0 0, 
    178       path= 
    179          newpath 
    180             0 0 smoveto 
    181             1 0 slineto] 
    182 \psProjection[object=chemin, 
    183       linewidth=.2, 
    184       linecolor=blue, 
    185       normal=1 0 0, 
    186       path= 
    187          newpath 
    188             0 0 smoveto 
    189             0 1 slineto] 
    190 \psProjection[object=chemin, 
    191       linewidth=.2, 
    192       linecolor=red, 
    193       normal=0 0 1, 
    194       path= 
    195          newpath 
    196             0 0 smoveto 
    197             1 0 slineto] 
    198 \end{pspicture} 
    199 \end{minipage} 
    200 \hfill 
    201 \begin{minipage}{0.27\linewidth} 
    202 \psset{unit=0.4} 
    203  
    204 \psframebox{\centerline{\texttt{[normal=0 1 0]}}} 
    205  
    206 \begin{pspicture}(-6,-6)(4,7) 
    207 \psframe*[linecolor=blue!50](-6,-6)(6,6) 
    208 \psset{lightsrc=50 60 30,viewpoint=50 60 30,Decran=70} 
    209 {\psset{linewidth=0.5\pslinewidth,linecolor=gray} 
    210 \psSolid[object=grille,base=-4 4 -4 4,RotX=-90]} 
    211 \axesIIID(0,0,0)(4,4,4) 
    212 \psProjection[object=chemin, 
    213       linewidth=.2, 
    214       linecolor=green, 
    215       normal=0 1 0, 
    216       path= 
    217          newpath 
    218             0 0 smoveto 
    219             1 0 slineto] 
    220 \psProjection[object=chemin, 
    221       linewidth=.2, 
    222       linecolor=blue, 
    223       normal=0 1 0, 
    224       path= 
    225          newpath 
    226             0 0 smoveto 
    227             0 1 slineto] 
    228 \psProjection[object=chemin, 
    229       linewidth=.2, 
    230       linecolor=red, 
    231       normal=0 0 1, 
    232       path= 
    233          newpath 
    234             0 0 smoveto 
    235             0 1 slineto] 
    236 \end{pspicture} 
    237 \end{minipage} 
    238  
    239 \vfill 
    240  
    241 \begin{minipage}{0.27\linewidth} 
    242 \psset{unit=0.4} 
    243 \psframebox{\centerline{\texttt{[normal=1 0 1]}}} 
    244  
    245 \begin{pspicture}(-6,-6)(4,7)% 
    246 \psframe*[linecolor=blue!50](-6,-6)(6,6) 
    247 \psset{lightsrc=50 20 20,viewpoint=50 20 20,Decran=70} 
    248 {\psset{linewidth=0.5\pslinewidth,linecolor=gray} 
    249 \psSolid[object=grille,base=-4 4 -4 4] 
    250 \psSolid[object=grille,base=-4 0 -4 4,RotY=90] 
    251 \psSolid[object=grille,base=-2 2 -4 4,RotY=45,linecolor=red](1.414,0,1.414)} 
    252 \psPoint(2,0,2){O1}%\psdot(O1) 
    253 \axesIIID(2.8,3,2.8)(4,4,4) 
    254 \psPoint(1.414,0,1.414){O1}\psPoint(2.414,0,2.414){OK} 
    255 \psline[linewidth=.2,linecolor=red](O1)(OK) 
    256 \psProjection[object=chemin, 
    257       linewidth=.2, 
    258       linecolor=blue, 
    259       normal=1 0 1, 
    260       path= 
    261          newpath 
    262             0 0 smoveto 
    263             0 1 slineto](1.414,0,1.414) 
    264 \psProjection[object=chemin, 
    265       linewidth=.2, 
    266       linecolor=green, 
    267       normal=1 0 1, 
    268       path= 
    269          newpath 
    270             0 0 smoveto 
    271             1 0 slineto](1.414,0,1.414) 
    272 \end{pspicture} 
    273 \end{minipage} 
    274 \hfill 
    275 \begin{minipage}{0.27\linewidth} 
    276 \psset{unit=0.4} 
    277 \psframebox{\centerline{\texttt{[normal=0 1 1]}}} 
    278  
    279 \begin{pspicture}(-6,-6)(4,7)% 
    280 \psframe*[linecolor=blue!50](-6,-6)(6,6) 
    281 \psset{lightsrc=30 20 20,viewpoint=30 20 20,Decran=45} 
    282 {\psset{linewidth=0.5\pslinewidth,linecolor=gray} 
    283 \psSolid[object=grille,base=-4 4 -4 4] 
    284 \psSolid[object=grille,base=-4 0 -4 4,RotY=90,RotZ=90] 
    285 \psSolid[object=grille,base=-4 4 -2 2,RotX=-45,linecolor=red](0,1.414,1.414)} 
    286 \axesIIID(2.8,3,2.8)(4,4,4) 
    287 \psPoint(0,1.414,1.414){O1}\psPoint(0,2.414,2.414){OK} 
    288 \psline[linewidth=.2,linecolor=red](O1)(OK) 
    289 \psProjection[object=chemin, 
    290       linewidth=.2, 
    291       linecolor=blue, 
    292       normal=0 1 1, 
    293       path= 
    294          newpath 
    295             0 0 smoveto 
    296             0 1 slineto](0,1.414,1.414) 
    297 \psProjection[object=chemin, 
    298       linewidth=.2, 
    299       linecolor=green, 
    300       normal=0 1 1, 
    301       path= 
    302          newpath 
    303             0 0 smoveto 
    304             1 0 slineto](0,1.414,1.414) 
    305 \end{pspicture} 
    306 \end{minipage} 
    307 \hfill 
    308 \begin{minipage}{0.27\linewidth} 
    309 \psset{unit=0.4} 
    310 \psframebox{\centerline{\texttt{[normal=1 1 0]}}} 
    311  
    312 \begin{pspicture}(-6,-6)(4,7)% 
    313 \psframe*[linecolor=blue!50](-6,-6)(6,6) 
    314 \psset{lightsrc=30 20 20,viewpoint=30 20 20,Decran=45} 
    315 {\psset{linewidth=0.5\pslinewidth,linecolor=gray} 
    316 \psSolid[object=grille,base=0 2 -4 4,RotY=90,RotZ=45,linecolor=red] 
    317         (1.414,1.414,0) 
    318 \psSolid[object=grille,base=-4 4 -4 4] 
    319 \psSolid[object=grille,base= -2 0 -4 4,RotY=90,RotZ=45,linecolor=red] 
    320         (1.414,1.414,0)} 
    321 \axesIIID(2.8,2.8,1)(4,4,4) 
    322 \psPoint(1.414,1.414,0){O1}\psPoint(2.414,2.414,0){OK} 
    323 \psline[linewidth=.2,linecolor=red](O1)(OK) 
    324 \psProjection[object=chemin, 
    325       linewidth=.2, 
    326       linecolor=blue, 
    327       normal=1 1 0, 
    328       path= 
    329          newpath 
    330             0 0 smoveto 
    331             0 1 slineto](1.414,1.414,0) 
    332 \psProjection[object=chemin, 
    333       linewidth=.2, 
    334       linecolor=green, 
    335       normal=1 1 0, 
    336       path= 
    337          newpath 
    338             0 0 smoveto 
    339             1 0 slineto](1.414,1.414,0) 
    340 \end{pspicture} 
    341 \end{minipage} 
    342  
    343 \vfill 
    344  
    345 \newpage 
    346  
    347 \subsubsection{Méthode 2 : donner les coordonnées du vecteur normal et  
    348   l'angle de rotation} 
    349  
    350 Dans ce cas l'argument de \texttt{[normal=nx ny nz A]} comprend 
    351 quatre valeurs : les coordonnées du vecteur normal et l'angle de 
    352 rotation en degrés autour de cet axe. 
    353  
    354 \begin{center} 
    355 \begin{minipage}{0.34\linewidth} 
    356 \psset{unit=0.5} 
    357 \psframebox{\centerline{\texttt{[normal=1 0 1]}}} 
    358  
    359 \begin{pspicture}(-6,-6)(6,7)% 
    360 \psframe*[linecolor=blue!50](-6,-6)(6,6) 
    361 \psset{lightsrc=50 20 20,viewpoint=50 20 20,Decran=70} 
    362 {\psset{linewidth=0.5\pslinewidth,linecolor=gray} 
    363 \psSolid[object=grille,base=-4 4 -4 4] 
    364 \psSolid[object=grille,base=-4 0 -4 4,RotY=90] 
    365 \psSolid[object=grille,base=-2 2 -4 4,RotY=45,linecolor=red](1.414,0,1.414)} 
    366 \psPoint(2,0,2){O1}%\psdot(O1) 
    367 \axesIIID(2.8,3,2.8)(4,4,4) 
    368 \psPoint(1.414,0,1.414){O1}\psPoint(2.414,0,2.414){OK} 
    369 \psline[linewidth=.2,linecolor=red](O1)(OK) 
    370 \psProjection[object=chemin, 
    371       linewidth=.2, 
    372       linecolor=blue, 
    373       normal=1 0 1, 
    374       path= 
    375          newpath 
    376             0 0 smoveto 
    377             0 1 slineto](1.414,0,1.414) 
    378 \psProjection[object=chemin, 
    379       linewidth=.2, 
    380       linecolor=green, 
    381       normal=1 0 1, 
    382       path= 
    383          newpath 
    384             0 0 smoveto 
    385             1 0 slineto](1.414,0,1.414) 
    386 \defFunction[algebraic]{fonction}(x){cos(x)}{x}{} 
    387 \psProjection[object=courbeR2, 
    388    range=-4 4, 
    389    normal=1 0 1, 
    390    function=fonction](1.414,0,1.414) 
    391 \end{pspicture} 
    392 \end{minipage} 
    393 \hfil 
    394 \begin{minipage}{0.34\linewidth} 
    395 \psset{unit=0.5} 
    396 \psframebox{\centerline{\texttt{[normal=1 0 1 45]}}} 
    397  
    398 \begin{pspicture}(-6,-6)(6,7)% 
    399 \psframe*[linecolor=blue!50](-6,-6)(6,6) 
    400 \psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70} 
    401 {\psset{linewidth=0.5\pslinewidth,linecolor=gray} 
    402 \psSolid[object=grille,base=-4 4 -4 4,action=draw] 
    403 \psSolid[object=grille,base=-4 4 -4 4,RotY=90,action=draw]} 
    404 \axesIIID(0,0,0)(4,4,4) 
    405 \psPoint(1.414,0,1.414){O1}\psPoint(2.414,0,2.414){OK} 
    406 \psline[linewidth=.2,linecolor=red](O1)(OK) 
    407 \psProjection[object=chemin, 
    408       linewidth=.02, 
    409       linecolor=red, 
    410       normal=1 0 1 45, 
    411       path=newpath 
    412           -2 1 2 
    413           {-4 smoveto 
    414            0 8 srlineto} for 
    415            -4 1 4 
    416           {-2 exch smoveto 
    417            4 0 srlineto} for 
    418             ](1.414,0,1.414) 
    419 \psProjection[object=chemin, 
    420       linewidth=.2, 
    421       linecolor=blue, 
    422       normal=1 0 1 45, 
    423       path= 
    424          newpath 
    425             0 0 smoveto 
    426             0 1 slineto](1.414,0,1.414) 
    427 \psProjection[object=chemin, 
    428       linewidth=.2, 
    429       linecolor=green, 
    430       normal=1 0 1 45, 
    431       path= 
    432          newpath 
    433             0 0 smoveto 
    434             1 0 slineto](1.414,0,1.414) 
    435 \defFunction[algebraic]{fonction}(x){cos(x)}{x}{} 
    436 \psProjection[object=courbeR2, 
    437    range=-4 4, 
    438    normal=1 0 1 45 , 
    439    function=fonction](1.414,0,1.414) 
    440 \end{pspicture} 
    441 \end{minipage} 
    442 \end{center} 
    443  
    444 %\newpage 
    445 Dans la deuxième figure la normale (représentée en rouge) est 
    446 identique à la première figure, mais le plan a tourné d'un angle égal 
    447 à 45 degrés autour de cette normale. 
    448  
    449 \subsubsection{Méthode 3 : définir la normale par les images de \textit{i}  
    450  et \textit{k}} 
    451  
    452 Dans ce cas l'argument de \texttt{[normal=ix iy iz kx ky kz]} 
    453 comprend six valeurs : les coordonnées des images de 
    454 $\overrightarrow{i}$ et $\overrightarrow{k}$, avec : 
    455 $\overrightarrow{J}=\overrightarrow{K}\wedge \overrightarrow{I}$. 
    456  
    457 \begin{center} 
    458 \begin{minipage}{0.34\linewidth} 
    459 \psset{unit=0.5} 
    460 \psframebox{\centerline{\texttt{[normal=0 1 0 1 0 0]}}} 
    461  
    462 \begin{pspicture}(-6,-6)(6,7)% 
    463 \psframe*[linecolor=blue!50](-6,-6)(6,6) 
    464 \psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70} 
    465 {\psset{linewidth=0.5\pslinewidth,linecolor=gray} 
    466 \psSolid[object=grille,base=-4 4 -4 4]% 
    467 \psSolid[object=grille,base=-4 4 -4 4,action=draw,RotX=90,RotZ=90]}% 
    468 \defFunction[algebraic]{fonction}(x){x}{x*sin(x)}{} 
    469 \axesIIID(0,0,0)(4,4,4) 
    470 \psProjection[object=chemin, 
    471       linewidth=.1, 
    472       linecolor=green, 
    473       normal=0 1 0 1 0 0, 
    474       path= 
    475          newpath 
    476             0 0 smoveto 
    477             1 0 slineto] 
    478 \psProjection[object=chemin, 
    479       linewidth=.1, 
    480       linecolor=blue, 
    481       normal=0 1 0 1 0 0, 
    482       path= 
    483          newpath 
    484             0 0 smoveto 
    485             0 1 slineto] 
    486 \psProjection[object=chemin, 
    487       linewidth=.2, 
    488       linecolor=red, 
    489       normal=0 0 1, 
    490       path= 
    491          newpath 
    492             0 0 smoveto 
    493             1 0 slineto] 
    494 \psProjection[object=courbeR2, 
    495    range=-4 4, 
    496    linecolor=green, 
    497    normal=0 1 0 1 0 0, 
    498    function=fonction] 
    499 \end{pspicture} 
    500 \end{minipage} 
    501 \hfil 
    502 \begin{minipage}{0.34\linewidth} 
    503 \psset{unit=0.5} 
    504 \psframebox{\centerline{\texttt{[normal=-1 1 0 1 1 2 ]}}} 
    505  
    506 \begin{pspicture}(-6,-6)(6,7)% 
    507 \psframe*[linecolor=blue!50](-6,-6)(6,6) 
    508 \psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70} 
    509 {\psset{linewidth=0.5\pslinewidth,linecolor=gray} 
    510 \psSolid[object=grille,base=-4 4 -4 4]}% 
    511 \defFunction[algebraic]{fonction}(x){x}{x*sin(x)}{} 
    512 \axesIIID(0,0,0)(4,4,4) 
    513 \psProjection[object=chemin, 
    514       linewidth=.1, 
    515       linecolor=green, 
    516       normal=-1 1 0 1 1 2 , 
    517       path= 
    518          newpath 
    519             0 0 smoveto 
    520             1 0 slineto] 
    521 \psProjection[object=chemin, 
    522       linewidth=.1, 
    523       linecolor=blue, 
    524       normal=-1 1 0 1 1 2 , 
    525       path= 
    526          newpath 
    527             0 0 smoveto 
    528             0 1 slineto] 
    529 \psPoint(0,0,0){O}\psPoint(0.4,0.4,0.8){K} 
    530 \psline[linewidth=.1,linecolor=red](O)(K) 
    531 \psProjection[object=courbeR2, 
    532    range=-4 4, 
    533    linecolor={[cmyk]{1,0,1,0.5}}, 
    534    normal=-1 1 0 1 1 2 , 
    535    function=fonction] 
    536 \psProjection[object=chemin, 
    537       linewidth=.02, 
    538       linecolor=red, 
    539       normal=-1 1 0 1 1 2, 
    540       path=newpath 
    541           -4 1 4 
    542           {-4 exch smoveto 
    543            8 0 srlineto} for 
    544            -4 1 4 
    545           {-4 smoveto 
    546            0 8 srlineto} for 
    547             ] 
    548 \end{pspicture} 
    549 \end{minipage} 
    550 \end{center} 
    551  
    552  
    553 \newpage 
    554 \subsubsection{Méthode 4 : définir la normale par les images de 
    555   \textit{i}, de \textit{k} et un angle de rotation} 
    556  
    557 Dans ce cas l'argument de \texttt{[normal=ix iy iz kx ky kz phi]} 
    558 comprend sept valeurs : les coordonnées des images de 
    559 $\overrightarrow{i}$, de $\overrightarrow{k}$ et l'angle de rotaion en 
    560 degrés autour de la normale, avec : 
    561 $\overrightarrow{J}=\overrightarrow{K}\wedge \overrightarrow{I}$. 
    562  
    563 \begin{center} 
    564 \begin{minipage}{0.34\linewidth} 
    565 \psset{unit=0.5} 
    566 \psframebox{\centerline{\texttt{[normal=0 1 0 1 0 0 90]}}} 
    567  
    568 \begin{pspicture}(-6,-6)(6,7)% 
    569 \psframe*[linecolor=blue!50](-6,-6)(6,6) 
    570 \psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70} 
    571 {\psset{linewidth=0.5\pslinewidth,linecolor=gray} 
    572 \psSolid[object=grille,base=-4 4 -4 4]% 
    573 \psSolid[object=grille,base=-4 4 -4 4,action=draw,RotX=90,RotZ=90]}% 
    574 \defFunction[algebraic]{fonction}(x){x}{x*sin(x)}{} 
    575 \axesIIID(0,0,0)(4,4,4) 
    576 \psProjection[object=chemin, 
    577       linewidth=.1, 
    578       linecolor=green, 
    579       normal=0 1 0 1 0 0 90, 
    580       path= 
    581             0 0 smoveto 
    582             1 0 slineto] 
    583 \psProjection[object=chemin, 
    584       linewidth=.1, 
    585       linecolor=blue, 
    586       normal=0 1 0 1 0 0 90, 
    587       path= 
    588             0 0 smoveto 
    589             0 1 slineto] 
    590 \psProjection[object=chemin, 
    591       linewidth=.2, 
    592       linecolor=red, 
    593       normal=0 0 1, 
    594       path= 
    595             0 0 smoveto 
    596             1 0 slineto] 
    597 \psProjection[object=courbeR2, 
    598    range=-4 4, 
    599    linecolor=green, 
    600    normal=0 1 0 1 0 0 90, 
    601    function=fonction] 
    602 \end{pspicture} 
    603 \end{minipage} 
    604 \hfil 
    605 \begin{minipage}{0.34\linewidth} 
    606 \psset{unit=0.5} 
    607 \psframebox{\centerline{\texttt{[normal=-1 1 0 1 1 2 90]}}} 
    608  
    609 \begin{pspicture}(-6,-6)(6,7)% 
    610 \psframe*[linecolor=blue!50](-6,-6)(6,6) 
    611 \psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70} 
    612 {\psset{linewidth=0.5\pslinewidth,linecolor=gray} 
    613 \psSolid[object=grille,base=-4 4 -4 4]}% 
    614 \defFunction[algebraic]{fonction}(x){x}{x*sin(x)}{} 
    615 \axesIIID(0,0,0)(4,4,4) 
    616 \psProjection[object=chemin, 
    617       linewidth=.1, 
    618       linecolor=green, 
    619       normal=-1 1 0 1 1 2 90, 
    620       path= 
    621          newpath 
    622             0 0 smoveto 
    623             1 0 slineto] 
    624 \psProjection[object=chemin, 
    625       linewidth=.1, 
    626       linecolor=blue, 
    627       normal=-1 1 0 1 1 2 90, 
    628       path= 
    629          newpath 
    630             0 0 smoveto 
    631             0 1 slineto] 
    632 \psPoint(0,0,0){O}\psPoint(0.4,0.4,0.8){K} 
    633 \psline[linewidth=.1,linecolor=red](O)(K) 
    634 \psProjection[object=courbeR2, 
    635    range=-4 4, 
    636    linecolor={[cmyk]{1,0,1,0.5}}, 
    637    normal=-1 1 0 1 1 2 90, 
    638    function=fonction] 
    639 \psProjection[object=chemin, 
    640       linewidth=.02, 
    641       linecolor=red, 
    642       normal=-1 1 0 1 1 2, 
    643       path=newpath 
    644           -4 1 4 
    645           {-4 exch smoveto 
    646            8 0 srlineto} for 
    647            -4 1 4 
    648           {-4 smoveto 
    649            0 8 srlineto} for 
    650             ] 
    651 \end{pspicture} 
    652 \end{minipage} 
    653 \end{center} 
    654  
  • trunk/doc/par-tube.tex

    r89 r90  
    1 %% \documentclass{article} 
    2 %% \usepackage{pst-solides3d} 
    3 %% \usepackage[latin1]{inputenc} 
    4 %% \usepackage[T1]{fontenc} 
    5 %% \usepackage[garamond]{mathdesign} 
    6 %% \renewcommand{\ttdefault}{lmtt} 
    7 %% \usepackage[colorlinks=true]{hyperref} 
    8 %% \usepackage[a4paper]{geometry} 
    9 %% \usepackage{showexpl} 
    10 %% \usepackage[french]{babel} 
    11 %% \newcommand\Cadre[1]{\psframebox[fillstyle=solid,fillcolor=yellow,linecolor={[cmyk]{0,0,1,0.1}}]{\texttt{#1}}} 
    12 %% \newcommand\encadre[1]{\begin{center} 
    13 %% \psframebox[fillstyle=solid,fillcolor=green!33,linecolor=green,linewidth=0.5mm]{ 
    14 %%   \begin{minipage}{0.95\textwidth} 
    15 %%   {#1} 
    16 %%   \end{minipage}} 
    17 %%   \end{center}} 
    18 %% 
    19 %% \title{\texttt{pst-solides3d} :\\ 
    20 %%        les tubes} 
    21 %% \date{\today } 
    22 %% \begin{document} 
    23 %% \maketitle 
    24 %% \tableofcontents 
    25 %% \newpage 
    26  
    271\section{Tubes} 
    282 
     
    4014possibilités pour dessiner les tubes : 
    4115\begin{itemize} 
    42   \item via \texttt{`PSTricks'} et l'argument \verb+object+ de \verb+\psSolid+ 
     16  \item via \texttt{`PSTricks'} et l'argument \verb+object+ de 
     17    \verb+\psSolid+  
    4318  \item directement avec \verb+\codejps+ 
    4419\end{itemize} 
     
    8863 
    8964On peut également préciser le maillage avec l'argument optionnel 
    90 \Cadre{[ngrid=$n_1$ $n_2$]} où $n_1$ représente le nombre de sommets 
    91 sur une section du cube (si $n_1 = 6$, on a un tube à section 
    92 hexagonale) et $n_2$ représente le nombre de divisions sur la longueur. 
     65\Cadre{[ngrid=$n_1$ $n_2$]} où $n_2$ représente le nombre de sommets 
     66sur une section du tube (si $n_2 = 6$, on a un tube à section 
     67hexagonale) et $n_1$ représente le nombre de divisions sur la longueur. 
    9368 
    9469 
  • trunk/solides.pro

    r89 r90  
    11%! 
    22% PostScript prologue for pst-solides3d.tex. 
    3 % Version 4.03, 2008/07/12 
     3% Version 4.04, 2008/07/13 
    44% 
    55%% COPYRIGHT 2008 by Jean-Paul Vignault 
     
    1055310553      gere_pstricks_opt 
    1055410554   } { 
    10555       range aload pop function r ngrid newtube 
     10555      range aload pop function r 
     10556      ngrid length 2 lt { 
     10557         [300 4] 
     10558      } { 
     10559         ngrid 
     10560      } ifelse 
     10561      newtube 
    1055610562      gere_pstricks_opt %% r function [36 12] newtube 
    1055710563   } ifelse