Changeset 111
- Timestamp:
- 08/12/08 12:44:21 (4 months ago)
- Files:
-
- trunk/doc-en/Makefile (modified) (1 diff)
- trunk/doc-en/par-transform_en_corr.tex (modified) (5 diffs)
- trunk/doc-en/pst-solides3d-doc-EN.tex (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/doc-en/Makefile
r109 r111 39 39 clean : 40 40 $(RM) $(addprefix $(MAIN), .log .aux .bbl .blg .glg .glo .gls .ilg .idx .ind .tmp .toc .out ) 41 $(RM) $(addprefix $(MAIN), .dvi .ps )41 $(RM) $(addprefix $(MAIN), .dvi .ps .brf) 42 42 43 43 veryclean : clean trunk/doc-en/par-transform_en_corr.tex
r109 r111 1 1 \section{The option \texttt{transform}} 2 2 3 The option \verb+transform=...+, which is nothing else than a formula 4 $\mathbb{R}^3 \rightarrow \mathbb{R}^3$, 5 which is applied to every point of the solid. In the first example, the 6 object that accepts the transformation is a cube. 7 The referenced cube is yellow, the transformed cube is green and the 8 cube before the transformation is setup with a reticule. 3 The option \verb+transform=...+, which is nothing else than a formula $\mathbb{R}^3 \rightarrow \mathbb{R}^3$, 4 which is applied to every point of the solid. In the first example, the object that accepts the transformation is a cube. 5 The referenced cube is yellow, the transformed cube is green and the cube before the transformation is setup with a reticule. 9 6 10 7 \subsection{Identical scaling factor in the three coordinates} 11 8 12 The scaling factor is set to $0.5$. It is either introduced within the PostScript 13 variable `\texttt{/Facteur}': 9 The scaling factor is set to $0.5$. It is either introduced within the PostScript variable `\texttt{/Facteur}': 14 10 \begin{verbatim} 15 11 \pstVerb{/Facteur {.5 mulv3d} def}% … … 17 13 and then passed to the option \verb+transform+: 18 14 \begin{verbatim} 19 \psSolid[object=cube,a=2,ngrid=3,transform=Facteur](2,0,1)% 15 \psSolid[object=cube,a=2,ngrid=3, 16 transform=Facteur](2,0,1)% 20 17 \end{verbatim} 21 18 or directly passed to the option: 22 19 \begin{verbatim} 23 \psSolid[object=cube,a=2,ngrid=3,transform={.5 mulv3d}](2,0,1)% 20 \psSolid[object=cube,a=2,ngrid=3, 21 transform={.5 mulv3d}](2,0,1)% 24 22 \end{verbatim} 25 Here the \textit{jps} abbreviation \texttt{transform=\{.5 mulv3d\}} for a 26 function $\mathbb{R}^3 \rightarrow \mathbb{R}^3$ was used. 23 Here the \textit{jps} abbreviation \texttt{transform=\{.5 mulv3d\}} for a function $\mathbb{R}^3 \rightarrow \mathbb{R}^3$ was used. 27 24 28 25 Another method would be to use the code 29 26 \begin{verbatim} 30 \defFunction[algebraic]{matransformation}(x,y,z){.5*x}{.5*y}{.5*z} 27 \defFunction[algebraic]{matransformation}(x,y,z) 28 {.5*x} 29 {.5*y} 30 {.5*z} 31 31 \end{verbatim} 32 32 and then pass it to the option 33 33 \Cadre{[\texttt{transform=matransformation}]}. 34 35 34 \begin{LTXexample}[pos=t] 36 35 \psset{viewpoint=20 60 20 rtp2xyz,lightsrc=viewpoint,Decran=20} 37 \begin{pspicture}(-9,-3)(6,5) 36 \begin{pspicture}(-5,-3)(6,5) 37 \psframe(-5,-3)(6,5) 38 38 \psSolid[object=grille,base=-4 4 -4 4,fillcolor=red!50]% 39 39 \axesIIID(0,0,0)(4,4,4)% 40 \psSolid[object=cube,fillcolor=yellow!50,a=2,ngrid=3](-2,0,1) 41 \psSolid[object=cube,fillcolor=green!50,a=2,transform={.5 mulv3d}, 40 \psSolid[object=cube,fillcolor=yellow!50, 41 a=2,ngrid=3](-2,0,1) 42 \psSolid[object=cube,fillcolor=green!50, 43 a=2,transform={.5 mulv3d}, 42 44 ngrid=3](2,0,1) 43 \psSolid[object=cube,action=draw,a=2,ngrid=3](2,0,1) 45 \psSolid[object=cube, 46 action=draw, 47 a=2,ngrid=3](2,0,1) 44 48 \end{pspicture} 45 49 \end{LTXexample} … … 51 55 Let's for example use a factor 0.75 for $x$, 4 52 56 for $y$ and 0.5 for $z$ using the function \texttt{scaleOpoint3d} from the 53 \textit{jps} library---so a cube will be transformed to a cuboid. 54 57 \textit{jps} library -- so a cube will be transformed to a cuboid. 55 58 \begin{LTXexample}[pos=t] 56 59 \psset{viewpoint=20 60 20 rtp2xyz,lightsrc=viewpoint,Decran=20} 57 \begin{pspicture}(-9,-3)(6,5) 60 \begin{pspicture}(-5,-3)(6,5) 61 \psframe(-5,-3)(6,5) 58 62 \psSolid[object=grille,base=-4 4 -4 4,fillcolor=red!50]% 59 63 \axesIIID(0,0,0)(4,4,4)% 60 \psSolid[object=cube,fillcolor=yellow!50,a=2,ngrid=3](-2,0,1) 61 \psSolid[object=cube,fillcolor=green!50,a=2,transform={.75 4 .5 scaleOpoint3d}, 64 \psSolid[object=cube,fillcolor=yellow!50, 65 a=2,ngrid=3](-2,0,1) 66 \psSolid[object=cube,fillcolor=green!50, 67 a=2,transform={.75 4 .5 scaleOpoint3d}, 62 68 ngrid=3](2,0,1) 63 \psSolid[object=cube,action=draw,a=2,ngrid=3](2,0,1) 69 \psSolid[object=cube, 70 action=draw, 71 a=2,ngrid=3](2,0,1) 64 72 \end{pspicture} 65 73 \end{LTXexample} … … 81 89 \psset{viewpoint=20 60 20 rtp2xyz,lightsrc=10 15 7,Decran=20} 82 90 \pstVerb{ 83 /gro { 4 dict begin 91 /gro { 92 4 dict begin 84 93 /M defpoint3d 85 94 /a .5 def … … 96 105 %\newpage 97 106 98 \subsection{ Torsion of a beam}107 \subsection{Bending and torsion of beams} 99 108 100 109 The solid to the left is a prism of the height 10 cm with 20 floors 101 (\verb+[ngrid=20 2]+). In every floor, an additional angle of 102 rotation---for example 10$^{\mathrm{o}}$ around the $Oz$ axis is---given. 103 Now that the adjacent floors have a distance of $0.5$~cm, we multiply $z\times20$. 110 (\verb+[ngrid=20 2]+). In every floor, an additional angle of rotation -- for example 10$^{\mathrm{o}}$ around the $Oz$ axis is -- given. 111 Now that the adjacent floors have a distance of $0.5$~cm, one multiplies $z\times20$. 112 113 La flexion est envisagée dans le plan $xOz$ sous l'action d'une force perpendiculaire à la poutre appliquée en son extrémité. 104 114 105 115 \begin{LTXexample}[pos=t] 106 \psset{viewpoint= 50 50 20 rtp2xyz,lightsrc=25 37 17,Decran=50,unit=0.75}116 \psset{viewpoint=100 50 20 rtp2xyz,lightsrc=viewpoint,Decran=100,unit=0.65} 107 117 \begin{pspicture}(-3,-1)(3.5,11) 118 \psframe(-3,-1)(3.5,11) 108 119 \psSolid[object=grille,base=-2 2 -2 2,ngrid=8]% 109 120 \psSolid[object=prisme,h=10,ngrid=20 2, 110 base=0.5 0 0.5 0.5 0 0.5 -0.5 0.5 -0.5 0 -0.5 -0.5 0 -0.5 0.5 -0.5] 111 \end{pspicture}\hfill 112 \begin{pspicture}(-3.5,-1)(3,10) 121 base=0.5 0 0.5 0.5 0 0.5 -0.5 0.5 -0.5 0 -0.5 -0.5 0 -0.5 0.5 -0.5]% 122 \end{pspicture} 123 \begin{pspicture}(-3,-1)(3.5,11) 124 \psframe(-3,-1)(3.5,11) 113 125 \psSolid[object=grille,base=-2 2 -2 2,ngrid=8]% 114 126 \pstVerb{ 115 /torsion { 2 dict begin 116 /M defpoint3d % on r\'{e}cup\`{e}re les coordonn\'{e}es 127 /torsion {% on tourne de 10 degrés suivant l'axe Oz à chaque niveau 128 2 dict begin 129 /M defpoint3d % on récupère les coordonnées 117 130 M /z exch def pop pop 118 % on tourne de 10 degr\'{e}s \`{a} chaque niveau 119 M 0 0 z 20 mul rotateOpoint3d 131 M 0 0 z 20 mul rotateOpoint3d 120 132 end} def}% 121 133 \psSolid[object=prisme,h=10,ngrid=20 2, 122 134 base=0.5 0 0.5 0.5 0 0.5 -0.5 0.5 -0.5 0 -0.5 -0.5 0 -0.5 0.5 -0.5, 123 135 transform=torsion]% 136 \psTransformPoint[RotZ=20](2 0 10)(0,0,0){A} 137 \psTransformPoint[RotZ=20](2 1 10)(0,0,0){A'} 138 \psTransformPoint[RotZ=20](-2 0 10)(0,0,0){B} 139 \psTransformPoint[RotZ=20](-2 -1 10)(0,0,0){B'} 140 \psline[linecolor=red]{v-v}(A')(A)(B)(B') 141 \end{pspicture} 142 \begin{pspicture}(-3.5,-1)(3,11) 143 \psframe(-3.5,-1)(3,11) 144 \psSolid[object=grille,base=-2 2 -2 2,ngrid=8]% 145 \pstVerb{% idée de Christophe Poulain 146 /flexion {% on tourne de 2 degrés suivant l'axe Oy à chaque niveau 147 2 dict begin 148 /M defpoint3d % on récupère les coordonnées 149 M /z exch def pop pop 150 M 0 z 2 mul 0 rotateOpoint3d 151 end} def}% 152 \axesIIID(0,0,0)(3,3,10) 153 \psSolid[object=prisme,h=10,ngrid=20 2, 154 base=0.5 0 0.5 0.5 0 0.5 -0.5 0.5 -0.5 0 -0.5 -0.5 0 -0.5 0.5 -0.5, 155 transform=flexion]% 156 \psTransformPoint[RotY=20](0.5 0 10)(0,0,0){A} 157 \psPoint(3 20 cos mul 20 sin 10 mul add 0.5 add,0, 20 cos 10 mul 20 sin 3 mul sub){A'} 158 \psdot(A)\psline[linecolor=red]{-v}(A)(A') 124 159 \end{pspicture} 125 160 \end{LTXexample} 126 161 127 128 162 \endinput trunk/doc-en/pst-solides3d-doc-EN.tex
r109 r111 299 299 %\usepackage{underscore} 300 300 \ofoot{\pagemark} 301 \ def\Input#1#2{\ifoot{{\footnotesize#2}}\input{#1#2}}301 \newcommand\Input[2][\datapath]{\ifoot{{\footnotesize#2}}\input{#1#2}} 302 302 % doesnt wotrk with underscores in filename 303 303
