diff options
author | Karl Berry <karl@freefriends.org> | 2015-06-30 21:25:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-06-30 21:25:34 +0000 |
commit | 3c83b502f55921d74de657197d86198e2d6fd4ce (patch) | |
tree | 5ac3337eee986e435170fbf9b247ac78e1f70326 /Master/texmf-dist/doc/generic/pst-solides3d/src/text | |
parent | d5a70f8648d317785588d3f032978466599db97a (diff) |
pst-solides3d (30jun15)
git-svn-id: svn://tug.org/texlive/trunk@37718 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-solides3d/src/text')
66 files changed, 12218 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/chapter-1-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/chapter-1-en.tex new file mode 100644 index 00000000000..2b242dd85d9 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/chapter-1-en.tex @@ -0,0 +1,161 @@ +\section{Constitution of the package -- Distribution} + +\begin{compactitem} +\item \textbf{Required files:} \texttt{pst-solides3d.sty}, \texttt{pst-solides3d.tex}, +\texttt{solides.pro} and the latest version of the basic PSTricks package. +\item \textbf{Workflow:} This package is made for \texttt{dvips} and \texttt{ps2pdf}, however +\texttt{pdf\TeX{}} won't work. +\item \textbf{Documentation and examples:} \texttt{pst-solides3d-doc.tex(pdf)}, +\texttt{doc-exemples-solides3d.tex(pdf)}. +\end{compactitem} + +This package is available on: +\url{http://syracuse.eu.org/syracuse/pstricks/pst-solides3d/} +as well as on CTAN. + +Numerous examples are available on: +\url{http://syracuse.eu.org/lab/bpst/pst-solides3d} + +Finally, the actual developer's version is available on the +\texttt{SVN} of \textit{m\'{e}lusine}: +\url{http://syracuse-dev.org/pst-solides3d} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{Installation hints} + +Here we give some hints on how to install \texttt{pst-solides3d} +on your \TeX{} system. + +The \texttt{pst-solides3d} package consists of three main files: +\begin{compactitem} +\item \texttt{solides.pro}: the prolog file for \texttt{pst-solides3d} +\item \texttt{pst-solides3d.sty}: the appropriate style file +\item \texttt{pst-solides3d.tex}: the appropriate tex file +\end{compactitem} +as well as the actual PSTricks base files: +\begin{compactitem} +\item \texttt{pstricks.pro}: the prolog file for pstricks +\item \texttt{pstricks.tex}: the appropriate tex file +\end{compactitem} +available on CTAN. + +Some extension files for \texttt{pst-rubans}: +\begin{compactitem} +\item \texttt{pst-rubans.sty}: the appropriate style file +\item \texttt{pst-rubans.tex}: the appropriate tex file +\end{compactitem} + +Save the files \texttt{pst-solides3d.sty|tex}, +\texttt{pst-rubans.sty|tex} and \texttt{pstricks.tex} in a +directory which is part of your local \TeX{} tree. + +However the \texttt{solides.pro} and the \texttt{pstricks.pro} file should go into the +folder \verb+$TEXMF/dvips/pstricks/+ %$ + +Do not forget to run \texttt{texhash} to update this tree. For +MiK\TeX{} users, do not forget to update the file name database +(FNDB). + +For more detailed information see the documentation of your +personal \LaTeX{} distribution on installing packages to your +local \TeX{} system. + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{Preface} + +The package presented in this documentation arose from teamwork +initiated via the mailing list of the syracuse web site +(\url{http://melusine.eu.org/syracuse}). + +The idea was born of a confrontation between the work of +Jean-Paul \textsc{Vignault} on the software package \textit{jps2ps}% +\footnote{\url{http://melusine.eu.org/syracuse/bbgraf/}} +and Manuel \textsc{Luque}'s work on PSTricks% +\footnote{\url{http://melusine.eu.org/syracuse/pstricks/pst-v3d/}}, +especially in relation to the subject of representing solids in +three-dimensional space. + +The two authors decided to unify their efforts and co-author a +PSTricks package dedicated to three-dimensional scenes. The work +took place on the ``machine \textit{m\'{e}lusine}'' within an +environment generated and maintained by Jean-Michel +\textsc{Sarlat}. + +The team was completed with the addition of Arnaud +\textsc{Schmittbuhl}, Herbert \textsc{Voss} +and J\"{u}rgen \textsc{Gilg}, the latter specialising in animation-based beta-testing% +\footnote{\url{http://melusine.eu.org/syracuse/pstricks/pst-solides3d/animations/}}. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\section {Presentation} + +The package \texttt{pst-solides3d}, with the help of PSTricks, +allows for 3D views of predefined or user-generated solids. You +will find most of the usual solids, which can be drawn with or +without hidden edges, whose colour can be varied with lighting. + +This package can project text or simple graphics (in 2D) onto +arbitrarily chosen planes or onto plane faces of solids that are +created by the user. + +From the user's standpoint, most of its functionalities are +accessible by way of three \TeX{} macros: \Lcs{psSolid}, which can +manipulate objects in 3 dimensions, \Lcs{psSurface}, related to the +first macro and designed to represent surfaces that are defined by +an equation of the type $f(x,y) = z$ and \Lcs{psProjection} which +allows the user to project two-dimensional graphics/text onto any +plane face of a 3D solid. + +In using this package, two languages come together: on the one +hand PSTricks, with its well-known macros and familiar syntax, and +on the other PostScript code, which appears within the optional +arguments of the former. + +We have made the decision to strictly limit the involvement of +PSTricks. Its function is only to transmit parameters from \TeX{} +to PostScript. All calculations and displays are done by the +latter. + +A PostScript library, which was developed for another application +(the software package \textit{jps2ps}), is used for all +calculations and display routines. The PostScript code used in +this library is called \textit{jps code}. + +The aim of the present document is to describe PSTricks syntax for +each operation provided by the package. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{Changes by comparison with previous versions} + +\subsection{Changes compared to version 3.0} + +\begin{compactitem} +\item The macro \Lcs{psProjection} has been completely rewritten. We now need to use an +object of type \Lkeyword{plan} to define a projection. +\item The object \Lkeyword{courbe} now uses the argument $r$. To reproduce the previous behaviour +we now have to specify $r=0$. +\item The option \Lkeyword{resolution} of the object \Lkeyword{courbe} is replaced with the option +\Lkeyword{ngrid} +\item Suppression of the argument \Lkeyword{tracelignedeniveau}. +\end{compactitem} + +\subsection{Changes compared to version 2.0} + +\begin{compactitem} +\item The option \Lkeyword{hue} is not a Boolean anymore. +\item The scaling in PostScript will from now on follow the workings of \textit{jps code}. +To be consistent, the commands \verb+smoveto+, +\verb+srmoveto+, \verb+slineto+, \verb+srlineto+ now +respectively replace the commands \verb+moveto+, +\verb+rmoveto+, \verb+lineto+, \verb+rlineto+. +\end{compactitem} diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/chapter-2-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/chapter-2-en.tex new file mode 100644 index 00000000000..ea4f40130fa --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/chapter-2-en.tex @@ -0,0 +1,297 @@ +\section{Choice of the view point} + +\begin{center} + +\begin{pspicture}(-5,-5.7)(10,7) +\psset{lightsrc=10 20 30,viewpoint=50 30 20 rtp2xyz} +\definecolor{bleuciel}{rgb}{0.78,0.84,0.99} +\psSolid[object=cube,fillcolor=bleuciel,a=2,action=draw*]%% +%\psSolid[object=cubemaillage,fillcolor=bleuciel,a=2]%% +\psSolid[object=grille,base=0 8 0 10,action=draw]%% +\psSolid[object=grille,base=0 7 0 10,action=draw,RotY=90](0,0,7)% +\psSolid[object=grille,base=0 8 0 7,action=draw,RotX=-90](0,0,7)% +\psSolid[object=cube,fillcolor=bleuciel,a=1,action=draw*](0.5,0.5,0.5)% +\psSolid[object=grille,base=-1 1 -1 1,action=draw,linecolor=blue](0,0,1)% +\psSolid[object=grille,base=-1 1 -1 1,action=draw,RotY=90,linecolor=blue](1,0,0)% +\psSolid[object=grille,base=-1 1 -1 1,action=draw,RotX=-90,linecolor=blue](0,1,0)% +\axesIIID(1,1,1)(8,10,7) +\pstVerb{ + /dV 12 def % distance V + /dE 6 def % distance \'{e}cran + /Theta 60 def + /Phi 30 def + dV Theta Phi rtp2xyz + /zV exch def + /yV exch def + /xV exch def + dE Theta Phi rtp2xyz + /zE exch def + /yE exch def + /xE exch def + }% +\psPoint(xV,yV,zV){V} +\psPoint(xE,yE,zE){E} +\psPoint(xV,yV,0){Vp} +% +% 5 distance \'{e}cran +%\psPoint(dE Theta cos mul Phi cos div dE Theta sin mul Phi cos div 0){Vq} +\psPoint(xV,0,0){Vx} +\psPoint(0,yV,0){Vy} +\psPoint(0,0,zV){Vz} +\psdot(V) +{\psset{linestyle=dashed,linecolor=red} +\psline(V)(Vp)\psline(Vx)(Vp)\psline(Vy)(Vp)\psline(V)(Vz)\psline(V)(O)\psline(Vp)(O)} +%\psSolid[object=grille,base=-5 5 -3 3,action=draw,RotX=-60,linecolor=red](xE,yE,zE)% +\psTransformPoint[RotX=-60](-5 -3 0)(xE,yE,zE){A} +\psTransformPoint[RotX=-60](-5 3 0)(xE,yE,zE){B} +\psTransformPoint[RotX=-60](5 3 0)(xE,yE,zE){C} +\psTransformPoint[RotX=-60](5 -3 0)(xE,yE,zE){D} +\pspolygon[fillstyle=vlines,hatchcolor=yellow!90,hatchwidth=0.02,hatchsep=0.04](A)(B)(C)(D) +% +% +\PointEcran(1,1,1){S1} +\psPoint(1,1,1){s1} +\psline(S1)(V) +\psline[linestyle=dashed](s1)(S1) +% +\PointEcran(1,1,-1){S2} +\psPoint(1,1,-1){s2} +\psline(S2)(V) +\psline[linestyle=dashed](s2)(S2) +% +\PointEcran(-1,1,-1){S3} +\psPoint(-1,1,-1){s3} +\psline(S3)(V) +\psline[linestyle=dashed](s3)(S3) +% +\PointEcran(-1,1,1){S4} +\psPoint(-1,1,1){s4} +\psline(S4)(V) +\psline[linestyle=dashed](s4)(S4) +% +\PointEcran(1,-1,-1){S5} +\psPoint(1,-1,-1){s5} +\psline(S5)(V) +\psline[linestyle=dashed](s5)(S5) +% +\PointEcran(1,-1,1){S6} +\psPoint(1,-1,1){s6} +\psline(S6)(V) +\psline[linestyle=dashed](s6)(S6) +% +\PointEcran(-1,-1,1){S7} +\psPoint(-1,-1,1){s7} +\psline(S7)(V) +\psline[linestyle=dashed](s7)(S7) +\psset{solidmemory} +\psSolid[object=plan, + definition=equation, + args={[0 0 1 0]}, + base=-5 5 -3 3, + RotX=-60, +% showBase, + action=none, + name=planbase, +] +%% here, we define the plantype object "Ecran" +\codejps{ + planbase + dup xE yE zE planputorigine + dup -180 rotateplan + /Ecran exch def +}% +%% uncomment follow line to draw "Ecran" +%\psSolid[object=plan,args=Ecran,showBase,planmarks] +\psProjection[object=texte, + plan=Ecran, + fontsize=20, + text=Projection Screen](-2,2) + +% +\psset{linecolor=red,fillstyle=vlines,hatchsep=0.04,hatchwidth=0.02} +\pspolygon[hatchcolor=red!60](S1)(S2)(S3)(S4) +\pspolygon[,hatchcolor=red!60](S1)(S2)(S5)(S6) +\pspolygon[hatchcolor=red!10](S1)(S4)(S7)(S6) +\psdots(s1)(s2)(s3)(s4)(s5)(s6)(s7)(S1)(S2)(S3)(S4)(S5)(S6)(S7) +\psbrace[ref=lC,linecolor=black](V)(E){$D$} +\uput[45](V){View Point} +\end{pspicture} +\end{center} + +The coordinates of the object, in this case the bluish cube, are setup in the axes of coordinates $Oxyz$. The \Index{coordinates} of the \Index{view point} ($V$), are setup in the same axes of coordinates, either in \Index{spherical coordinates}---with the adding option \verb+[rtp2xyz]+, or in Cartesian coordinates---which is the default option. + +Example: \verb+[viewpoint=50 30 20 rtp2xyz]+ \qquad (here the notation with spherical coordinates) + + +See some examples: + +\def\decor{% +\psset{solidmemory} + \psSolid[object=plan, + definition=equation, + base=-5 5 -5 5, + args={[0 0 1 0] 180}, + name=P1]% +\psset{fontsize=28.45,plan=P1} +\psSolid[object=plan, + args=P1, + plangrid,action=none] +\psProjection[object=texte, + linecolor=red, + text=pst-solides3d](0,3.5) + \psSolid[object=sphere,r=1,fillcolor=red!25,ngrid=18 36](4,4,1) + \psSolid[object=cone,h=3,r=1,fillcolor=cyan,mode=5](-4,4,0) + \psSolid[object=cube,a=2,fillcolor=magenta!20](-4,-4,1) + \psSolid[object=cylindre,r=1,h=4,fillcolor=blue!20,ngrid=4 16](4,-4,0) +\axesIIID(0,0,0)(6,6,6) +\psPoint(0,0,0){O} +\psdot(O)} + +\begin{pspicture}(-3,-3)(3,3) +%\psframe(-5,-3)(4,4) + \psset{viewpoint=20 25 15,Decran=20,lightsrc=viewpoint,unit=0.9} +\decor +\rput(0,-4){\texttt{viewpoint=20 25 15}} + \end{pspicture}\qquad\qquad\qquad\qquad +\begin{pspicture}(-3,-3)(3,3) +%\psframe(-5,-3)(4,4) + \psset{viewpoint=-10 0 30,Decran=20,lightsrc=viewpoint,unit=0.9} +\decor +\rput(0,-4){\texttt{viewpoint=-10 0 30}} + \end{pspicture} + + +\begin{pspicture}(-3,-3)(3,4.5) +%\psframe(-5,-3)(4,4) + \psset{viewpoint=-20 0 10,Decran=10,lightsrc=viewpoint,unit=0.9} +\decor +\rput(0,-4){\texttt{viewpoint=-20 0 10}} + \end{pspicture}\qquad\qquad\qquad\qquad + \begin{pspicture}(-3,-3)(3,4.5) +%\psframe(-5,-3)(4,4) + \psset{viewpoint=-20 -10 25,Decran=20,lightsrc=viewpoint,unit=0.9} +\decor +\rput(0,-4){\texttt{viewpoint=-20 -10 25}} + \end{pspicture} + +\section{The definition of the option \texttt{\Index{Decran}}} +The \Index{projection screen} is placed perpendicular to the direction $OV$---central +perspective, at a distance $D$ from the view point $V$: We call that distance +`Decran', with the default value of \texttt{\Lkeyword{Decran}=50}; this value can +either be positive or negative. + + + +The following examples show the behaviour of the parameter \Lkeyword{Decran}. + +\begin{center} +\begin{pspicture}(-2,-3)(2.5,3) +\psaxes[yAxis=false](-2,-2)(2,2) +\psset{viewpoint=0 0 5,Decran=5} +\psSolid[object=grille,base=-2 2 -2 2] +\psSolid[object=vecteur,args=0 0 0 2 2 0,linecolor=red,linewidth=2pt] +\axesIIID(3,3,3)\pnode(2,-2){B}\pnode(2,2){A} +\end{pspicture} +\qquad +\begin{pspicture}(-0.5,-3)(5,3) +\psaxes[yAxis=false](0,-2)(5,2) +\psset{viewpoint=5 0 5,Decran=5,RotX=-90} +\psSolid[object=grille,base=-2 2 -2 2,RotX=89.9] +\axesIIID[axisnames={x,z,y}](3,3,0) +\psdot(5,0)\uput[0](5,0){V} +\psline[tbarsize=3mm 5]{<->|}(0,-0.5)(5,-0.5)\rput*(2.5,-0.5){$D=V$} +\psline[linestyle=dashed](0,2)(5,0)\psline[linestyle=dashed](0,-2)(5,0) +\uput[-90](0,-2.5){Original}\uput[-90](0,-2.85){Image} +\psline[linestyle=dotted](A)(0,2) +\psline[linestyle=dotted](B)(0,-2) +\rput(-1,2.75){Rotation: } +\rput(-1,2.25){90$^\circ$ around $x$} +\psSolid[object=vecteur,args=0 0 0 2 2 0,linecolor=red,linewidth=2pt] +\end{pspicture}\\[\normalbaselineskip] +% +\begin{pspicture}(-2,-3)(2.5,3) +\psaxes[yAxis=false](-2,-2)(2,2) +\psset{viewpoint=0 0 5,Decran=2.5} +\psSolid[object=grille,base=-2 2 -2 2] +\psSolid[object=vecteur,args=0 0 0 2 2 0,linecolor=red,linewidth=2pt] +\axesIIID(3,3,3)\pnode(1,-1){B}\pnode(1,1){A} +\end{pspicture} +\qquad +\begin{pspicture}(-0.5,-3)(5,3) +\psaxes[yAxis=false](0,-2)(5,2) +\psset{viewpoint=5 0 5,Decran=2.5,RotX=-90} +\psline[linewidth=1pt](0,2)(0,-2) +\psline[linewidth=1.5pt,linecolor=red]{->}(0,0)(0,-2) +\psdot(5,0)\uput[0](5,0){V} +\psline[tbarsize=3mm 5]{<->|}(0,1.5)(5,1.5)\rput*(2.5,1.5){$V$} +\psline[linestyle=dashed](0,2)(5,0)\psline[linestyle=dashed](0,-2)(5,0) +\psline[tbarsize=3mm 5]{|<->|}(2.5,-1.5)(5,-1.5)\rput*(3.75,-1.5){$D$} +\psline[linewidth=1.5pt](2.5,1)(2.5,-1) +\psline[linewidth=1.5pt,linecolor=red]{->}(2.5,0)(2.5,-1) +\psline{->}(2.5,0)(3.5,0)\uput[0](3.5,0){$z$} +\uput[-90](0,-2.5){Original}\uput[-90](2.5,-2.5){Image} +\psline[linestyle=dotted](A)(2.5,1) +\psline[linestyle=dotted](B)(2.5,-1) +\rput(-1.5,1.75){Rotation:} +\rput(-1.5,1.25){90$^\circ$ around $x$} +\end{pspicture} +\end{center} + + +If you keep the view point and make the \Lkeyword{Decran} value smaller, then the +image gets smaller. If you make the \Lkeyword{Decran} value larger, then the image gets larger. + +Here are some examples, where we keep the same object, the same view point +and just vary the \Lkeyword{Decran} value: + +\begin{center} +\begin{pspicture}(-2,-2)(2,2) +%\psgrid +\psset{solidmemory} +\psset{viewpoint=0 50 0,Decran=50} +%\psSolid[object=sphere,r=2,ngrid=18 36] +\psSolid[object=plan,definition=normalpoint,plangrid,linecolor=red, + base=-2 2 -2 2,args={0 0 0 [0 1 0 180]},name=monplan] +\psset{plan=monplan} +\psProjection[object=texte, + linecolor=red, + fontsize=105.35, + text=PS]% +\composeSolid +\rput*(0,-1.75){\texttt{Decran=50}} +\end{pspicture}\qquad +\begin{pspicture}(-2,-2)(2,2) +%\psgrid +\psset{solidmemory} +\psset{viewpoint=0 50 0,Decran=25} +%\psSolid[object=sphere,r=2,ngrid=18 36] +\psSolid[object=plan,definition=normalpoint,plangrid,linecolor=red, + base=-2 2 -2 2,args={0 0 0 [0 1 0 180]},name=monplan] +\psset{plan=monplan} +\psProjection[object=texte, + linecolor=red, + fontsize=105.35, + text=PS]% +\composeSolid +\rput*(0,-1.75){\texttt{Decran=25}} +\end{pspicture}\qquad +\begin{pspicture}(-2,-2)(2,2) +%\psgrid +\psset{solidmemory} +\psset{viewpoint=0 50 0,Decran=-50} +\psSolid[object=plan,definition=normalpoint,plangrid,linecolor=red, + base=-2 2 -2 2,args={0 0 0 [0 1 0 180]},name=monplan] +\psset{plan=monplan} +\psProjection[object=texte, + linecolor=red, + fontsize=105.35, + text=PS]% +\composeSolid +\rput*(0,-1.75){\texttt{Decran=-50}} +\end{pspicture} +\end{center} + + +\endinput + + diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-acknowledgements-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-acknowledgements-en.tex new file mode 100644 index 00000000000..5083c50db02 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-acknowledgements-en.tex @@ -0,0 +1,22 @@ +\section{Acknowledgments} + +Spontaneous and diligent proofreading assistance from various +members of the PSTricks list made it possible to produce this +English version of the \texttt{pst-solides3d} documentation. We +hope that this will help and encourage more of you to set about +depicting your own 3D solids. + +So, many thanks from the ``\'{e}quipe solide'' go to: % here ``\'{e}quipe solide'' is meant as a nice word game... + +Gerry~\textsc{Coombes}, +%Martijn \textsc{Frijlink}, +%Manjusha \textsc{Joshi}, +%E.~\textsc{Krishnan}, +Zbiginiew~\textsc{Nitecki}, +D.~P.~\textsc{Story} and +Herbert~\textsc{Voss}. + +Additional thanks go to Gerry \textsc{Coombes}, who generated a keyword glossary +for the \texttt{pst-solides3d} package and who proofed the terminology for consistency. + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-affinage-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-affinage-en.tex new file mode 100644 index 00000000000..d227922dc96 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-affinage-en.tex @@ -0,0 +1,66 @@ +\section{\Index{Hollowing out} a solid's faces} + +We call \textit{hollowing by the ratio $k$} an operation, which for a given +face with the center $G$, executes a dilation on that face with the ratio +$k$, then divides the original face with using this new face. + +For example, a cube with a hollow of its top face with a ratio of $0.8$: + +\begin{center} +\psset{unit=0.5} +\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50} +\begin{pspicture*}(-4,-4)(4,4) +%\psframe(-4,-4)(4,4) +\psSolid[object=cube, + fillcolor=red, + affinagerm, + fcolor=Yellow, + affinage=0] +\end{pspicture*} +\end{center} + +The option \Lkeyword{affinage} allows us to hollow a solid's faces either globally or +individually. This option uses the key \Lkeyword{affinagecoeff} +(value $0.8$ by default) which indicates the ratio $k$ used for the +hollow ($0<k<1$). +% +\begin{compactitem} + \item \texttt{\Lkeyword{affinage}=\Lkeyval{all}} hollows all the faces; + \item \texttt{\Lkeyword{affinage}=0 1 2 3} hollows the faces 0, 1, 2 and 3; +\end{compactitem} + +When a face is hollowed out, the default behaviour suppresses the resulting central +face. However, the option \Lkeyword{affinagerm} allows us to conserve that central face. + +When we conserve the centre face, it is---by default---drawn with the same colour +as the original. The option \Lkeyword{fcolor} permits to specify another colour. + +%\newpage +\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50} +\begin{LTXexample}[width=6cm] +\psset{unit=0.5} +\begin{pspicture*}(-5,-4)(6,5) +\psSolid[object=cube, + fillcolor=cyan, + incolor=red, + hollow, + affinage=0] +\end{pspicture*} +\end{LTXexample} +% + +\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50} +\begin{LTXexample}[width=6cm] +\psset{unit=0.5} +\begin{pspicture*}(-5,-4)(6,5) +\psSolid[object=cube, + fillcolor=cyan, + affinagecoeff=.5, + affinagerm, + fcolor=.5 setfillopacity Yellow, + hollow, + affinage=all] +\end{pspicture*} +\end{LTXexample} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-anneaux-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-anneaux-en.tex new file mode 100644 index 00000000000..d5707139cd4 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-anneaux-en.tex @@ -0,0 +1,397 @@ + +\section{Solid rings} + +This paragraph discusses the cylindric \Index{rings}. Within the macro +\Lcs{psSolid}, this object is passed with the option: +\texttt{\Lkeyword{object}=\Lkeyval{anneau}}, that comes with 3 parameters: +\begin{compactitem} + \item the inner radius \texttt{\Lkeyword{r}=1.5} (value by default); + \item the outer radius \texttt{\Lkeyword{R}=4} (value by default); + \item the height \texttt{\Lkeyword{h}=6} (value by default). +\end{compactitem} + +The argument \Lkeyword{ngrid} defines the number of sections used to make a complete +rotation of $360$~degrees. Its default value is $24$. + +The section of the ring, whose shape is \textit{rectangular} was chosen as default, +and can be redesigned by the user. +We will discuss different examples of sections for rings. + +\subsection{Predefined command: the ring with a rectangular section} + +This section is defined in the plane $Oyz$, it is parameterized with the +triple $(r, R, h)$. The values of the outer radius $R$, inner radius $r$ and the +height $h$ are passed in the macro \Lcs{psSolid}. By default, one has a ring with +a variable rectangular section, and the definition takes place at the time +of the transmission of the values $(r, R, h)$ into the options of \Lcs{psSolid}. + +If the user redefines the \TeX {} macro \verb+\Section+ with some numeric values +instead of the parameters $r$, $R$ and $h$, then +the ring won't be variable anymore and it is not necessary to transmit the +values $r$, $R$, and $h$ into the options of \Lcs{psSolid}. + +\begin{minipage}{0.45\linewidth} +\begin{verbatim} +\newcommand\Section{% +% y z + R h 2 div neg % sommet 1 + % S1 (R,-h/2) + R h 2 div % sommet 2 + % S2 (r,h/2) + r h 2 div % sommet 3 + % S3 (r,h/2) + r h 2 div neg % sommet 4 + % S4 (r,-h/2) + } +\end{verbatim} +\end{minipage} +\hfill +\begin{minipage}{0.45\linewidth} +\psset{unit=0.5} +\begin{pspicture}(-5,-3)(5,3) +\pstVerb{/R 4 def /r 2 def /h 2 def}% +\newcommand\RectangularSection{% + \pspolygon[fillstyle=vlines,linewidth=2\pslinewidth]% + (!R h 2 div neg)(!R h 2 div)(!r h 2 div)(!r h 2 div neg)} +\rput(0,0){\RectangularSection}\rput(-6,0){\RectangularSection} +\psline(-2,1)(2,1)\psline(-2,-1)(2,-1) +\psline[linestyle=dashed,dash=1 0.2 0.05 0.2]{->}(0,-3)(0,3) +\psline[linestyle=dashed]{->}(-4,0)(4.2,0) +\uput[u](0,3){$z$}\uput[r](4.1,0){$y$}\uput[dl](0,0){$O$} +\psline{->}(0,1.5)(2,1.5)\uput[u](1,1.5){$r$} +\psline{->}(0,2.5)(4,2.5)\uput[u](2,2.5){$R$} +\psline{<->}(5,-1)(5,1)\uput[r](5,0){$h$} +\uput[dr](!R h 2 div neg){1} +\uput[ur](!R h 2 div ){2} +\uput[ul](!r h 2 div ){3} +\uput[dl](!r h 2 div neg){4} +\end{pspicture} +\end{minipage} +\newpage +\begin{LTXexample}[width=6cm] +\psset{unit=0.5} +\begin{pspicture}(-5,-4)(5,4) +\psset[pst-solides3d]{viewpoint=50 20 40 rtp2xyz, + Decran=25,lightsrc=10 20 20} +\psSolid[object=anneau,fillcolor=cyan, + h=3,R=8,r=6,ngrid=4,RotX=10](0,0,0) +\end{pspicture}\\ +\begin{pspicture}(-5,-4)(5,4) +\psset[pst-solides3d]{viewpoint=50 -20 -40 rtp2xyz, + Decran=25,lightsrc=-10 -20 -20} +\psSolid[object=anneau, +fillcolor=yellow,h=3,R=8,r=6, +RotX=90,RotZ=10](0,0,0) +\end{pspicture} +\end{LTXexample} + + + +\subsection{Example 1: a simple ring with a triangular section} + +Below is a very simple ring with a fixed triangular section. + The section is defined by $3$~points $(6, -2)$, $(10, 0)$ +and $(6, 2)$ within the option \Lkeyword{section} of \Lcs{psSolid}. + +\begin{LTXexample}[width=6cm] +\psset{unit=0.5} +\begin{pspicture}(-5,-6)(5,6) +\psset[pst-solides3d]{viewpoint=50 20 40 rtp2xyz,Decran=25, + lightsrc=10 20 20} +\psSolid[object=anneau, + section=6 -2 10 0 6 2, + fillcolor=cyan,RotX=10]% +\end{pspicture} +\end{LTXexample} + +%\newpage + +\subsection{Example 2: a ring with a variable triangular section} + +\newcommand\SectionTriangulaire{ + R h 2 div neg % sommet 1 + R r add 2 div h 2 div % sommet 2 + r h 2 div neg % sommet 3 +} + +\begin{minipage}{0.45\linewidth} +\begin{verbatim} +\newcommand\SectionTriangulaire{ +% y <----z----> + R h 2 div neg + % S1 (R,-h/2) + R r add 2 div h 2 div + % S2 ((R+r)/2,h/2) + r h 2 div neg + % S3 (r,-h/2) +} +\end{verbatim} +\end{minipage} +\hfill +\begin{minipage}{0.45\linewidth} +\psset{unit=0.5} +\begin{pspicture}(-5,-3)(5,3) +%\psgrid +\pstVerb{/R 4 def /r 2 def /h 2 def}% +\newcommand\TriangularSection{% + \pspolygon[fillstyle=vlines,linewidth=2\pslinewidth]% + (!R h 2 div neg)(!R r add 2 div h 2 div)(!r h 2 div neg)} +\rput(0,0){\TriangularSection}\rput(-6,0){\TriangularSection} +\psline(-3,1)(3,1)\psline(-4,-1)(4,-1) +\psline[linestyle=dashed,dash=1 0.2 0.05 0.2]{->}(0,-3)(0,3) +\uput[u](0,3){$z$}\uput[r](4.1,0){$y$}\uput[dl](0,0){$O$} +\psline[linestyle=dashed](2,-1)(2,1.5) +\psline[linestyle=dashed](4,-1)(4,2.5) +\psline[linestyle=dashed]{->}(-4,0)(4.2,0) +\psline{->}(0,1.5)(2,1.5)\uput[u](1,1.5){$r$} +\psline{->}(0,2.5)(4,2.5)\uput[u](2,2.5){$R$} +\psline{<->}(5,-1)(5,1)\uput[r](5,0){$h$} +\uput[dr](!R h 2 div neg){1} +\uput[u](!R r add 2 div h 2 div){2} +\uput[dl](!r h 2 div neg){3} +\end{pspicture} +\end{minipage} +\begin{center} +%% +\psset{unit=0.5} +\begin{pspicture}(-5,-6)(5,6) +\psframe(-5,-4)(5,4) +\psset[pst-solides3d]{viewpoint=50 20 40 rtp2xyz,Decran=25,lightsrc=10 20 20} +\psSolid[object=anneau,section=\SectionTriangulaire,fillcolor=cyan,h=3,R=8,r=4,RotX=10]% +\end{pspicture} +%% +\begin{pspicture}(-5,-6)(5,5) +\psframe(-5,-4)(5,4) +\psset[pst-solides3d]{viewpoint=50 -20 -40 rtp2xyz,Decran=25,lightsrc=-10 -20 -20} +\psSolid[object=anneau,section=\SectionTriangulaire,fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10]% +\end{pspicture} +\end{center} + +\begin{verbatim} +\psSolid[object=anneau,section=\SectionTriangulaire,% + fillcolor=cyan,h=3,R=8,r=4,RotX=10](0,0,0) +\psSolid[object=anneau,section=\SectionTriangulaire,% + fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10](0,0,0) +\end{verbatim} + +%%\newpage + +\newcommand\SectionPneu{ + /m {90 4 div} bind def + /Scos {m cos 2 m mul cos add 3 m mul cos add} bind def + /Z0 {h 4 div} bind def + /c {Z0 Scos div} bind def + /Z1 {Z0 c m cos mul add} bind def + /Z2 {Z1 c m 2 mul cos mul add} bind def + /R1 {R c m sin mul sub} bind def + /R2 {R1 c m 2 mul sin mul sub} bind def + /R3 {R2 c m 3 mul sin mul sub} bind def + R h 4 div neg % 1 + R h 4 div % 2 + R1 Z1 % 3 + R2 Z2 % 4 + R3 h 2 div % 5 + r h 2 div % 6 + r h 2 div neg % 7 + R3 h 2 div neg % 8 + R2 Z2 neg % 9 + R1 Z1 neg % 10 + } + +\subsection{Example 3: a ring with a``tyre''-like section: cylindric ring with chamfered edges} + +\begin{minipage}{0.45\linewidth} +{\small +\begin{verbatim} +\renewcommand\SectionPneu{ + /m {90 4 div} bind def + /Scos {m cos 2 m mul cos add 3 m mul cos add} bind def + /Z0 {h 4 div} bind def + /c {Z0 Scos div} bind def + /Z1 {Z0 c m cos mul add} bind def + /Z2 {Z1 c m 2 mul cos mul add} bind def + /R1 {R c m sin mul sub} bind def + /R2 {R1 c m 2 mul sin mul sub} bind def + /R3 {R2 c m 3 mul sin mul sub} bind def + R h 4 div neg % 1 + R h 4 div % 2 + R1 Z1 % 3 + R2 Z2 % 4 + R3 h 2 div % 5 + r h 2 div % 6 + r h 2 div neg % 7 + R3 h 2 div neg % 8 + R2 Z2 neg % 9 + R1 Z1 neg % 10 + } +\end{verbatim}} +\end{minipage} +\hfill +\begin{minipage}{0.45\linewidth} +%\psset{unit=0.65} +\begin{pspicture}(-2,-3)(5,6) +%\psgrid +\pstVerb{/R 4 def /r 2 def /h 2 def}% +\pstVerb{/m {90 4 div} bind def + /Scos {m cos 2 m mul cos add 3 m mul cos add} bind def + /Z0 {h 4 div} bind def + /c {Z0 Scos div} bind def + /Z1 {Z0 c m cos mul add} bind def + /Z2 {Z1 c m 2 mul cos mul add} bind def + /R1 {R c m sin mul sub} bind def + /R2 {R1 c m 2 mul sin mul sub} bind def + /R3 {R2 c m 3 mul sin mul sub} bind def}% +\pnode(!R h 4 div neg){S1} +\pnode(!R h 4 div){S2} +\pnode(!R1 Z1){S3} +\pnode(!R2 Z2){S4} +\pnode(!R3 h 2 div){S5} +\pnode(!r h 2 div){S6} +\pnode(!r h 2 div neg){S7} +\pnode(!R3 h 2 div neg){S8} +\pnode(!R2 Z2 neg){S9} +\pnode(!R1 Z1 neg){S10} +\newcommand\pneuSection{\pspolygon[fillstyle=vlines,linewidth=2\pslinewidth]% + (S1)(S2)(S3)(S4)(S5)(S6)(S7)(S8)(S9)(S10)} +\rput(0,0){\pneuSection}\rput{180}{\pspolygon[fillstyle=vlines,linewidth=2\pslinewidth]% + (!R h 4 div neg)(!R h 4 div)(!R1 Z1)(!R2 Z2)(!R3 h 2 div)(!r h 2 div)(!r h 2 div neg)(!R3 h 2 div neg)(!R2 Z2 neg)(!R1 Z1 neg)} +\psline(-3,1)(3,1)\psline(-3,-1)(3,-1) +\psline[linestyle=dashed,dash=1 0.2 0.05 0.2]{->}(0,-3)(0,3) +\uput[u](0,3){$z$}\uput[r](4.1,0){$y$}\uput[dl](0,0){$O$} +\psline[linestyle=dashed](2,-1)(2,1.5) +\psline[linestyle=dashed](4,-1)(4,2.5) +\psline[linestyle=dashed]{->}(-4,0)(4.2,0) +\psline{->}(0,1.5)(2,1.5)\uput[u](1,1.5){$r$} +\psline{->}(0,2.5)(4,2.5)\uput[u](2,2.5){$R$} +\psline{<->}(5,-1)(5,1)\uput[r](5,0){$h$} +\uput[r](S1){1} +\uput[r](S2){2} +\uput[u](S3){3} +\uput[u](S4){4} +\uput[u](S5){5} +\uput[ul](S6){6} +\uput[dl](S7){7} +\uput[dl](S8){8} +\uput[dr](S9){9} +\uput[r](S10){10} +\psdots[linecolor=red](S1)(S2)(S3)(S4)(S5)(S6)(S7)(S8)(S9)(S10) +\end{pspicture} +\end{minipage} + +%\iffalse +\begin{center} +\psset{unit=0.7} +\begin{pspicture}(-5,-5)(5,4) +\psframe(-5,-4)(5,4) +\psset[pst-solides3d]{viewpoint=50 20 40 rtp2xyz,Decran=25,lightsrc=10 20 20} +\psSolid[object=anneau,section=\SectionPneu,fillcolor=cyan,h=3,R=8,r=4,RotX=10]% +\end{pspicture} +%% +\begin{pspicture}(-5,-5)(5,4) +\psframe(-5,-4)(5,4) +\psset[pst-solides3d]{viewpoint=50 -20 -40 rtp2xyz,Decran=25,lightsrc=-10 -20 -20} +\psSolid[object=anneau,section=\SectionPneu,fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10]% +\end{pspicture} +\end{center} +%% + +\begin{verbatim} +\psSolid[object=anneau,section=\SectionPneu,% + fillcolor=cyan,h=3,R=8,r=4,RotX=10](0,0,0) +\psSolid[object=anneau,section=\SectionPneu,% + fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10]% +\end{verbatim} + +%\fi +\newpage + +\subsection{Example 4: an empty bobbin} + +\newcommand\SectionBobine{ + r h 2 div % 1 + r h 2 div neg % 2 + R h 2 div neg % 3 + R h 3 div neg % 4 + R h 4 div sub h 3 div neg % 5 + R h 4 div sub h 3 div % 6 + R h 3 div % 7 + R h 2 div % 8 + } + +\begin{minipage}{0.45\linewidth} +\begin{verbatim} +\newcommand\SectionBobine{ + r h 2 div % 1 + r h 2 div neg % 2 + R h 2 div neg % 3 + R h 3 div neg % 4 + R h 4 div sub h 3 div neg % 5 + R h 4 div sub h 3 div % 6 + R h 3 div % 7 + R h 2 div % 8 + } +\end{verbatim} +\end{minipage} +\hfill +\begin{minipage}{0.45\linewidth} +\begin{pspicture}(-2,-2)(5,2) +\pstVerb{/RB 4 def /rB 2 def /hB 3 def}% +\pnode(!rB hB 2 div){S1} +\pnode(!rB hB 2 div neg){S2} +\pnode(!RB hB 2 div neg){S3} +\pnode(!RB hB 3 div neg){S4} +\pnode(!RB hB 4 div sub hB 3 div neg){S5} +\pnode(!RB hB 4 div sub hB 3 div){S6} +\pnode(!RB hB 3 div){S7} +\pnode(!RB hB 2 div){S8} +\newcommand\pneuSection{\pspolygon[fillstyle=vlines,linewidth=2\pslinewidth]% + (S1)(S2)(S3)(S4)(S5)(S6)(S7)(S8)} +\rput(0,0){\pneuSection}\rput{180}{\pspolygon[fillstyle=vlines,linewidth=2\pslinewidth]% + (!rB hB 2 div)(!rB hB 2 div neg)(!RB hB 2 div neg)(!RB hB 3 div neg)(!RB hB 4 div sub hB 3 div neg)(!RB hB 4 div sub hB 3 div)(!RB hB 3 div)(!RB hB 2 div)} +\psline(-3,1.5)(3,1.5)\psline(-3,-1.5)(3,-1.5) +\psline[linestyle=dashed,dash=1 0.2 0.05 0.2]{->}(0,-3)(0,3) +\uput[u](0,3){$z$}\uput[r](4.1,0){$y$}\uput[dl](0,0){$O$} +\psline[linestyle=dashed](2,-1)(2,1.5) +\psline[linestyle=dashed](4,-1)(4,2.5) +\psline[linestyle=dashed](-4,-1)(4,-1) +\psline[linestyle=dashed](-4,1)(4,1) +\psline[linestyle=dashed]{->}(-4,0)(4.2,0) +\psline{->}(0,1.8)(2,1.8)\uput[u](1,1.8){$r$} +\psline{->}(0,2.5)(4,2.5)\uput[u](2,2.5){$R$} +\psline{<->}(5,-1.5)(5,1.5)\uput[r](5,0){$h$} +\uput[u](S1){1} +\uput[d](S2){2} +\uput[d](S3){3} +\uput[r](S4){4} +\uput[ur](S5){5} +\uput[dr](S6){6} +\uput[r](S7){7} +\uput[r](S8){8} +\psdots[linecolor=red](S1)(S2)(S3)(S4)(S5)(S6)(S7)(S8) +\end{pspicture} +\end{minipage} +\begin{center} +\begin{pspicture}(-5,-6)(5,5) +\psframe*[linecolor=blue!50](-5,-5)(5,4) +\psset[pst-solides3d]{viewpoint=70 40 10 rtp2xyz,Decran=25,lightsrc=0 30 100} +\psSolid[object=grille,base=-15 15 -15 15,fillcolor=yellow!30!black!10](0,0,-8) +%\psSolid[object=prisme,h=2,base=-15 1 -15 -1 15 -1 15 1](0,0,-8) +\psSolid[object=anneau,section=\SectionBobine,fillcolor=gray!50,h=6,R=8,r=4,RotX=90,linecolor=gray]% +\end{pspicture} +\end{center} +\begin{verbatim} +\psSolid[object=grille,base=-15 15 -15 15,fillcolor=yellow!30](0,0,-8) +\psSolid[object=anneau,section=\SectionBobine,% + fillcolor=gray!50,h=6,R=8,r=4,RotX=90,linecolor=gray]% +\end{verbatim} + + + +\subsection{Some other rings} + +Three other examples are available on the website: + +\centerline{\url{http://syracuse.eu.org/lab/bpst/pst-solides3d/anneaux}} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-annoterschema-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-annoterschema-en.tex new file mode 100644 index 00000000000..c9ffc38d205 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-annoterschema-en.tex @@ -0,0 +1,119 @@ +\section{Adding dimensions to the scenery} + +It is very interesting to add \Index{dimensions} to the scenery. We take the example +of the methane molecule, where we want to insert the distances and angles. + +The first step consists of representing the molecule with its bonds and +characteristic dimensions, and then draw it in a good looking way. + +\begin{center} +\begin{pspicture}(-4,-4)(4,5) +\psset{viewpoint=100 50 20 rtp2xyz,Decran=30,RotY=-30} +{\psset{lightintensity=1,linewidth=0.5\pslinewidth} +\psframe(-4,-4)(4,5) +\codejps{ + /L1 { + 0 0.25 10.93 [8 6] newcylindre + {-90 0 0 rotateOpoint3d} solidtransform + dup (White) outputcolors + } def +/L2 { L1 {0 0 -109.5 rotateOpoint3d} solidtransform } def +/L3 { L2 {0 -120 0 rotateOpoint3d} solidtransform } def +/L4 { L2 {0 120 0 rotateOpoint3d} solidtransform } def +/L12 { L1 L2 solidfuz} def +/L123 { L12 L3 solidfuz} def +/Liaisons { L123 L4 solidfuz} def + Liaisons drawsolid**}} +\psPoint(0,10.93,0){H1} +\psPoint(10.3,-3.64,0){H2} +\psPoint(-5.15,-3.64,8.924){H3} +\psPoint(-5.15,-3.64,-8.924){H4} +\uput[0](H1){$\mathrm{H_1}$} +\uput[l](H2){$\mathrm{H_2}$} +\uput[u](H3){$\mathrm{H_3}$} +\uput[d](H4){$\mathrm{H_4}$} +\pcline[offset=0.25]{|-|}(H2)(H3) +\pcline[offset=0.25]{<->}(H2)(H3) +\aput{:U}{17,8 pm} +\pcline[offset=0.15]{|-|}(H2)(O) +\pcline[offset=0.15]{<->}(H2)(O) +\aput{:U}{10,93 pm} +\axesIIID(3,3,3)(14,16,14) +\pspolygon[linestyle=dashed,linecolor=red](H1)(H2)(H3) +\psline[linestyle=dashed,linecolor=red](H4)(H1) +\psline[linestyle=dashed,linecolor=red](H4)(H2) +\psline[linestyle=dashed,linecolor=red](H4)(H3) +\psline[linestyle=dotted,linecolor=red](H4)(O) +\psline[linestyle=dotted,linecolor=red](H3)(O) +\psline[linestyle=dotted,linecolor=red](H2)(O) +\psline[linestyle=dotted,linecolor=red](H1)(O) +\pstMarkAngle[arrows=<->]{H1}{O}{H3}{\small 109,5$^{\mathrm{o}}$} +\end{pspicture} +\hfill +\begin{pspicture}(-4,-4)(4,5) +\psset{lightsrc=50 50 10,lightintensity=1,viewpoint=100 50 20 rtp2xyz,Decran=30,RotY=-30} +{% +\psset{linewidth=0.5\pslinewidth} +\psframe(-4,-4)(4,5) +\codejps{ + /H1 {2 [18 16] newsphere + {-90 0 0 rotateOpoint3d} solidtransform + {0 10.93 0 translatepoint3d} solidtransform + dup (White) outputcolors} def + /L1 { + 0 0.25 10 [12 10] newcylindre + {-90 0 0 rotateOpoint3d} solidtransform + dup (White) outputcolors + } def +/HL1{ H1 L1 solidfuz} def +/HL2 { HL1 {0 0 -109.5 rotateOpoint3d} solidtransform } def +/HL3 { HL2 {0 -120 0 rotateOpoint3d} solidtransform } def +/HL4 { HL2 {0 120 0 rotateOpoint3d} solidtransform } def + /C {3 [18 16] newsphere + {90 0 0 rotateOpoint3d} solidtransform + dup (gris) outputcolors} def +/HL12 { HL1 HL2 solidfuz} def +/HL123 { HL12 HL3 solidfuz} def +/HL1234 { HL123 HL4 solidfuz} def +/methane { HL1234 C solidfuz} def + methane drawsolid**} +\psPoint(0,10.93,0){H1} +\psPoint(10.3,-3.64,0){H2} +\psPoint(-5.15,-3.64,8.924){H3} +\psPoint(-5.15,-3.64,-8.924){H4}}% +\axesIIID(3,3,3)(14,16,14) +\pspolygon[linestyle=dashed,linecolor=red](H1)(H2)(H3) +\psline[linestyle=dashed,linecolor=red](H4)(H1) +\psline[linestyle=dashed,linecolor=red](H4)(H2) +\psline[linestyle=dashed,linecolor=red](H4)(H3) +\psline[linestyle=dotted,linecolor=red](H4)(O) +\psline[linestyle=dotted,linecolor=red](H3)(O) +\psline[linestyle=dotted,linecolor=red](H2)(O) +\psline[linestyle=dotted,linecolor=red](H1)(O) +\end{pspicture} +\end{center} + +The construction of the molecule is detailed in the document +\texttt{molecules.tex}. To add a dimensioning you only need to find +the vertices of the tetrahedron: +\begin{verbatim} +\psPoint(0,10.93,0){H1} +\psPoint(10.3,-3.64,0){H2} +\psPoint(-5.15,-3.64,8.924){H3} +\psPoint(-5.15,-3.64,-8.924){H4} +\end{verbatim} +and then use the power of the package \texttt{pst-node}. For the distances: +\begin{verbatim} +\pcline[offset=0.25]{<->}(H2)(H3) +\aput{:U}{17,8 pm} +\pcline[offset=0.15]{<->}(H2)(O) +\aput{:U}{10,93 pm} +\psPoint(-5.15,-3.64,-8.924){H4} +\end{verbatim} +Then, for the angles, we take help from the package \texttt{pst-eucl} +\begin{verbatim} +\pstMarkAngle[arrows=<->]{H1}{O}{H3}{\small 109,5$^{\mathrm{o}}$} +\end{verbatim} + +\endinput + diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-axes3D-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-axes3D-en.tex new file mode 100644 index 00000000000..97ffe24497e --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-axes3D-en.tex @@ -0,0 +1,49 @@ +\section{The \Index{axes} in 3d} + +The command \verb+\axesIIID[options](x1,y1,z1)(x2,y2,z2)+ draws the axes $Ox$, +$Oy$ and $Oz$ dashed from the origin $O$ to the coordinates +$(x_1,0,0)$ for the $x$-axis, $(0,y_1,0)$ for the $y$-axis and +$(0,0,z_1)$ for the $z$-axis and from there continues drawing the axes as lines to the points $(x_2,0,0)$, $(0,y_2,0)$ and $(0,0,z_2)$. + +The options are the following: +\begin{compactitem} + \item all colour options, line width as well as all types of arrows. + \item \texttt{\Lkeyword{labelsep}=length} which allows you to position the \Index{label} in a self defined distance away from the extremity of the arrow of the axis, the default value is \texttt{\Lkeyword{labelsep}=5pt}---this is a real distance in three dimensions and not on screen. + \item the choice of the labels on each of the axes with the option: \\ + \texttt{\Lkeyword{axisnames}={a,b,c}}, the default values are \texttt{\Lkeyword{axisnames}={x,y,z}}. + \item the potential to specify the style of the labels with the option: \\ + \texttt{\Lkeyword{axisemph}=}\verb+\boldmath\Large\color{red}+. By default there is no style predefined, + which means, if no style is chosen one will get \verb+$x$,$y$,$z$+. + \item \Lkeyword{showOrigin} is a Boolean, \texttt{true}---by default. If it is set to + \texttt{\Lkeyword{showOrigin}=false} the dashed lines aren't drawn to the origin anymore. + \item \Lkeyword{mathLabel} is a Boolean, \texttt{true}---by default, in which case the + math mode is activated. Set to \texttt{\Lkeyword{mathLabel}=false} the labels are set in text mode. +\end{compactitem} +\encadre{The \Index{labels} are placed at the extemities of the axes.} + +\begin{LTXexample}[width=5cm] +\begin{pspicture}(-2,-2)(3,3) +\psset{viewpoint=100 30 20,Decran=100} +\psSolid[object=cube,a=2, + action=draw*, + fillcolor=magenta!20] +\axesIIID[showOrigin=false](1,1,1)(3,2,2.5) +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=5cm] +\begin{pspicture}(-2,-1)(3,4) +\psset{viewpoint=100 45 20,Decran=100} +\psSolid[object=cylindre,h=2,r=1, + action=draw*,mode=4, + fillcolor=green!20] +\axesIIID[linewidth=1pt,linecolor=red,arrowsize=5pt, + arrowinset=0,axisnames={a,b,c}, + axisemph={\boldmath\Large\color{red}}, + labelsep=10pt] + (1,1,2)(2,2,3) +\end{pspicture} +\end{LTXexample} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-chanfrein-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-chanfrein-en.tex new file mode 100644 index 00000000000..c44e0a2e932 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-chanfrein-en.tex @@ -0,0 +1,53 @@ +\section{\Index{Chamfering} a solid} + +\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50} +\begin{LTXexample}[width=6cm] +\psset{unit=0.5} +\begin{pspicture*}(-4,-4)(4,4) +\psSolid[object=cube, + a=5, + fillcolor=red] +\end{pspicture*} +\end{LTXexample} + + +\begin{LTXexample}[width=6cm] +\psset{unit=0.5} +\begin{pspicture*}(-4,-4)(4,4) +\psSolid[object=cube, + a=5, + fillcolor=red, + chanfrein, + chanfreincoeff=.6] +\end{pspicture*} +\end{LTXexample} + +The option \Lkeyword{chanfrein} allows us to \Index{chamfer} a solid. This option +uses the key \Lkeyword{chanfreincoeff} (value $0.8$ by default) which indicates the +ratio $k$ with ($0<k<1$). This ratio is the one of a centre dilation with +the centre in the middle of the chosen face. + +\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=30} +\begin{LTXexample}[width=6cm] +\psset{unit=0.5} +\begin{pspicture*}(-4,-4)(4,4) +\psSolid[object=dodecahedron, + a=5, + fillcolor=cyan] +\end{pspicture*} +\end{LTXexample} + +\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=30} +\begin{LTXexample}[width=6cm] +\psset{unit=0.5} +\begin{pspicture*}(-4,-4)(4,4) +\psSolid[object=dodecahedron, + a=5, + fillcolor=cyan, + chanfrein, + chanfreincoeff=.8] +\end{pspicture*} +\end{LTXexample} +%\newpage + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-codejps-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-codejps-en.tex new file mode 100644 index 00000000000..f484a845a8c --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-codejps-en.tex @@ -0,0 +1,46 @@ +\section{The \Index{jps code}} + +\textit{jps code} contains all the PostScript code that is used by the library +developed for the software \textit{jps2ps}. + +The \texttt{solides.pro} file of the \texttt{solides3d} package +contains all the elements native +to that library, which contains about $4\, 500$~functions and +procedures. + +It allows us to have available some adapted commands in mathematical form, without +having to construct them with the primitives + \verb+moveto+, \verb+lineto+, \verb+curveto+, etc. + +For example, we can define a function $F$ with $F(t) = +(3\cos^3 t, 3\sin^3 t)$, and draw its curve +%I'm not sure of the distinction between the curve and the path, as you use it +with the \textit{jps code} \verb+0 360 {F} CourbeR2+. + +If we only want to have the path of that curve, we use the code +\verb+0 360 {F} CourbeR2_+, +and if we want to add this to the stack of points of the curve, +we use \verb+0 360 {F} CourbeR2++. + +In all of the $3$~examples below, the number of points is declared by the global +variable \Lkeyword{resolution}. + +In other words, with the \Index{function} $F$ named above and a fixed resolution of 36, the \textit{jps code} +\begin{verbatim} + 0 360 {F} CourbeR2+ +\end{verbatim} +is equivalent to the PostScript code +\begin{verbatim} + 0 10 360 { + /angle exch def + 3 angle cos 3 exp mul + 3 angle sin 3 exp mul + } for +\end{verbatim} + +We haven't yet developed documentation for the library hidden in the +\texttt{solides.pro} file. For the moment we refer the +\textit{Guide de l'utilisateur de jps2ps} for the interested user +available at the website \url{melusine.eu.org/syracuse/bbgraf}. + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-colorierfacettes-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-colorierfacettes-en.tex new file mode 100644 index 00000000000..0971fab7e7e --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-colorierfacettes-en.tex @@ -0,0 +1,194 @@ +\section{\Index{Colouring} some single faces} + +The key value \texttt{\Lkeyword{fcol}=$i_0$~($c_0$) $i_1$~($c_1$) \dots $i_n$~($c_n$)}, +where $i_k$ are integers and $c_k$ the names of the colours, permits to +specify a \Index{colour} for special \Index{faces}. +To the face with the index $i_k$ corresponds the colour $c_k$. The +integer $n$ must be lower than the maximum of the number of faces of the chosen solid. + + +%% L'option \texttt{[fcol=1 (OliveGreen) 0 (color1) 4 (color2) etc.]} +%% permet de sp\'{e}cifier dans l'ordre : +%% \begin{compactitem} +%% \item le num\'{e}ro de la facette de \texttt{0} \`{a} \texttt{n-1}, pour \texttt{n} facettes ; +%% \item la couleur de la facette. +%% \end{compactitem} + +The colour names $c_k$, there are $68$~predefined values, are defined names in the +\texttt{color.pro}. These values are: +\textsl{GreenYellow}, +\textsl{Yellow}, +\textsl{Goldenrod}, +\textsl{Dandelion}, +\textsl{Apricot}, +\textsl{Peach}, +\textsl{Melon}, +\textsl{YellowOrange}, +\textsl{Orange}, +\textsl{BurntOrange}, +\textsl{Bittersweet}, +\textsl{RedOrange}, +\textsl{Mahogany}, +\textsl{Maroon}, +\textsl{BrickRed}, +\textsl{Red}, +\textsl{OrangeRed}, +\textsl{RubineRed}, +\textsl{WildStrawberry}, +\textsl{Salmon}, +\textsl{CarnationPink}, +\textsl{Magenta}, +\textsl{VioletRed}, +\textsl{Rhodamine}, +\textsl{Mulberry}, +\textsl{RedViolet}, +\textsl{Fuchsia}, +\textsl{Lavender}, +\textsl{Thistle}, +\textsl{Orchid}, +\textsl{DarkOrchid}, +\textsl{Purple}, +\textsl{Plum}, +\textsl{Violet}, +\textsl{RoyalPurple}, +\textsl{BlueViolet}, +\textsl{Periwinkle}, +\textsl{CadetBlue}, +\textsl{CornflowerBlue}, +\textsl{MidnightBlue}, +\textsl{NavyBlue}, +\textsl{RoyalBlue}, +\textsl{Blue}, +\textsl{Cerulean}, +\textsl{Cyan}, +\textsl{ProcessBlue}, +\textsl{SkyBlue}, +\textsl{Turquoise}, +\textsl{TealBlue}, +\textsl{Aquamarine}, +\textsl{BlueGreen}, +\textsl{Emerald}, +\textsl{JungleGreen}, +\textsl{SeaGreen}, +\textsl{Green}, +\textsl{ForestGreen}, +\textsl{PineGreen}, +\textsl{LimeGreen}, +\textsl{YellowGreen}, +\textsl{SpringGreen}, +\textsl{OliveGreen}, +\textsl{RawSienna}, +\textsl{Sepia}, +\textsl{Brown}, +\textsl{Tan}, +\textsl{Gray}, +\textsl{Black}, +\textsl{White}. +The list of these $68$ colours is available in the command +\verb+\colorfaces+ (see an example in the section about +the grating of a cube). + +Thinking on that case, the number of the faces +$\mathtt{n_1\times n_2}+2\texttt{(outer faces inner faces)}$ +must be lower than 68! + +However users can define their own \Index{colours}. There are two methods: + +\begin{compactitem} +\item They can use one of the $4$~optional arguments \texttt{color1}, + \texttt{color2}, \texttt{color3}, \texttt{color4} from + \Lcs{psSolid}, then transmit to \Lkeyword{fcol} a pair of the type + $i$~\verb+(color1)+, where $i$ is the index of the chosen face. The + arguments \texttt{color1}, etc. are used in the same way as the + arguments from \Lkeyword{color} and \Lkeyword{incolor}.\hfill \break + A possible command could be the following: + \begin{verbatim} + \psSolid[a=1,object=cube,color1=red!60!yellow!20,fcol=0 (color1)]% + \end{verbatim} +\item They define their own colour names with the command + \verb+\pstVerb+, and then use these names with the argument + \Lkeyword{fcol}. For example: +\begin{verbatim} +\pstVerb{/hetre {0.764 0.6 0.204 setrgbcolor} def + /chene {0.568 0.427 0.086 setrgbcolor} def + /cheneclair {0.956 0.921 0.65 setrgbcolor} def + }% +\end{verbatim} +And therefore: +\begin{verbatim} +fcol=0 (hetre) 1 (chene) 2 (cheneclair) +\end{verbatim} +\end{compactitem} + + +The $4$~arguments +\verb+color1+, +\verb+color2+, +\verb+color3+, +\verb+color4+ have default values: +\begin{compactitem} + \item \textcolor{cyan!50}{color1=cyan!50} + \item \textcolor{magenta!60}{color2=magenta!60} + \item \textcolor{blue!30}{color3=blue!30} + \item \textcolor{red!50}{color4=red!50} +\end{compactitem} + + + + +\begin{LTXexample}[width=5cm] +\psset{Decran=20,viewpoint=10 5 10,unit=0.5} +\begin{pspicture}(-5,-5)(5,5) +\psSolid[ + fcol=0 (red) 1 (Aquamarine) 2 (Bittersweet) + 3 (ForestGreen) 4 (Goldenrod) + 13 (GreenYellow) + 40 (Mulberry), + object=cube,mode=3]% +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=4.9cm] +\psset{Decran=20,viewpoint=10 5 10,unit=0.5} +\begin{pspicture}(-5,-5)(5,5) +\psSolid[ + fcol=0 (red) 2 (Lavender) 3 (SkyBlue) 11 (LimeGreen) 12 (OliveGreen), + object=cylindre, + h=4, + ngrid=4 10](0,0,-2) +\end{pspicture} +\end{LTXexample} + +The choice of the faces to be coloured can be specified with some PostScript code, +\begin{verbatim} +fcol=48 {i (Black) i 1 add (LimeGreen) i 2 add (Yellow) /i i 3 add store} repeat +\end{verbatim} +which will alternately colour the faces in black, green and yellow. +\begin{center} +\begin{LTXexample}[width=6.5cm] +\begin{pspicture}(-3,-3)(3.5,2.5) +\psset{Decran=7.5,viewpoint=10 10 5} +\pstVerb{/iface 0 store}% +\psSolid[ +fcol=48 {iface (Black) + iface 1 add (LimeGreen) + iface 2 add (Yellow) /iface + iface 3 add store} repeat, + r1=4,r0=1, + object=tore, + ngrid=8 18, + RotY=30] +\end{pspicture} +\end{LTXexample} +\end{center} + +When the option \Lkeyword{hue} is activated, the faces of the solid are coloured with the nuance of the rainbow colours. + +\begin{LTXexample}[width=5.9cm] +\begin{pspicture}(-3,-2.5)(3,2.5) +\psset[pst-solides3d]{viewpoint=50 50 50,Decran=40,lightsrc=50 20 1e2} +\psSolid[r1=5,r0=1,object=tore,ngrid=16 18,hue=0 1]% +\end{pspicture} +\end{LTXexample} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-commandestrace-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-commandestrace-en.tex new file mode 100644 index 00000000000..939256bd115 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-commandestrace-en.tex @@ -0,0 +1,48 @@ +\section{Commands for drawing} + +The parameter for \Index{drawing} comes with the key value \Lkeyword{action} within the command +\Lcs{psSolid}. + +Four values are possible: +\begin{compactitem} +\item \Lkeyval{none}: nothing is drawn. +\item \Lkeyval{draw}: draws the solid as a framework and sets up dashed lines for the hidden edges. +\item \Lkeyval{draw*}: draws the solid with dashed lines for the hidden edges and colours the visible faces. +\item \Lkeyword{draw**}: draws the solid with a painting algorithm, without the + hidden edges and with colouration of the visible faces. +\end{compactitem} +\encadre{The key values \Lkeyval{draw} and \Lkeyword{draw*} only make sense for convex solids.} + +\begin{center} +%% + +\psset{viewpoint=50 -20 30 rtp2xyz} +%% +\hfil +\begin{pspicture}(-2.5,-2.5)(2.5,2.5) +\psframe(-2.5,-2.5)(2.5,2.5) +\psset{Decran=20} +\psSolid[object=cube,action=draw,RotZ=20]% +\rput(-1,-2){\texttt{draw}} +\end{pspicture} +\hfil +%% +\begin{pspicture}(-2.5,-2.5)(2.5,2.5) +\psframe(-2.5,-2.5)(2.5,2.5) +\psset{Decran=20} +\psSolid[object=cube,action=draw*,fillcolor=magenta!20,RotZ=20]% +\rput(-1,-2){\texttt{draw*}} +\end{pspicture} +\hfil +%% +\begin{pspicture}(-2.5,-2.5)(2.5,2.5) +\psframe(-2.5,-2.5)(2.5,2.5) +\psset{Decran=20} +\psSolid[object=cube,fillcolor=magenta!20,RotZ=20]% +\rput(-1,-2){\texttt{draw**}} +\end{pspicture} +\hfil +%% +\end{center} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-couleurs-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-couleurs-en.tex new file mode 100644 index 00000000000..ee33402a187 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-couleurs-en.tex @@ -0,0 +1,497 @@ +\section{Colours and the nuances of a colour} + +The key word \texttt{\Lkeyword{fillcolor}=colourname} allows us to specify the wanted colour for the outer faces of a solid. +The key word \texttt{\texttt{\Lkeyword{incolor}=colourname}} allows us to specify the wanted colour for the inner faces of a solid. + +The possible values for \textit{name} are those known to PSTricks (and particularly those of the package \texttt{xcolor}). + +We can directly use the colour nuances in the color schemes of +HSB, RGB or CMYK. In that case we use the key values \Lkeyval{hue}, +\Lkeyval{inhue} or \Lkeyval{inouthue} for the outer faces, the inner faces, or for all the faces. +The number of arguments \Lkeyval{hue} determines nuances. + +\subsection{Predefined \Index{colours} by the option \texttt{dvipsnames}} + +There are $68$~predefined \Index{colours}, which are identified by +\texttt{solides.pro}: \texttt{Black}, \texttt{White}, and the +$66$~colours below. + +\bgroup\centering +\newcommand{\colorcube}[1]{% +\begin{pspicture}(-1.2,-1)(1.2,1) +\psframe(-1.2,-1)(1.2,1) +\psset{viewpoint=50 50 20 rtp2xyz,Decran=150,lightsrc=viewpoint} +\psSolid[object=datfile, + file=data/cubecolor, + linewidth=0.07\pslinewidth, + linecolor=#1!50, + fillcolor=#1, + action=draw**] +\rput(0,-0.75){\footnotesize \texttt{#1}} +\end{pspicture} +} + +\parindent0pt +%\parskip-8pt +\colorcube{GreenYellow} +\colorcube{Yellow} +\colorcube{Goldenrod} +\colorcube{Dandelion} +\colorcube{Apricot} +\colorcube{Peach} + +\colorcube{Melon} +\colorcube{YellowOrange} +\colorcube{Orange} +\colorcube{BurntOrange} +\colorcube{Bittersweet} +\colorcube{RedOrange} + +\colorcube{Mahogany} +\colorcube{Maroon} +\colorcube{BrickRed} +\colorcube{Red} +\colorcube{OrangeRed} +\colorcube{RubineRed} + +\colorcube{WildStrawberry} +\colorcube{Salmon} +\colorcube{CarnationPink} +\colorcube{Magenta} +\colorcube{VioletRed} +\colorcube{Rhodamine} + +\colorcube{Mulberry} +\colorcube{RedViolet} +\colorcube{Fuchsia} +\colorcube{Lavender} +\colorcube{Thistle} +\colorcube{Orchid} + +\colorcube{DarkOrchid} +\colorcube{Purple} +\colorcube{Plum} +\colorcube{Violet} +\colorcube{RoyalPurple} +\colorcube{BlueViolet} + +\colorcube{Periwinkle} +\colorcube{CadetBlue} +\colorcube{CornflowerBlue} +\colorcube{MidnightBlue} +\colorcube{NavyBlue} +\colorcube{RoyalBlue} + +\colorcube{Blue} +\colorcube{Cerulean} +\colorcube{Cyan} +\colorcube{ProcessBlue} +\colorcube{SkyBlue} +\colorcube{Turquoise} + +\colorcube{TealBlue} +\colorcube{Aquamarine} +\colorcube{BlueGreen} +\colorcube{Emerald} +\colorcube{JungleGreen} +\colorcube{SeaGreen} + +\colorcube{Green} +\colorcube{ForestGreen} +\colorcube{PineGreen} +\colorcube{LimeGreen} +\colorcube{YellowGreen} +\colorcube{SpringGreen} + +\colorcube{OliveGreen} +\colorcube{RawSienna} +\colorcube{Sepia} +\colorcube{Brown} +\colorcube{Tan} +\colorcube{Gray} + +\egroup + +\subsection{Predefined \Index{colours} by the option \texttt{svgnames}} + +The following colours are known by PSTricks, when the option \texttt{svgnames} is given. +These ones are not identified by the file \texttt{solides.pro}: we can use them directly with the option \Lkeyword{fcol}. + +\bgroup +\newcommand{\colorcone}[1]{% +\begin{pspicture}(-1.2,-1)(1.2,1) +\psframe(-1.2,-1)(1.2,1) +\psset{viewpoint=50 50 20 rtp2xyz,Decran=150,lightsrc=viewpoint} +\psSolid[object=cone, + linewidth=0.07\pslinewidth, +% linecolor=#1!50, + fillcolor=#1, + ngrid=4 12, + r=0.2,h=0.37, + action=draw**](0,0,-0.05) +\rput(0,-0.75){\footnotesize \texttt{#1}} +\end{pspicture} +} + + +\parindent0pt +%\parskip-8pt + +These colours are delivered from the package \texttt{xcolor}. +\bigskip + +{\centering +\colorcone{AliceBlue} +\colorcone{AntiqueWhite} +\colorcone{Aqua} +\colorcone{Aquamarine} +\colorcone{Azure} +\colorcone{Beige} + +\colorcone{Bisque} +\colorcone{Black} +\colorcone{BlanchedAlmond} +\colorcone{Blue} +\colorcone{BlueViolet} +\colorcone{Brown} + +\colorcone{BurlyWood} +\colorcone{CadetBlue} +\colorcone{Chartreuse} +\colorcone{Chocolate} +\colorcone{Coral} +\colorcone{CornflowerBlue} + +\colorcone{Cornsilk} +\colorcone{Crimson} +\colorcone{Cyan} +\colorcone{DarkBlue} +\colorcone{DarkCyan} +\colorcone{DarkGoldenrod} + +\colorcone{DarkGray} +\colorcone{DarkGreen} +\colorcone{DarkGrey} +\colorcone{DarkKhaki} +\colorcone{DarkMagenta} +\colorcone{DarkOliveGreen} + +\colorcone{DarkOrange} +\colorcone{DarkOrchid} +\colorcone{DarkRed} +\colorcone{DarkSalmon} +\colorcone{DarkSeaGreen} +\colorcone{DarkSlateBlue} + +\colorcone{DarkSlateGray} +\colorcone{DarkSlateGrey} +\colorcone{DarkTurquoise} +\colorcone{DarkViolet} +\colorcone{DeepPink} +\colorcone{DeepSkyBlue} + +\colorcone{DimGray} +\colorcone{DimGrey} +\colorcone{DodgerBlue} +\colorcone{FireBrick} +\colorcone{FloralWhite} +\colorcone{ForestGreen} + +\colorcone{Fuchsia} +\colorcone{Gainsboro} +\colorcone{GhostWhite} +\colorcone{Gold} +\colorcone{Goldenrod} +\colorcone{Gray} + +\colorcone{Grey} +\colorcone{Green} +\colorcone{GreenYellow} +\colorcone{Honeydew} +\colorcone{HotPink} +\colorcone{IndianRed} + +\colorcone{Indigo} +\colorcone{Ivory} +\colorcone{Khaki} +\colorcone{Lavender} +\colorcone{LavenderBlush} +\colorcone{LawnGreen} + +\colorcone{LemonChiffon} +\colorcone{LightBlue} +\colorcone{LightCoral} +\colorcone{LightCyan} +\colorcone{LightGoldenrodYellow} +\colorcone{LightGray} + +\colorcone{LightGreen} +\colorcone{LightGrey} +\colorcone{LightPink} +\colorcone{LightSalmon} +\colorcone{LightSeaGreen} +\colorcone{LightSkyBlue} + +\colorcone{LightSlateGray} +\colorcone{LightSlateGrey} +\colorcone{LightSteelBlue} +\colorcone{LightYellow} +\colorcone{Lime} +\colorcone{LimeGreen} + +\colorcone{Linen} +\colorcone{Magenta} +\colorcone{Maroon} +\colorcone{MediumAquamarine} +\colorcone{MediumBlue} +\colorcone{MediumOrchid} + +\colorcone{MediumPurple} +\colorcone{MediumSeaGreen} +\colorcone{MediumSlateBlue} +\colorcone{MediumSpringGreen} +\colorcone{MediumTurquoise} +\colorcone{MediumVioletRed} + +\colorcone{MidnightBlue} +\colorcone{MintCream} +\colorcone{MistyRose} +\colorcone{Moccasin} +\colorcone{NavajoWhite} +\colorcone{Navy} + +\colorcone{OldLace} +\colorcone{Olive} +\colorcone{OliveDrab} +\colorcone{Orange} +\colorcone{OrangeRed} +\colorcone{Orchid} + +\colorcone{PaleGoldenrod} +\colorcone{PaleGreen} +\colorcone{PaleTurquoise} +\colorcone{PaleVioletRed} +\colorcone{PapayaWhip} +\colorcone{PeachPuff} + +\colorcone{Peru} +\colorcone{Pink} +\colorcone{Plum} +\colorcone{PowderBlue} +\colorcone{Purple} +\colorcone{Red} + +\colorcone{RosyBrown} +\colorcone{RoyalBlue} +\colorcone{SaddleBrown} +\colorcone{Salmon} +\colorcone{SandyBrown} +\colorcone{SeaGreen} + +\colorcone{Seashell} +\colorcone{Sienna} +\colorcone{Silver} +\colorcone{SkyBlue} +\colorcone{SlateBlue} +\colorcone{SlateGray} + +\colorcone{SlateGrey} +\colorcone{Snow} +\colorcone{SpringGreen} +\colorcone{SteelBlue} +\colorcone{Tan} +\colorcone{Teal} + +\colorcone{Thistle} +\colorcone{Tomato} +\colorcone{Turquoise} +\colorcone{Violet} +\colorcone{Wheat} +\colorcone{White} + +\colorcone{WhiteSmoke} +\colorcone{Yellow} +\colorcone{YellowGreen} + +} +\egroup + +\subsection{Nuances in the \Index{colour scheme} of \Index{HSB}, \Index{saturation} and maximum \Index{brilliance}} + +There are 2 key values: \texttt{\Lkeyword{hue}=$h_0$ $h_1$} where +the numbers $h_0$ and $h_1$ with $0\leq h_0 < h_1 \leq 1$ +respect the limits of the colour scheme of HSB. + + + +\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample}[width=7.5cm] +\psset{unit=1} +\begin{pspicture}(-4,-1.5)(3,1) +\psSolid[object=grille, + base=-3 5 -3 3, + linecolor=gray, + hue=0 1](0,0,0) +\end{pspicture} +\end{LTXexample} + + + +\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample}[width=7.5cm] +\psset{unit=1} +\begin{pspicture}(-4,-1.5)(3,1) +\psSolid[object=grille, + base=-3 5 -3 3, + linecolor=gray, + hue=0 .3](0,0,0) +\end{pspicture} +\end{LTXexample} + + + +\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample}[width=7.5cm] +\psset{unit=1} +\begin{pspicture}(-4,-1.5)(3,1) +\psSolid[object=grille, + base=-3 5 -3 3, + linecolor=gray, + hue=.5 .6](0,0,0) +\end{pspicture} +\end{LTXexample} + + +\subsection{Nuances in the \Index{colour scheme} of \Index{HSB}, \Index{saturation} and fixed \Index{brilliance}} + +There are 4 key values: \texttt{\Lkeyword{hue}=$h_0$ $h_1$ $s$ $b$} or +the numbers $h_0$ and $h_1$ with $0\leq h_0 < h_1 \leq 1$ +respect the limits of the colour scheme HSB and $s$ +and $b$ are the values for \texttt{saturation} and \texttt{brillance}. + +\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample}[width=7.5cm] +\psset{unit=1} +\begin{pspicture}(-4,-1.5)(3,1) +\psSolid[object=grille, + base=-3 5 -3 3, + linecolor=gray, + hue=0 1 .8 .7](0,0,0) +\end{pspicture} +\end{LTXexample} + + + + +\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample}[width=7.5cm] +\psset{unit=1} +\begin{pspicture}(-4,-1.5)(3,1) +\psSolid[object=grille, + base=-3 5 -3 3, + linecolor=gray, + hue=0 1 .5 1](0,0,0) +\end{pspicture} +\end{LTXexample} + +\subsection{Nuances in the \Index{colour scheme} of \Index{HSB}, gneral case} + +There are 7 key values: \texttt{\Lkeyword{hue}=$h_0$ $s_0$ $b_0$ $h_1$ $s_1$ +$b_1$ (hsb)} or the numbers $h_i$, $s_i$ and $b_i$ respecting the limits of the parameters of HSB. + + + +\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample}[width=7.5cm] +\psset{unit=1} +\begin{pspicture}(-4,-1.5)(3,1) +\psSolid[object=grille, + base=-3 5 -3 3, + linecolor=gray, + hue=0 .8 1 1 1 .7 (hsb)](0,0,0) +\end{pspicture} +\end{LTXexample} + +\subsection{Nuances in the \Index{colour scheme} of \Index{RGB}} + +There are 6 key values: \texttt{\Lkeyword{hue}=$r_0$ $g_0$ $b_0$ $r_1$ $g_1$ +$b_1$} or the numbers $r_i$, $g_i$ and $b_i$ respecting the limits of the $3$ parameters of RGB. + + + +\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample}[width=7.5cm] +\psset{unit=1} +\begin{pspicture}(-4,-1.5)(3,1) +\psSolid[object=grille, + base=-3 5 -3 3, + linecolor=gray, + hue=1 0 0 0 0 1](0,0,0) +\end{pspicture} +\end{LTXexample} + + +\subsection{Nuances in the \Index{colour scheme} of \Index{CMYK}} + +There are 8 key values: \texttt{\Lkeyword{hue}=$c_0$ $m_0$ $y_0$ $k_0$ $c_1$ $m_1$ +$y_1$ $k_1$} or the numbers $c_i$, $m_i$, $y_i$ and $k_i$ respecting the limits of the $4$ parameters of CMYK. + + + +\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample}[width=7.5cm] +\psset{unit=1} +\begin{pspicture}(-4,-1.5)(3,1) +\psSolid[object=grille, + base=-3 5 -3 3, + linecolor=gray, + hue=1 0 0 0 0 0 1 0](0,0,0) +\end{pspicture} +\end{LTXexample} + +\subsection{Nuances between 2 named colours} + +There are 2 key values +\texttt{\Lkeyword{hue}=(color1) (color2)} where +\texttt{color1} and \texttt{color2} are the names of colours known by \verb+solides.pro+. + + + +\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample}[width=7.5cm] +\psset{unit=1} +\begin{pspicture}(-4,-1.5)(3,1) +\psSolid[object=grille, + base=-3 5 -3 3, + linecolor=gray, + hue=(jaune) (CadetBlue)](0,0,0) +\end{pspicture} +\end{LTXexample} + +If we like to use some defined colours of \texttt{xcolor}, we use the +key values \texttt{color1}, \texttt{color2}, etc. from \Lcs{psSolid}. + +\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample}[width=7.5cm] +\psset{unit=1} +\begin{pspicture}(-4,-1.5)(3,1) +\psSolid[object=grille, + base=-3 5 -3 3, + linecolor=gray, + color1=red!50, + color2=green!20, + hue=(color1) (color2)](0,0,0) +\end{pspicture} +\end{LTXexample} + +\subsection{Deactivation of the colour application} +For specific purposes it is possible to disable the application of colour. +This is particularly the case, when an object is already memorized or defined in external files. + Within these configurations, if we do not deactivate the colours and + if we do not define some new colours, these will be the colours by default that overwrite the colours that were defined. + + +To deactivate the colour application we use the option +\Lkeyword{deactivatecolor}. + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-courbeR3-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-courbeR3-en.tex new file mode 100644 index 00000000000..b81d3af3207 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-courbeR3-en.tex @@ -0,0 +1,99 @@ +\section[Curves of functions from R in R\textsuperscript{3}]% +{Curves of functions from $\mathbb{R}$ in $\mathbb{R}^3$} %$ + +%% \section{Fonctions R --> R\textsuperscript{3}} + +The line of a defined \Index{function} calls the object \Lkeyval{courbe} and the option \Lkeyword{function}. +We can realize a helix in algebraic notation with the function: + +\begin{verbatim} +\defFunction[algebraic]{helice}(t){3*cos(4*t)}{3*sin(4*t)}{t} +\end{verbatim} + +\psset{lightsrc=10 -20 50,viewpoint=50 -20 20 rtp2xyz,Decran=50} +\begin{LTXexample}[width=6.5cm] +\psset{unit=0.5} +\begin{pspicture}(-6,-3)(6,8) +\psframe*[linecolor=blue!50](-6,-3)(6,8) +\psSolid[object=grille,base=-4 4 -4 4,linecolor=red,linewidth=0.5\pslinewidth]% +\axesIIID(0,0,0)(4,4,7) +\defFunction[algebraic]{helice}(t){3*cos(4*t)}{3*sin(4*t)}{t} +\psSolid[object=courbe, + r=0, + range=0 6, + linecolor=blue,linewidth=0.1, + resolution=360, + function=helice]% +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=6.5cm] +\psset{unit=0.5} +\begin{pspicture}(-6,-3)(6,8) +\psframe*[linecolor=blue!50](-6,-3)(6,8) +\psset{lightsrc=10 -20 50,viewpoint=50 -20 30 rtp2xyz,Decran=50} +\psSolid[object=grille,base=-4 4 -4 4,linecolor=red,linewidth=0.5\pslinewidth]% +\axesIIID(0,0,0)(4,4,7) +\psset{range=-4 4} +\defFunction{cosRad}(t){ t 2 mul Cos 4 mul }{ t }{ 0 } +\psSolid[object=courbe,linewidth=0.1, + r=0,linecolor=red, + resolution=360, + function=cosRad] +\psSolid[object=grille,base=-4 4 -4 4,linecolor=blue,linewidth=0.5\pslinewidth](0,0,3) +\psPoint(0,0,3){O1}\psPoint(0,0,7){Z1}\psline(O1)(Z1)\psline[linestyle=dashed](O1)(O) +\pstVerb{/tmin -4 def /tmax 4 def}% +\defFunction{sinRad}(t){ t }{ t Sin 3 mul }{ 3 } +\psSolid[object=courbe,linewidth=0.1, + r=0,linecolor=blue, + resolution=30, + function=sinRad] +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=6.5cm] +\psset{unit=0.5} +\begin{pspicture}(-6.5,-3)(7,11) +\psset{lightsrc=10 -20 50,viewpoint=50 -20 20 rtp2xyz,Decran=50} +\psSolid[object=grille,base=-4 4 -4 4, + linecolor=lightgray,linewidth=0.5\pslinewidth]% +\psSolid[object=grille,base=-4 4 0 8, + linecolor=lightgray,RotX=90, + linewidth=0.5\pslinewidth](0,4,0) +\psSolid[object=grille,base=-4 4 -4 4, + linecolor=lightgray,RotY=90, + linewidth=0.5\pslinewidth](-4,0,4) +\defFunction[algebraic]{helice}(t)% + {1.3*(1-cos(2.5*t))*cos(6*t)} + {1.3*(1-cos(2.5*t))*sin(6*t)}{t} +\defFunction[algebraic]{helice_xy}(t)% + {1.3*(1-cos(2.5*t))*cos(6*t)} + {1.3*(1-cos(2.5*t))*sin(6*t)}{0} +\defFunction[algebraic]{helice_xz}% + (t){1.3*(1-cos(2.5*t))*cos(6*t)}{4}{t} +\defFunction[algebraic]{helice_yz}% + (t){-4}{1.3*(1-cos(2.5*t))*sin(6*t)}{t} +\psset{range=0 8} +\psSolid[object=courbe,r=0,linecolor=blue, + linewidth=0.05,resolution=360, + normal=0 0 1,function=helice_xy] +\psSolid[object=courbe,r=0, + linecolor=green,linewidth=0.05, + resolution=360,normal=0 0 1, + function=helice_xz] +\psSolid[object=courbe,r=0, + linewidth=0.05,resolution=360, + normal=0 0 1,function=helice_yz] +\psSolid[object=courbe,r=0, + linecolor=red,linewidth=0.1, + resolution=360,function=helice] + \end{pspicture} +\end{LTXexample} + + +These last function lines are found in an animated form on the website: + +\centerline{\url{http://melusine.eu.org/syracuse/pstricks/pst-solides3d/animations/}} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-cylindres-cones-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-cylindres-cones-en.tex new file mode 100644 index 00000000000..2f5c695d14e --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-cylindres-cones-en.tex @@ -0,0 +1,276 @@ +\section{Generalization of the notion of a cylinder and a cone} + +\subsection{Cylinder or \Index{cylindric area}} + +This paragraph generalizes the notion of a cylinder, or a cylindric +area\footnote{This was written by +Maxime \textsc{Chupin}, as a result of a question on the list +\url{http://melusine.eu.org/cgi-bin/mailman/listinfo/syracuse}}. +A \textit{routing} curve has to be defined by a function and the +direction of the \textit{cylinder} axis needs to be arranged. In +the example below the routing curve is sinusoidal, situated in the plane $z=-2$: +\begin{verbatim} +\defFunction[algebraic]{G1}(t){t}{2*sin(t)}{-2} +\end{verbatim} +The direction of the cylinder is defined by the components of a vector +\texttt{\Lkeyword{axe}=0 1 1}. The drawing calls \Lkeyword{object}=\Lkeyval{cylindre} which +in addition to the usual parameters---which is the height \texttt{\Lkeyword{h}=4}--- +is about the \textbf{length of the generator} and not of the distance +between the two base planes, and needs to define the routing curve +\texttt{\Lkeyword{function}=G1} and the interval of the variable $t$ \texttt{\Lkeyword{range}=-3 3}. + +\begin{verbatim} +\psSolid[object=cylindre, + h=4,function=G1, + range=-3 3, + ngrid=3 16, + axe=0 1 1, + incolor=green!50, + fillcolor=yellow!50] +\end{verbatim} + + +\begin{center} +\psset{unit=0.75} +\begin{pspicture}(-5,-4)(5,4) +\psset{lightsrc=viewpoint,viewpoint=100 10 20 rtp2xyz,Decran=100} +\psSolid[object=grille,base=-4 4 -6 6,linecolor={[rgb]{0.72 0.72 0.5}},action=draw](0,0,-2) +\defFunction[algebraic]{G1}(t){t}{2*sin(t)}{-2} +\defFunction[algebraic]{G2}(t){t}{2*sin(t)+4}{2} +\psSolid[object=courbe,function=G1, + range=-3 3,r=0, + linecolor=blue, + linewidth=2pt] +\psSolid[object=cylindre, + h=5.65685,function=G1, + range=-3 3, + ngrid=3 16, + axe=0 1 1, + incolor=green!50, + fillcolor=yellow!50] +\psSolid[object=courbe,function=G2, + range=-3 3,r=0, + linecolor=blue, + linewidth=2pt] +\psSolid[object=parallelepiped, + a=8,b=12,c=4,action=draw](0,0,0) +\psSolid[object=plan,action=draw, + definition=equation, + args={[0 0 1 -2] 90}, + base=-6 6 -4 4,planmarks,showBase] +\psSolid[object=plan,action=draw, + definition=equation, + args={[0 1 0 -6] 180}, + base=-4 4 -2 2,planmarks,showBase] +\psSolid[object=plan,action=draw, + definition=equation, + args={[1 0 0 -4] 90}, + base=-6 6 -2 2,planmarks,showBase] +\psSolid[object=vecteur, + linecolor=red, + args=0 3 3] +\end{pspicture} +\end{center} + +In the following example, before drawing the horizontal planes, we calculate the +distance between these two planes. + + \begin{verbatim} +\pstVerb{/ladistance 2 sqrt 2 mul def} + \end{verbatim} + +{\psset{unit=0.75,lightsrc=viewpoint,viewpoint=100 -10 20 rtp2xyz,Decran=100} +\begin{LTXexample}[pos=t] +\begin{pspicture}(-1.5,-3)(6.5,6) +\psSolid[object=grille,base=-3 3 -1 8,action=draw] +\pstVerb{/ladistance 2 sqrt 2 mul def} +\defFunction[algebraic]{G3}(t){6*(cos(t))^3*sin(t)}{4*(cos(t))^2}{0} +\defFunction[algebraic]{G4}(t){6*(cos(t))^3*sin(t)}{4*(cos(t))^2+ladistance}{ladistance} +\psSolid[object=courbe,function=G3,range=0 6.28,r=0,linecolor=blue,linewidth=2pt] +\psSolid[object=cylindre,range=0 -6.28,h=4,function=G3,axe=0 1 1,ngrid=3 36, + fillcolor=green!50,incolor=yellow!50] +\psSolid[object=courbe,function=G4,range=0 6.28,r=0,linecolor=blue,linewidth=2pt] +\psSolid[object=vecteur,linecolor=red,args=0 ladistance dup] +\psSolid[object=plan,action=draw,definition=equation,args={[0 0 1 ladistance neg] 90}, + base=-1 8 -3 3,planmarks,showBase] +\axesIIID(0,4.5,0)(4,8,5) +\rput(0,-3){\texttt{axe=0 1 1}} +\end{pspicture} +\end{LTXexample}} + + +\begin{LTXexample}[width=8cm] +\psset{unit=0.75,lightsrc=viewpoint, + viewpoint=100 -10 20 rtp2xyz,Decran=100} +\begin{pspicture}(-1.5,-3)(6.5,6) +\psSolid[object=grille,base=-3 3 -1 6,action=draw] +\defFunction[algebraic]{G5}(t) + {t}{0.5*t^2}{0} +\defFunction[algebraic]{G6}(t) + {t}{0.5*t^2}{4} +\psSolid[object=courbe,function=G5, + range=-3 2,r=0,linecolor=blue, + linewidth=2pt] +\psSolid[object=cylindre, + range=-3 2,h=4, + function=G5, + axe=0 0 1, %% valeur par d\'{e}faut + incolor=green!50, + fillcolor=yellow!50, + ngrid=3 8] +\psSolid[object=courbe,function=G6, + range=-3 2,r=0,linecolor=blue, + linewidth=2pt] +\axesIIID(0,4.5,0)(4,6,5) +\psSolid[object=vecteur, + linecolor=red,args=0 0 4] +\psSolid[object=plan,action=draw, + definition=equation, + args={[0 0 1 -4] 90}, + base=-1 6 -3 3,planmarks,showBase] +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=8cm] +\psset{unit=0.75,lightsrc=viewpoint, + viewpoint=100 -10 20 rtp2xyz,Decran=100} +\begin{pspicture}(-3.5,-3)(6.5,6) +\psset{lightsrc=viewpoint,viewpoint=100 45 45,Decran=100} +\psSolid[object=grille,base=-3 3 -2 7,fillcolor=gray!30] +\defFunction[algebraic]{G7}(t) + {2*cos(t)}{2*sin(t)}{0} +\defFunction[algebraic]{G8}(t) + {2*cos(t)}{2*sin(t)+4}{4} +\psSolid[object=courbe,function=G7, + range=0 6.28,r=0, + linecolor=blue,linewidth=2pt] +\psSolid[object=cylindre, + range=0 6.28,h=5.65685, + function=G7,axe=0 1 1, + incolor=green!20, + fillcolor=yellow!50, + ngrid=3 36] +\psSolid[object=courbe,function=G8, + range=0 6.28,r=0,linecolor=blue, + linewidth=2pt] +\axesIIID(2,4.5,2)(4,8,5) +\psSolid[object=vecteur, + linecolor=red,args=0 1 1](0,4,4) +\psSolid[object=plan,action=draw, + definition=equation, + args={[0 0 1 -4] 90}, + base=-2 7 -3 3,planmarks,showBase] +\end{pspicture} +\end{LTXexample} + + +\encadre{The routing curve can be any curve and need not necessarily be a plane horizontal.} + +\begin{LTXexample}[width=8cm] +\begin{pspicture}(-3.5,-2)(4,5) +\psset{unit=0.75,lightsrc=viewpoint,viewpoint=100 -5 10 rtp2xyz,Decran=100} +\psSolid[object=grille,base=-4 4 -4 4,ngrid=8. 8.](0,0,-1) +\defFunction[algebraic]{G9}(t) + {3*cos(t)}{3*sin(t)}{1*cos(5*t)} +\psSolid[object=cylindre, + range=0 6.28,h=5,function=G9, + axe=0 0 1,incolor=green!50, + fillcolor=yellow!50, + ngrid=4 72,grid] +\end{pspicture} +\end{LTXexample} + +\subsection{Cone or \Index{conic area}} +This paragraph generalizes the notion of a cone, or a conic +area\footnote{This was written by +Maxime \textsc{Chupin}, as the result of a question on the list +\url{http://melusine.eu.org/cgi-bin/mailman/listinfo/syracuse}}. +A \textit{routing} curve needs to be defined by a function which +defines the base of the cone, and the vertex of the \textit{cone} +which is by default \texttt{\Lkeyword{origine}=0 0 0}. The parts above and +below the cone are symmetric concerning the vertice. In the example +below, the routing curve is a parabolic arc, situated in the plane $z=-2$. + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3,-4)(4.5,6) +\psset{unit=0.75,lightsrc=viewpoint,viewpoint=100 10 10 rtp2xyz,Decran=100} +\psSolid[object=grille,base=-4 4 -3 3,action=draw](0,0,-2) +\defFunction[algebraic]{G1}(t){t}{0.25*t^2}{-2} +\defFunction[algebraic]{G2}(t){-t}{-0.25*t^2}{2} +\psSolid[object=courbe,function=G1, + range=-3.46 3,r=0, + linecolor=blue,linewidth=2pt] +\psSolid[object=cone,function=G1, + range=-3.46 3,ngrid=3 16, + incolor=green!50, + fillcolor=yellow!50, + origine=0 0 0] +\psSolid[object=courbe, + function=G2,range=-3.46 3, + r=0,linecolor=blue, + linewidth=2pt] +\psPoint(0,0,0){I} +\uput[l](I){\red$(0,0,0)$} +\psdot[linecolor=red](I) +\gridIIID[Zmin=-2,Zmax=2,spotX=r](-4,4)(-3,3) +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3,-4)(4.5,6) +\psset{unit=0.7,lightsrc=viewpoint,viewpoint=100 -10 20 rtp2xyz,Decran=100} +\psSolid[object=grille,base=-4 4 -3 3, + linecolor={[rgb]{0.72 0.72 0.5}},action=draw](0,0,-2) +\defFunction[algebraic]{G1}(t){t}{2*sin(t)}{-2} +\defFunction[algebraic]{G2}(t){-t}{-2*sin(t)}{2} +\psSolid[object=courbe,function=G1, + range=-3.14 3.14,r=0, + linecolor=blue, + linewidth=2pt] +\psSolid[object=cone,function=G1, + range=-3.14 3.14,ngrid=3 16, + incolor=green!50, + fillcolor=yellow!50, + origine=0 0 0] +\psSolid[object=courbe, + function=G2,range=-3.14 3.14, + r=0,linecolor=blue, + linewidth=2pt] +\psPoint(0,0,0){I} \uput[l](I){\red$(0,0,0)$} +\psdot[linecolor=red](I) +\gridIIID[Zmin=-2,Zmax=2,spotX=r](-4,4)(-3,3) +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3,-4)(4.5,6) +\psset{unit=0.7,lightsrc=viewpoint,viewpoint=100 -10 20 rtp2xyz,Decran=100} +\psSolid[object=grille,base=-4 4 -4 4,linecolor={[rgb]{0.72 0.72 0.5}},action=draw](0,0,-2) +\defFunction[algebraic]{G1}(t){t}{2*sin(t)}{-2} +\defFunction[algebraic]{G2}(t){-t}{-2*sin(t)-2}{2} +\psSolid[object=courbe,function=G1, + range=-3.14 3.14,r=0, + linecolor=blue, + linewidth=2pt] +\psSolid[object=cone, + function=G1,range=-3.14 3.14, + ngrid=3 16,incolor=green!50, + fillcolor=yellow!50, + origine=0 -1 0] +\psSolid[object=courbe, + function=G2,range=-3.14 3.14, + r=0,linecolor=blue, + linewidth=2pt] +\psPoint(0,-1,0){I}\uput[l](I){\red$(0,-1,0)$} +\psdot[linecolor=red](I) +\gridIIID[Zmin=-2,Zmax=2,spotX=r](-4,4)(-4,4) +\end{pspicture} +\end{LTXexample} + +\encadre{For the cones as well, the routing curve can be any curve and need not necessarily +be a plane horizontal curve, as the following example, written by Maxime +\textsc{Chupin}, will show.} + +\centerline{\url{http://melusine.eu.org/lab/bpst/pst-solides3d/cone/cone-dir_02.pst}} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-datfile-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-datfile-en.tex new file mode 100644 index 00000000000..112592b4607 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-datfile-en.tex @@ -0,0 +1,162 @@ +\section{Using the data file types \texttt{.obj} and \texttt{.off}} + +Sometimes it will helpful to use external files, either for reading or writing. +When there is a solid which needs a long time to be calculated and which +will be tested in different views or different colors, it is very +interesting to save them externally and then only reread them by +avoiding the time expensive recalculations. In particular, this technique +is often used to generate some animations. +One can also export a solid by that method to reuse with another software. + +For \texttt{pst-solides3d}, all the procedures of reading$/$writing are +delegated to the PostScript interpreter (and not to \TeX {} or \LaTeX). + Consequently it is not the \LaTeX{} compilation that will cause the + execution of reading$/$writing, but the visualisation of the PostScript + file that is produced. + +Generally the reading of external files by a PostScript interpreter doesn't +cause any trouble normally. The writing of files however, can cause some +security problems and it is often the case that the PostScript viewer forbids +the writing by default. So the system must be configured to get authorisation for that writing. + +\encadre{By default, under Windows and Linux, the security of files on the +hard drive is activated and doesn't allow to write on the drive. +To deactivate that security option, more or less temporarily, here the two +corresponding procedures: + +\begin{description} + + \item[Linux:] The advice from Jean-Michel \textsc{Sarlat}: the simplest will + be to use GhostScript directly, within the console. As there is no image to wait for: + +\$$>$ gs -dNOSAFER monfichier.ps quit.ps + \item[Windows:] Within the menue \texttt{Options}, the option + \textsf{Security of files} must be turned to unchecked. +\end{description}} + + +\subsection{\texttt{\Index{.dat}} files (specific to \texttt{pst-solides3d})} + +In \texttt{pst-solides3d}, the data structure used for a solid has 4 fields. +It can be stored in a set of $4$ +\texttt{.dat} files. + + +\subsubsection{Writing \texttt{.dat} files} + +One uses the action \Lkeyword{writesolid} within \Lcs{psSolid}, and one +uses the option \Lkeyword{file} to specify the name of the file. + +For example, let's look at the code below: +\begin{verbatim} +\psSolid[object=tore, + file=montore, + action=writesolid] +\end{verbatim} + +The command chain +\Cadre{LaTeX->dvips->GSview (Windows) or gv (Linux)} +first compiles, then transforms into PostScript to finally get +visualised. + +That last operation creates 4 files: +\begin{compactitem} + \item \texttt{montore-sommets.dat } $\rightarrow$ the list of the vertices; + \item \texttt{montore-faces.dat } $\rightarrow$ the list of the faces; + \item \texttt{montore-couleurs.dat } $\rightarrow$ the colors of the faces; + \item \texttt{montore-io.dat } $\rightarrow$ the limits of the indices + of the external and internal faces. +\end{compactitem} +\encadre{All these four files will automatically be saved within the same folder as the generating file.} + +\subsubsection{Reading \texttt{.dat} files} + +We use the object \Lkeyword{datfile} of \Lcs{psSolid}, with the argument +\Lkeyword{file} to specify the name. +Now the code +\begin{verbatim} +\psSolid[object=datfile, file=montore] +\end{verbatim} +will allow us to use the object---now saved in the \texttt{.dat} files generated--- +as described in the previous paragraph. + +\subsection{\texttt{.obj} files} + +We use only a simplified form of the \texttt{.obj} format. In particular, the +files should not contain a character like +\verb+#+ (the character for a comment in that format). + +This format just uses a single file and permits within this file to specify +the vertices and the faces. + +\subsubsection{Writing \texttt{\Index{.obj}} files} + +One uses the action \Lkeyword{writeobj} in \Lcs{psSolid}, and one uses +the option \Lkeyword{file} to specify the name of the file. + +For example, the code below: +\begin{verbatim} +\psSolid[object=tore, + file=montore, + action=writeobj] +\end{verbatim} +will produce a single file \texttt{montore.obj} (after compilation and +visualisation of the \texttt{.ps} that was produced). + +\subsubsection{Reading \texttt{.obj} files} + +One uses the option \Lkeyword{objfile} of \Lcs{psSolid}, with the argument +\Lkeyword{file} to specify the name of the file. +Now the following code +\begin{verbatim} +\psSolid[object=objfile, file=montore] +\end{verbatim} +will allow to use the object---now saved in the \texttt{.obj} file generated---as +described in the previous paragraph. + +\begin{LTXexample}[width=6cm] +\psset{viewpoint=20 15 10 rtp2xyz,Decran=20} +\begin{pspicture}(-3,-4)(3,3) +\psframe*[linecolor=cyan!50](-3,-4)(1,3) +\psSolid[object=objfile, + unit=20,RotX=60, + file=data/rocket]% +\end{pspicture} +\end{LTXexample} + + + +\subsection{\texttt{.off} files} + +We use only a simplified form of the \texttt{.off} format. In particular, these +files only comprise \verb+v+ and \verb+f+ entries. + +This format just uses a single file and permits within this file to specify the +vertices and the faces. + +\subsubsection{Writing \texttt{\Index{.off}} files} + +We use the action \Lkeyword{writeobj} in \Lcs{psSolid}, and we use the option + \Lkeyword{file} to specify the name of the file. + +For example the code below: +\begin{verbatim} +\psSolid[object=tore, + file=montore, + action=writeoff] +\end{verbatim} +will produce the \texttt{montore.off} file (after compilation and +visualisation of the \texttt{.ps} that was produced). + +\subsubsection{Reading.off files} + +We use the option \Lkeyword{offfile} of \Lcs{psSolid}, with the argument +\Lkeyword{file} to specify the name of the file. +Now the following code +\begin{verbatim} +\psSolid[object=offfile, file=montore] +\end{verbatim} +will allow to use the object---now saved in the \texttt{.off} file +generated---like described in the previous paragraph. + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-definirfonction-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-definirfonction-en.tex new file mode 100644 index 00000000000..91d8b208546 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-definirfonction-en.tex @@ -0,0 +1,61 @@ +\section{Defining a function} + +It is possible to define \Index{functions} usable in a PostScript environment. + +The domain can be $\mathbb{R}$, $\mathbb{R}^2$ +or $\mathbb{R}^3$, and the codomain can be $\mathbb{R}$, $\mathbb{R}^2$ or $\mathbb{R}^3$. + +The definition is made with the macro \verb+\defFunction+. This macro comes with six +arguments, where the first is optional. + + +\verb!\defFunction[<options>]{<name>}(<var>){<x(var)>}{<y(var)>}{<z(var)>}! + +\begin{table}[h] +\begin{tabular}{p{2cm}p{11cm}} +\verb!<options>! & We insert the options typical to PSTricks, like +\verb!linewidth! etc., and, some of them defined by +\verb!pst-solides3d!. A very nice and helpful option is \verb!algebraic!, +with which one can avoid RPN (Reverse Polish +Notation). All the options are key value pairs separated with commas.\\ + +\verb!<name>! & This is a unique name of your choice---but be careful: avoid +names that contain accents, PostScript doesn't like them at all.\\ + +\verb!<var>! & We insert at most three variables, arbitrarily chosen and separated with commas.\\ + +\verb!<x(var)>! \verb!<y(var)>! \verb!<z(var)>! & +Here, we place functions defining the three Euclidean components $x,\,y,\,z$. +If one of the three components is not wanted, just enter a 0 within + parentheses---this will also allow you to define some projections of the lines of functions. +\end{tabular} +\end{table} + +Once you have defined a function, this function is always called by its chosen name \verb!<name>!. + +Here some examples: +\begin{compactitem} +\item \verb!\defFunction{moncercle}(t){t cos 3 mul}{0}{t sin 3 mul}! + + draws a circle with radis 3 in the $xOz$ plane (notation RPN). + \item \verb!\defFunction[algebraic]{helice}(t){cos(t)}{sin(t)}{t}! + + draws a helix in algebraic notation. + \item \verb!\defFunction[algebraic]{F}(t){t}{}{}! + + draws a function from $\mathbb{R}$ in $\mathbb{R}$ + \item \verb!\defFunction[algebraic]{F}(t){t}{t}{}! + + draws a function from $\mathbb{R}$ in $\mathbb{R}^2$ + \item \verb!\defFunction[algebraic]{F}(t){t}{t}{t}! + + draws a function from $\mathbb{R}$ in $\mathbb{R}^3$ + +\end{compactitem} + +There remains work to be done on this macro. For the moment it does not permit an arbitrary +choice of names of variables, as this risks conflict with existing names. Please use +names analogous to those used in the documentation. A good strategy is to systematically use +one or more numerical characters at the end of the names of your variables. + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-definirplanquelconque-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-definirplanquelconque-en.tex new file mode 100644 index 00000000000..5d58437c67d --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-definirplanquelconque-en.tex @@ -0,0 +1,631 @@ +\section{Defining a \Index{projection plane}} + +The \Index{plane} of projection is defined with the option +\texttt{\Lkeyword{plan}=plantype} which expects an argument \textit{type of +plane}. The creation of such an argument invariably happens +through the command \verb+\psSolid[object=plan]+ (see the relevant +paragraph of chapter 4 and the example below in sub-paragraph +\textit{Labels\/} of the paragraph \textit{Points}). +\endinput + +\section{Specifying a general projection plane} + +To define a plane of projection, we assume that the drawing to be +projected resides on the plane $Oxy$, and the user has to specify +the images of the origin $O$ and the basis $\overrightarrow{\imath}$, +$\overrightarrow{\jmath}$, and $\overrightarrow{k}$. +If they wish to abbreviate the syntax, users are required at most +to specify the image of $O$ and the image of $\overrightarrow{k}$, +in other words the image of the origin and the components of the +normal to the plane of projection. + +The package then suggests an orientation of the plane of +projection. If users are not happy with this orientation, they can +specify it themselves. + +The following paragraphs detail the proposed syntax. + + +\subsection{The origin} + +\texttt{(x,y,z)} are the projected coordinates of the origin of +the plane, which are either numerical values or expressions that +PostScript can handle. + + +\texttt{\textbackslash psProjection[\ldots](1,2,3)} positions the +origin of the plane at the coordinates $(1,2,3)$. + + +\texttt{\textbackslash psProjection[\ldots](0.5 0.5 add,2 sqrt,1.5 2 +exp)} positions the origin of the plane at the coordinates +$(1,\sqrt{2},1.5^2)$. + + +If no coordinates are chosen (by the end of the command), it is +interpreted as $(0,0,0)$, placing the origin at $O$. + + +\subsection{Defining the normal to a plane} + +There are four ways to define a normal to a plane, two of which +have an option to rotate the coordinate system of the plane around +that normal: \Lkeyword{normal} + +\subsubsection{Method 1: giving the components of the normal vector} + + +In this case \texttt{\Lkeyword{normal}=nx ny nz}, the argument consists of +3 values: the components of the normal vector. For example +\texttt{\Lkeyword{normal}=0 0 1} for the plane $Oxy$. + +\newpage + +\begin{LTXexample}[width=6.5cm] +\psset{unit=0.5} +\begin{pspicture}(-9,-6.5)(6,6) +\psframe*[linecolor=blue!50](-6,-6)(6,6) +\psset{lightsrc=10 -20 50,viewpoint=50 20 30 rtp2xyz,Decran=50} +{\psset{linewidth=0.5\pslinewidth,linecolor=gray} +\psSolid[object=grille,base=-4 4 -4 4]} +\defFunction[algebraic]{f1}(x){3*cos(x)}{3*sin(x)}{} +\psProjection[object=courbeR2, + range=-3.14 3.14, + linecolor=blue, + normal=0 0 1, + function=f1] +\axesIIID(0,0,0)(4,4,4) +\psProjection[object=chemin, + linewidth=.1, + linecolor=red, + normal=1 0 0, + path=newpath + 0 0 smoveto + -1 0 slineto] +\rput(0,-6.75){% + \psframebox[linecolor=blue!50] + {\texttt{$\backslash${}defFunction[algebraic]% + \{f\}(x)\{3*cos(x)\}\{3*sin(x)\}\{\}}}} +\end{pspicture} +\end{LTXexample} + +\newpage +If we call +$\big(\overrightarrow{i}(1,0,0),\overrightarrow{j}(0,1,0),\overrightarrow{k}(0,0,1)\big)$ +the basis of the referencing coordinate system and if +$\big(\overrightarrow{I},\overrightarrow{J},\overrightarrow{K}\big)$ +is the basis of the coordinate system of the plane to be defined, +with $\overrightarrow{K}$ being the chosen normal vector, then the +following relations are verified and should be kept in mind: +\begin{enumerate} + \item $\overrightarrow{J}=\overrightarrow{K}\wedge \overrightarrow{i}$ + \item $\overrightarrow{I}=\overrightarrow{J}\wedge \overrightarrow{K}$ +\end{enumerate} +If $\overrightarrow{K}=\overrightarrow{i}$ then +$\overrightarrow{J}=\overrightarrow{j}$ + +\encadre{With the convention: $\overrightarrow{K}$ is drawn in + red, $\overrightarrow{J}$ in blue and $\overrightarrow{I}$ in green.} %$ + +\vfill +\begin{minipage}{0.27\linewidth} +\psset{unit=0.4} +\centerline{\texttt{[normal=0 0 1]}} + +\begin{pspicture}(-6,-6)(4,7)% +\psframe*[linecolor=blue!50](-6,-6)(6,6) +\psset{lightsrc=10 -20 50,viewpoint=50 20 30 rtp2xyz,Decran=60} +{\psset{linewidth=0.5\pslinewidth,linecolor=gray} +\psSolid[object=grille,base=-4 4 -4 4]} +\axesIIID(0,0,0)(4,4,4) +\psProjection[object=chemin, + linewidth=.2, + linecolor=red, + normal=1 0 0, + path=newpath + 0 0 smoveto + -1 0 slineto] +\psProjection[object=chemin, + linewidth=.2, + linecolor=blue, + normal=0 0 1, + path=newpath + 0 0 smoveto + 0 1 slineto] +\psProjection[object=chemin, + linewidth=.2, + linecolor=green, + normal=0 0 1, + path=newpath + 0 0 smoveto + 1 0 slineto] +\end{pspicture} +\end{minipage} +\hfill +\begin{minipage}{0.27\linewidth} +\psset{unit=0.4} +\centerline{\texttt{[normal=1 0 0]}} + +\begin{pspicture}(-6,-6)(4,7) +\psframe*[linecolor=blue!50](-6,-6)(6,6) +\psset{lightsrc=50 20 30,viewpoint=50 20 30,Decran=70} +{\psset{linewidth=0.5\pslinewidth,linecolor=gray} +\psSolid[object=grille,base=-4 4 -4 4,RotY=90]} +\axesIIID(0,0,0)(4,4,4) +\psProjection[object=chemin, + linewidth=.2, + linecolor=green, + normal=1 0 0, + path=newpath + 0 0 smoveto + 1 0 slineto] +\psProjection[object=chemin, + linewidth=.2, + linecolor=blue, + normal=1 0 0, + path=newpath + 0 0 smoveto + 0 1 slineto] +\psProjection[object=chemin, + linewidth=.2, + linecolor=red, + normal=0 0 1, + path=newpath + 0 0 smoveto + 1 0 slineto] +\end{pspicture} +\end{minipage} +\hfill +\begin{minipage}{0.27\linewidth} +\psset{unit=0.4} + +\centerline{\texttt{[normal=0 1 0]}} + +\begin{pspicture}(-6,-6)(4,7) +\psframe*[linecolor=blue!50](-6,-6)(6,6) +\psset{lightsrc=50 60 30,viewpoint=50 60 30,Decran=70} +{\psset{linewidth=0.5\pslinewidth,linecolor=gray} +\psSolid[object=grille,base=-4 4 -4 4,RotX=-90]} +\axesIIID(0,0,0)(4,4,4) +\psProjection[object=chemin, + linewidth=.2, + linecolor=green, + normal=0 1 0, + path= + newpath + 0 0 smoveto + 1 0 slineto] +\psProjection[object=chemin, + linewidth=.2, + linecolor=blue, + normal=0 1 0, + path= + newpath + 0 0 smoveto + 0 1 slineto] +\psProjection[object=chemin, + linewidth=.2, + linecolor=red, + normal=0 0 1, + path= + newpath + 0 0 smoveto + 0 1 slineto] +\end{pspicture} +\end{minipage} + +\vfill + +\begin{minipage}{0.27\linewidth} +\psset{unit=0.4} +\centerline{\texttt{[normal=1 0 1]}} + +\begin{pspicture}(-6,-6)(4,7)% +\psframe*[linecolor=blue!50](-6,-6)(6,6) +\psset{lightsrc=50 20 20,viewpoint=50 20 20,Decran=70} +{\psset{linewidth=0.5\pslinewidth,linecolor=gray} +\psSolid[object=grille,base=-4 4 -4 4] +\psSolid[object=grille,base=-4 0 -4 4,RotY=90] +\psSolid[object=grille,base=-2 2 -4 4,RotY=45,linecolor=red](1.414,0,1.414)} +\psPoint(2,0,2){O1}%\psdot(O1) +\axesIIID(2.8,3,2.8)(4,4,4) +\psPoint(1.414,0,1.414){O1}\psPoint(2.414,0,2.414){OK} +\psline[linewidth=.2,linecolor=red](O1)(OK) +\psProjection[object=chemin, + linewidth=.2, + linecolor=blue, + normal=1 0 1, + path= + newpath + 0 0 smoveto + 0 1 slineto](1.414,0,1.414) +\psProjection[object=chemin, + linewidth=.2, + linecolor=green, + normal=1 0 1, + path= + newpath + 0 0 smoveto + 1 0 slineto](1.414,0,1.414) +\end{pspicture} +\end{minipage} +\hfill +\begin{minipage}{0.27\linewidth} +\psset{unit=0.4} +\centerline{\texttt{[normal=0 1 1]}} + +\begin{pspicture}(-6,-6)(4,7)% +\psframe*[linecolor=blue!50](-6,-6)(6,6) +\psset{lightsrc=30 20 20,viewpoint=30 20 20,Decran=45} +{\psset{linewidth=0.5\pslinewidth,linecolor=gray} +\psSolid[object=grille,base=-4 4 -4 4] +\psSolid[object=grille,base=-4 0 -4 4,RotY=90,RotZ=90] +\psSolid[object=grille,base=-4 4 -2 2,RotX=-45,linecolor=red](0,1.414,1.414)} +\axesIIID(2.8,3,2.8)(4,4,4) +\psPoint(0,1.414,1.414){O1}\psPoint(0,2.414,2.414){OK} +\psline[linewidth=.2,linecolor=red](O1)(OK) +\psProjection[object=chemin, + linewidth=.2, + linecolor=blue, + normal=0 1 1, + path= + newpath + 0 0 smoveto + 0 1 slineto](0,1.414,1.414) +\psProjection[object=chemin, + linewidth=.2, + linecolor=green, + normal=0 1 1, + path= + newpath + 0 0 smoveto + 1 0 slineto](0,1.414,1.414) +\end{pspicture} +\end{minipage} +\hfill +\begin{minipage}{0.27\linewidth} +\psset{unit=0.4} +\centerline{\texttt{[normal=1 1 0]}} + +\begin{pspicture}(-6,-6)(4,7)% +\psframe*[linecolor=blue!50](-6,-6)(6,6) +\psset{lightsrc=30 20 20,viewpoint=30 20 20,Decran=45} +{\psset{linewidth=0.5\pslinewidth,linecolor=gray} +\psSolid[object=grille,base=0 2 -4 4,RotY=90,RotZ=45,linecolor=red] + (1.414,1.414,0) +\psSolid[object=grille,base=-4 4 -4 4] +\psSolid[object=grille,base= -2 0 -4 4,RotY=90,RotZ=45,linecolor=red] + (1.414,1.414,0)} +\axesIIID(2.8,2.8,1)(4,4,4) +\psPoint(1.414,1.414,0){O1}\psPoint(2.414,2.414,0){OK} +\psline[linewidth=.2,linecolor=red](O1)(OK) +\psProjection[object=chemin, + linewidth=.2, + linecolor=blue, + normal=1 1 0, + path= + newpath + 0 0 smoveto + 0 1 slineto](1.414,1.414,0) +\psProjection[object=chemin, + linewidth=.2, + linecolor=green, + normal=1 1 0, + path= + newpath + 0 0 smoveto + 1 0 slineto](1.414,1.414,0) +\end{pspicture} +\end{minipage} + +\vfill + +\newpage + +\subsubsection{Method 2: giving the components of the normal vector and an angle +of rotation} + +In this case \texttt{\Lkeyword{normal}=nx ny nz A}, the argument takes four +values: the components of the normal vector and the angle of +rotation (in degrees) around that axis. + +\begin{center} +\begin{minipage}{0.34\linewidth} +\psset{unit=0.5} +\centerline{\texttt{[normal=1 0 1]}} + +\begin{pspicture}(-6,-6)(6,7)% +\psframe*[linecolor=blue!50](-6,-6)(6,6) +\psset{lightsrc=50 20 20,viewpoint=50 20 20,Decran=70} +{\psset{linewidth=0.5\pslinewidth,linecolor=gray} +\psSolid[object=grille,base=-4 4 -4 4] +\psSolid[object=grille,base=-4 0 -4 4,RotY=90] +\psSolid[object=grille,base=-2 2 -4 4,RotY=45,linecolor=red](1.414,0,1.414)} +\psPoint(2,0,2){O1}%\psdot(O1) +\axesIIID(2.8,3,2.8)(4,4,4) +\psPoint(1.414,0,1.414){O1}\psPoint(2.414,0,2.414){OK} +\psline[linewidth=.2,linecolor=red](O1)(OK) +\psProjection[object=chemin, + linewidth=.2, + linecolor=blue, + normal=1 0 1, + path= + newpath + 0 0 smoveto + 0 1 slineto](1.414,0,1.414) +\psProjection[object=chemin, + linewidth=.2, + linecolor=green, + normal=1 0 1, + path= + newpath + 0 0 smoveto + 1 0 slineto](1.414,0,1.414) +\defFunction[algebraic]{fonction}(x){cos(x)}{x}{} +\psProjection[object=courbeR2, + range=-4 4, + normal=1 0 1, + function=fonction](1.414,0,1.414) +\end{pspicture} +\end{minipage} +\hfil +\begin{minipage}{0.34\linewidth} +\psset{unit=0.5} +\centerline{\texttt{[normal=1 0 1 45]}} + +\begin{pspicture}(-6,-6)(6,7)% +\psframe*[linecolor=blue!50](-6,-6)(6,6) +\psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70} +{\psset{linewidth=0.5\pslinewidth,linecolor=gray} +\psSolid[object=grille,base=-4 4 -4 4,action=draw] +\psSolid[object=grille,base=-4 4 -4 4,RotY=90,action=draw]} +\axesIIID(0,0,0)(4,4,4) +\psPoint(1.414,0,1.414){O1}\psPoint(2.414,0,2.414){OK} +\psline[linewidth=.2,linecolor=red](O1)(OK) +\psProjection[object=chemin, + linewidth=.02, + linecolor=red, + normal=1 0 1 45, + path=newpath + -2 1 2 + {-4 smoveto + 0 8 srlineto} for + -4 1 4 + {-2 exch smoveto + 4 0 srlineto} for + ](1.414,0,1.414) +\psProjection[object=chemin, + linewidth=.2, + linecolor=blue, + normal=1 0 1 45, + path= + newpath + 0 0 smoveto + 0 1 slineto](1.414,0,1.414) +\psProjection[object=chemin, + linewidth=.2, + linecolor=green, + normal=1 0 1 45, + path= + newpath + 0 0 smoveto + 1 0 slineto](1.414,0,1.414) +\defFunction[algebraic]{fonction}(x){cos(x)}{x}{} +\psProjection[object=courbeR2, + range=-4 4, + normal=1 0 1 45 , + function=fonction](1.414,0,1.414) +\end{pspicture} +\end{minipage} +\end{center} + +%\newpage +In the second figure, the normal (represented in red) is identical +to the one in the first figure, but the plane is rotated 45 +degrees around that normal. + + +\subsubsection{Method 3: defining the normal by the images of \textit{i} + and \textit{k}} + +In this case \texttt{\Lkeyword{normal}=ix iy iz kx ky kz}, the argument +takes six values: the components of the images of +$\overrightarrow{i}$ and $\overrightarrow{k}$, with: +$\overrightarrow{J}=\overrightarrow{K}\wedge \overrightarrow{I}$. + +\begin{center} +\begin{minipage}{0.34\linewidth} +\psset{unit=0.5} +\centerline{\texttt{[normal=0 1 0 1 0 0]}} + +\begin{pspicture}(-6,-6)(6,7)% +\psframe*[linecolor=blue!50](-6,-6)(6,6) +\psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70} +{\psset{linewidth=0.5\pslinewidth,linecolor=gray} +\psSolid[object=grille,base=-4 4 -4 4]% +\psSolid[object=grille,base=-4 4 -4 4,action=draw,RotX=90,RotZ=90]}% +\defFunction[algebraic]{fonction}(x){x}{x*sin(x)}{} +\axesIIID(0,0,0)(4,4,4) +\psProjection[object=chemin, + linewidth=.1, + linecolor=green, + normal=0 1 0 1 0 0, + path= + newpath + 0 0 smoveto + 1 0 slineto] +\psProjection[object=chemin, + linewidth=.1, + linecolor=blue, + normal=0 1 0 1 0 0, + path= + newpath + 0 0 smoveto + 0 1 slineto] +\psProjection[object=chemin, + linewidth=.2, + linecolor=red, + normal=0 0 1, + path= + newpath + 0 0 smoveto + 1 0 slineto] +\psProjection[object=courbeR2, + range=-4 4, + linecolor=green, + normal=0 1 0 1 0 0, + function=fonction] +\end{pspicture} +\end{minipage} +\hfil +\begin{minipage}{0.34\linewidth} +\psset{unit=0.5} +\centerline{\texttt{[normal=-1 1 0 1 1 2 ]}} + +\begin{pspicture}(-6,-6)(6,7)% +\psframe*[linecolor=blue!50](-6,-6)(6,6) +\psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70} +{\psset{linewidth=0.5\pslinewidth,linecolor=gray} +\psSolid[object=grille,base=-4 4 -4 4]}% +\defFunction[algebraic]{fonction}(x){x}{x*sin(x)}{} +\axesIIID(0,0,0)(4,4,4) +\psProjection[object=chemin, + linewidth=.1, + linecolor=green, + normal=-1 1 0 1 1 2 , + path= + newpath + 0 0 smoveto + 1 0 slineto] +\psProjection[object=chemin, + linewidth=.1, + linecolor=blue, + normal=-1 1 0 1 1 2 , + path= + newpath + 0 0 smoveto + 0 1 slineto] +\psPoint(0,0,0){O}\psPoint(0.4,0.4,0.8){K} +\psline[linewidth=.1,linecolor=red](O)(K) +\psProjection[object=courbeR2, + range=-4 4, + linecolor={[cmyk]{1,0,1,0.5}}, + normal=-1 1 0 1 1 2 , + function=fonction] +\psProjection[object=chemin, + linewidth=.02, + linecolor=red, + normal=-1 1 0 1 1 2, + path=newpath + -4 1 4 + {-4 exch smoveto + 8 0 srlineto} for + -4 1 4 + {-4 smoveto + 0 8 srlineto} for] +\end{pspicture} +\end{minipage} +\end{center} + + +\newpage +\subsubsection{Method 4: defining the normal by the images of + \textit{i}, \textit{k} and an angle of rotation} + +In this case \texttt{\Lkeyword{normal}=ix iy iz kx ky kz phi}, the argument +takes seven values: the components of the images of +$\overrightarrow{i}$, $\overrightarrow{k}$ and the angle of +rotation (in degrees) around the normal, with: +$\overrightarrow{J}=\overrightarrow{K}\wedge \overrightarrow{I}$. + +\begin{center} +\begin{minipage}{0.34\linewidth} +\psset{unit=0.5} +\centerline{\texttt{[normal=0 1 0 1 0 0 90]}} + +\begin{pspicture}(-6,-6)(6,7)% +\psframe*[linecolor=blue!50](-6,-6)(6,6) +\psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70} +{\psset{linewidth=0.5\pslinewidth,linecolor=gray} +\psSolid[object=grille,base=-4 4 -4 4]% +\psSolid[object=grille,base=-4 4 -4 4,action=draw,RotX=90,RotZ=90]}% +\defFunction[algebraic]{fonction}(x){x}{x*sin(x)}{} +\axesIIID(0,0,0)(4,4,4) +\psProjection[object=chemin, + linewidth=.1, + linecolor=green, + normal=0 1 0 1 0 0 90, + path= + 0 0 smoveto + 1 0 slineto] +\psProjection[object=chemin, + linewidth=.1, + linecolor=blue, + normal=0 1 0 1 0 0 90, + path= + 0 0 smoveto + 0 1 slineto] +\psProjection[object=chemin, + linewidth=.2, + linecolor=red, + normal=0 0 1, + path= + 0 0 smoveto + 1 0 slineto] +\psProjection[object=courbeR2, + range=-4 4, + linecolor=green, + normal=0 1 0 1 0 0 90, + function=fonction] +\end{pspicture} +\end{minipage} +\hfil +\begin{minipage}{0.34\linewidth} +\psset{unit=0.5} +\centerline{\texttt{[normal=-1 1 0 1 1 2 90]}} + +\begin{pspicture}(-6,-6)(6,7)% +\psframe*[linecolor=blue!50](-6,-6)(6,6) +\psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70} +{\psset{linewidth=0.5\pslinewidth,linecolor=gray} +\psSolid[object=grille,base=-4 4 -4 4]}% +\defFunction[algebraic]{fonction}(x){x}{x*sin(x)}{} +\axesIIID(0,0,0)(4,4,4) +\psProjection[object=chemin, + linewidth=.1, + linecolor=green, + normal=-1 1 0 1 1 2 90, + path=newpath + 0 0 smoveto + 1 0 slineto] +\psProjection[object=chemin, + linewidth=.1, + linecolor=blue, + normal=-1 1 0 1 1 2 90, + path=newpath + 0 0 smoveto + 0 1 slineto] +\psPoint(0,0,0){O}\psPoint(0.4,0.4,0.8){K} +\psline[linewidth=.1,linecolor=red](O)(K) +\psProjection[object=courbeR2, + range=-4 4, + linecolor={[cmyk]{1,0,1,0.5}}, + normal=-1 1 0 1 1 2 90, + function=fonction] +\psProjection[object=chemin, + linewidth=.02, + linecolor=red, + normal=-1 1 0 1 1 2, + path=newpath + -4 1 4 + {-4 exch smoveto + 8 0 srlineto} for + -4 1 4 + {-4 smoveto + 0 8 srlineto} for] +\end{pspicture} +\end{minipage} +\end{center} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-definitionmaillage-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-definitionmaillage-en.tex new file mode 100644 index 00000000000..0649345a7a1 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-definitionmaillage-en.tex @@ -0,0 +1,202 @@ +\section{Definition of grating} + +The user can specify the \Index{grating} of the solid with the option +\Lkeyword{ngrid} within the command \Lcs{psSolid}. + +For the objects +\Lkeyval{cube}, +\Lkeyval{prisme}, +\Lkeyval{prismecreux}, +the syntax is \Lkeyword{ngrid}=$n_1$ where $n_1$ represents the number of vertical \Index{gridlines}. + +For the objects +\Lkeyval{cylindre}, +\Lkeyval{cylindrecreux}, +\Lkeyval{cone}, +\Lkeyval{conecreux}, +\Lkeyval{tronccone}, +\Lkeyval{troncconecreux}, +%%\verb+tore+, +the syntax is \texttt{\Lkeyword{ngrid}=$n_1$~$n_2$} where $n_1$ is an integer greater or equal +to 1 ($2$ for \Lkeyval{tore}) representing the number of the vertical gridlines, and $n_2$ is an integer +representing the number of divisions on the circle. + +For the object +\Lkeyval{sphere}, +the syntax is \texttt{\Lkeyword{ngrid}=$n_1$~$n_2$} where $n_1$ is an integer, representing the number of divisions on the vertical axis, and +$n_2$ is an integer representing the number of divisions on the circle +horizontally. + +For the object +\Lkeyval{tore}, +the syntax is \texttt{\Lkeyword{ngrid}=$n_1$~$n_2$} where $n_1$ and $n_2$ +are integers. + +Here are some examples: + +\subsection{The cube} + +\begin{center} +\psset{unit=0.4} +\begin{pspicture}(-7,-7)(7,7) +%\psframe(-7,-7)(7,7) +\psset[pst-solides3d]{viewpoint=50 40 20,Decran=50,lightsrc=10 10 10} +\psSolid[a=8,object=cube,ngrid=4,fillcolor=yellow]% +%\psSolid[a=8,object=cube,linewidth=2pt,action=draw]% +\psPoint(0,0,0){O} +%\uput[r](O){$O$} +\psPoint(0,0,4){Ak} +\psPoint(0,0,8){Az} +\uput[u](Az){$z$} +\psPoint(4,0,0){Ai} +\psPoint(8,0,0){Ax} +\uput[u](Ax){$x$} +\psPoint(0,4,0){Aj} +\psPoint(0,8,0){Ay} +\uput[dr](Ay){$y$} +\psPoint(4,-4,0){A1} +\psPoint(4,4,0){A2} +\psPoint(-4,4,0){A3} +\psPoint(-4,-4,0){A4} +\uput[dr](Ay){$y$} +%\psline[linestyle=dashed](O)(Ai) +%\psline[linestyle=dashed](O)(Aj) +%\psline[linestyle=dashed](O)(Ak) +\psline[linecolor=green,arrowsize=2mm,arrowinset=0.2]{->}(Aj)(Ay) +\psline[linecolor=blue,arrowsize=2mm,arrowinset=0.2]{->}(Ai)(Ax) +\psline[linecolor=red,arrowsize=2mm,arrowinset=0.2]{->}(Ak)(Az) +\psdot[linecolor=green](Aj) +\psdot[linecolor=blue](Ai) +\psdot[linecolor=red](Ak) +\end{pspicture} +\hfill +\begin{pspicture}(-7,-7)(7,7) +%\psframe(-7,-7)(7,7) +\psset[pst-solides3d]{viewpoint=50 45 10 rtp2xyz,Decran=40,lightsrc=30 45 0} +\psSolid[a=8,object=cube,ngrid=3,fcol=\colorfaces,RotY=45,RotX=30,RotZ=20]% +\end{pspicture} +\end{center} + + +For the first example, the grid is fixed to $4\times4$ +facettes/faces and the command is the following: +\begin{verbatim} +\psSolid[a=8,object=cube,ngrid=4,fillcolor=yellow]% +\end{verbatim} +In the second example, the face grid is set to $3\times3$ +and the colours of the faces are different. +We use the package +\texttt{arrayjob} to easily save the colours: +\begin{verbatim} +\newarray\colors +\readarray{colors}{% + Apricot&Aquamarine% + etc.} +\end{verbatim} +The list of the colours is given by the command: +\begin{verbatim} +\edef\colorfaces{}% +\multido{\i=0+1}{67}{% + \checkcolors(\i) + \xdef\colorfaces{% + \colorfaces\i\space(\cachedata)\space} + } +\end{verbatim} +One sets up:~\Lkeyword{fcol}\verb+=\colorfaces+. +The gridded cube now is called with: +\begin{verbatim} +\psSolid[a=8,object=cube,ngrid=3,% + fcol=\colorfaces, + RotY=45,RotX=30,RotZ=20]% +\end{verbatim} +The option \Lkeyword{grid} suppresses the drawing of the gridlines. + + +\subsection{Sphere} + +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-3)(3,3) +\psset{viewpoint=50 50 20 rtp2xyz,Decran=50,lightsrc=viewpoint} +\psset{color1=cyan,color2=red} +\psSolid[ + fcol=251 (OliveGreen) 232 (color1) 214 (color2), + object=sphere, + ngrid=16 18, + RotX=180,RotZ=30]% +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-3)(3,3) +\psset{viewpoint=50 50 20 rtp2xyz,Decran=50,lightsrc=viewpoint} +\psset{color1=cyan,color2=red} +\psSolid[ + action=draw*, + fcol=0 (OliveGreen) 2 (color1) 3 (color2), + object=sphere, + ngrid=4 4, + RotX=180,RotZ=30]% +\end{pspicture} +\end{LTXexample} + +\subsection{Cylinders} + +\begin{LTXexample}[width=6cm] + +\begin{pspicture}(-3,-4)(3,4) +\psset{viewpoint=50 50 20 rtp2xyz,Decran=50,lightsrc=viewpoint} +\psset{color1=cyan,color2=red} +\psSolid[ + fcol=0 (OliveGreen) 2 (color1) 3 (color2), + h=5,r=2, + object=cylindrecreux, + ngrid=4 30, + RotZ=30 +](0,0,-2.5) +\end{pspicture} +\end{LTXexample} +% +\begin{LTXexample}[width=7cm] +\begin{pspicture}(-3,-4)(4,4) +\psset{viewpoint=50 50 20 rtp2xyz,Decran=50,lightsrc=viewpoint} +\psset{color1=cyan,color2=red} +\psSolid[ + action=draw*, + fcol=0 (OliveGreen) 2 (color1) 3 (color2), + h=5,r=2, + object=cylindre, + ngrid=2 12, + RotY=-20 +](0,0,-2.5) +\end{pspicture} +\end{LTXexample} + + + +\subsection{Torus} + +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-2)(3,2) +\psset{viewpoint=50 50 30 rtp2xyz,Decran=25,lightsrc=viewpoint} +\psSolid[r1=2.5,r0=1.5, + object=tore, + ngrid=4 36, + fillcolor=green!30, + action=draw**]% +\axesIIID(4,4,0)(5,5,4) +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-2)(3,2) +\psset{viewpoint=50 50 30 rtp2xyz,Decran=25,lightsrc=viewpoint} +\psSolid[r1=3.5,r0=1, + object=tore, + ngrid=9 18, + fillcolor=magenta!30, + action=draw**]% +\axesIIID(4.5,4.5,0)(5,5,4) +\end{pspicture} +\end{LTXexample} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-eclairageponctuel-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-eclairageponctuel-en.tex new file mode 100644 index 00000000000..2a7423a4124 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-eclairageponctuel-en.tex @@ -0,0 +1,144 @@ +\newpage +\section{Lighting by a point light source} + +Two parameters, the first one positions the \Index{light source}, the second one sets the \Index{light intensity}: +\begin{compactitem} + \item \Lkeyword{lightsrc}=20 30 50 in Cartesian coordinates, or +\texttt{\Lkeyword{lightsrc}=\Lkeyval{viewpoint}} to put the light source at the view point. + \item \texttt{\Lkeyword{lightintensity}=2} (default value). +\end{compactitem} +\begin{center} +\newcommand\LIGHTSRC[3]{% +\pstVerb{ + /xLIGHTSRC #1 def + /yLIGHTSRC #2 def + /zLIGHTSRC #3 def + /RADIUS 4 def + /THETA yLIGHTSRC xLIGHTSRC atan def + /DISTANCE xLIGHTSRC dup mul yLIGHTSRC dup mul add zLIGHTSRC dup mul add sqrt def + /PHI zLIGHTSRC DISTANCE div arcsin def + /ALPHA RADIUS DISTANCE div arccos def + /OH ALPHA cos RADIUS mul def + /radius_cone ALPHA sin RADIUS mul def + /Hauteur_cone DISTANCE OH sub def + /X_C xLIGHTSRC OH mul DISTANCE div def + /Y_C yLIGHTSRC OH mul DISTANCE div def + /Z_C zLIGHTSRC OH mul DISTANCE div def + /rotX_axe_cone PHI 90 sub def + /rotZ_axe_cone THETA 90 sub def + } +\psset{Decran=50,viewpoint=50 10 15} +\psSolid[object=sphere,r=RADIUS,fillcolor=blue,ngrid=18 36, + lightsrc=xLIGHTSRC yLIGHTSRC zLIGHTSRC](0,0,0) +\psPoint(xLIGHTSRC,yLIGHTSRC,zLIGHTSRC){LS} +\psset{lightsrc=} +\psSolid[object=cone,r=radius_cone,h=Hauteur_cone,fillcolor=yellow!50, + ngrid=1 36,RotX=rotX_axe_cone,RotZ=rotZ_axe_cone,opacity=0.5, + linecolor=yellow](X_C,Y_C,Z_C) +\psdot(LS)} + +\begin{pspicture}(-2,-2.5)(5,5) +\psset{unit=0.5} +\LIGHTSRC{0}{8}{8} +\uput[45](LS){Light Source} +\axesIIID(4,4,4)(6,6,6) +\end{pspicture} +\begin{pspicture}(-4,-2.5)(5,2.5) +\psset{unit=0.5} +\LIGHTSRC{2}{-5}{0} +\uput[l](LS){Light Source} +\axesIIID(4,4,4)(6,6,6) +\end{pspicture} + +\begin{pspicture}(-1,-2.5)(9,2.5) +\psset{unit=0.5} +\LIGHTSRC{0}{20}{0} +\uput[r](LS){Light Source} +\axesIIID(4,4,4)(6,6,6) +\end{pspicture} +\end{center} + +As you can see, the intersecting \Index{plane} (section of the sphere with the cone of +\Index{light}) divides the object into two half spaces: the first half space +(the one on the side of the \Index{light source}) is illuminated and the other half space is the shadow region referring to this light source position. + +Now it is clear, that if the view point is setup with the same coordiates as the light source, the object is illuminated uniquely. + +\encadre{In order to get some shadow regions to appear in the graphic---which emphasises the 3D character---we would suggest choosing the light source and the view point differently.} + +\newpage +Here follow a few examples: + +\begin{pspicture}(-3,-2)(3,3) +\psset{unit=0.3} +\psset{Decran=1e3, + viewpoint=500 0 1000, + lightsrc=10 20 30,mode=3} +\psSolid[object=sphere,r=5,fillcolor=blue](0,0,8) +\rput(0,-3.5){\texttt{lightsrc=10 20 30}} +\end{pspicture} +\begin{pspicture}(-3,-2)(3,3) +\psset{unit=0.3} +\psset{Decran=1e3, + viewpoint=500 0 1000, + lightsrc=-10 -20 30,mode=3} +\psSolid[object=sphere,r=5,fillcolor=blue](0,0,8) +\rput(0,-3.5){\texttt{lightsrc=-10 -20 30}} +\end{pspicture} +\begin{pspicture}(-3,-2)(3,3) +\psset{unit=0.3} +\psset{Decran=1e3, + viewpoint=500 0 1000, + lightsrc=30 -20 30,mode=3} +\psSolid[object=sphere,r=5,fillcolor=blue](0,0,8) +\rput(0,-3.5){\texttt{lightsrc=30 -20 30}} +\end{pspicture} + +When the option \verb+[lightsrc=value1 value2 value3]+ +is not specified, the object is uniformly illuminated. + +\begin{center} + \begin{pspicture}(-6,-2)(6,2) +%\psframe(-6,-4)(6,4) +\psset{viewpoint=50 50 30 rtp2xyz,Decran=40,unit=0.6} +\psSolid[object=datfile,file=data/tore1836,deactivatecolor] + %\psSolid[r1=3.5,r0=1,object=tore,ngrid=18 36,fillcolor={[rgb]{.372 .62 .628}}]% + \axesIIID(0,4.5,0)(6,6,4) + \end{pspicture} +\end{center} + + + +Here are some examples, where we always keep the same object, the same view point, the same light +source coordinates and just vary the \Lkeyword{lightintensity} value: + +\begin{pspicture}(-3,-2)(3,3) +\psset{unit=0.3} +\psset{Decran=1e3, + viewpoint=500 0 1000, + lightsrc=-10 -20 30,mode=4,lightintensity=1} +\psSolid[object=sphere,r=5,fillcolor=green](0,0,8) +\rput(0,-3.5){\texttt{lightintensity=2}} +\end{pspicture} +\begin{pspicture}(-3,-2)(3,3) +\psset{unit=0.3} +\psset{Decran=1e3, + viewpoint=500 0 1000, + lightsrc=-10 -20 30,mode=4,lightintensity=3} +\psSolid[object=sphere,r=5,fillcolor=green](0,0,8) +\rput(0,-3.5){\texttt{lightintensity=3}} +\end{pspicture} +\begin{pspicture}(-3,-2)(3,3) +\psset{unit=0.3} +\psset{Decran=1e3, + viewpoint=500 0 1000, + lightsrc=-10 -20 30,mode=4,lightintensity=8} +\psSolid[object=sphere,r=5,fillcolor=green](0,0,8) +\rput(0,-3.5){\texttt{lightintensity=8}} +\end{pspicture} + +Here we can see, that by increasing the \Lkeyword{lightintensity} value, the shading nuances of the solid are decreasing. + + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-enleverfacettes-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-enleverfacettes-en.tex new file mode 100644 index 00000000000..584dda32490 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-enleverfacettes-en.tex @@ -0,0 +1,32 @@ +\section{Removing faces} + +The key value \texttt{\Lkeyword{rm}=1 2 8} allows to suppress the drawing of the +faces with the index numbers 1, 2 and 8, to be able to have a look inside a \Index{hollow} solid. + +\begin{LTXexample}[width=5cm] +\psset{Decran=12,grid=true,viewpoint=15 10 15} +\begin{pspicture}(-2.5,-2.5)(2.5,2.5) +\psSolid[object=cylindrecreux, + ngrid=2 6, + h=6,r=2, + fillcolor=green!60, + incolor=yellow!50, + RotZ=-60, + rm=1 3 6,](0,0,-3) +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=5cm] +\psset{Decran=12,grid=true,viewpoint=15 10 15} +\begin{pspicture}(-2.5,-2.5)(2.5,2.5) +\psSolid[object=troncconecreux, + rm=1 12 13 14, + r0=3,r1=1,h=6, + fillcolor=green!60, + incolor=yellow, + mode=3](0,0,-3) +\end{pspicture} +\end{LTXexample} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-extensions-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-extensions-en.tex new file mode 100644 index 00000000000..d07b4ce825b --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-extensions-en.tex @@ -0,0 +1,47 @@ +\section{Creating your own object} +It is possible to create your own object in a separate file and +import it into the list of objects recognized by +\texttt{pst-solides3d}. Create a text file with the extension of \texttt{.pro} +(myObj.pro) and enter the PostScript commands to define your +\texttt{pst-solides3d} object. + +Reference your \texttt{.pro} file in the preamble with +\begin{verbatim} + \pstheader{myObj.pro} +\end{verbatim} +Following this line, add this new object to the list of objects recognized by \texttt{pst-solides3d} +with +\begin{verbatim} + \addtosolideslistobject{myObj} +\end{verbatim} + +For some examples of this technique, see the following web pages: + +\centerline{\url{http://melusine.eu.org/syracuse/mluque/solides3d2007/cristaux/}} + +\centerline{\url{http://melusine.eu.org/syracuse/mluque/solides3d2007/rhombicuboctaedre/}} + + +\section{Creating a \texttt{.u3d} file} + +You can manipulate 3D objects created with \texttt{pst-solides3d}; +the following three steps are necessary: +\begin{enumerate} +\item Save your designed 3D object in the \texttt{.off} or + \texttt{.obj} format---see the chapter ``\textit{Usage of external files}''. + +\item Then use, for example, \textit{Meshlab}---an open source software---(\url{http://meshlab.sourceforge.net/}) to convert these files + into the \texttt{.u3d} format. + +\item The {\LaTeX} package \texttt{movie15} of Alexander \textsc{Grahn} embeds + files in the \texttt{.u3d} format into a PDF document, the document can then be viewed + using $\text{Adobe}^{\text{\tiny\circledR}}$ $\text{Reader}^{\text{\tiny\circledR}}$ 7 or later. +\end{enumerate} + +You will find some examples on the following web pages: + +\centerline{\url{http://melusine.eu.org/syracuse/mluque/solides3d2007/pdf3d/}} + +\centerline{\url{http://melusine.eu.org/syracuse/mluque/solides3d2007/zeolithes/}} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-face-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-face-en.tex new file mode 100644 index 00000000000..336a8e24599 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-face-en.tex @@ -0,0 +1,59 @@ +\section{One- and two-sided solids} + +The contour of \Lkeyword{face} is defined in the plane $Oxy$ by +\begin{verbatim} +\psSolid[object=face,base=x1 y1 x2 y2 x3 y3 ...xn yn](0,0,0)% +\end{verbatim} +The edge of \Lkeyword{face} is defined in the plane $Oxy$ by the coordinates +of its vertices, given in counterclockwise order by the parameter \Lkeyword{base}: + + +\clearpage +\subsection{Triangular \texttt{`faces'}} + +\begin{LTXexample}[width=6.5cm] +\psset{unit=0.4} +\psset{viewpoint=50 -20 30 rtp2xyz,Decran=50} +\begin{pspicture}(-5.5,-4.5)(7,3.5) +\psSolid[object=grille,base=-4 6 -4 4,action=draw,linecolor=gray](0,0,0) +\psSolid[object=face,fillcolor=yellow,action=draw*, + incolor=blue,biface,base=0 0 3 0 1.5 3, + num=all,show=all](0,1,0) +\psSolid[object=face,fillcolor=yellow, + action=draw*,incolor=blue, + base=0 0 3 0 1.5 3,num=all, + show=all,biface,RotX=180](0,-1,0) +\axesIIID(0,0,0)(6,6,3) +\end{pspicture} +\end{LTXexample} + + +\subsection{\texttt{`face'} defined by a function} +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.45} +\psset{viewpoint=50 -20 30 rtp2xyz,Decran=50} +\def\BASE{0 10 360{/Angle ED 5 Angle cos dup mul mul % x + 3 Angle cos 3 exp Angle sin mul mul } for}% y +\begin{pspicture}(-7,-5.5)(9,6) +\defFunction[algebraic]{F}(t){5*(cos(t))^2} + {3*(sin(t))*(cos(t))^3}{} +\psSolid[object=grille,base=-6 6 -6 6,action=draw,linecolor=gray](0,0,0) +\psSolid[object=face,fillcolor=magenta,action=draw*, + incolor=blue,biface,RotZ=90, + base=0 2 pi mul {F} CourbeR2+](0,0,0) +\psSolid[object=face,fillcolor=yellow,action=draw*, + incolor=blue,biface, + base=0 2 pi mul {F} CourbeR2+](0,0,0) +\psSolid[object=face,fillcolor=yellow,action=draw*, + incolor=blue,biface,RotY=180, + base=0 2 pi mul {F} CourbeR2+](0,0,0) +\psSolid[object=face,fillcolor=yellow,action=draw*, + incolor=red,biface,RotY=180,RotZ=90, + base=0 2 pi mul {F} CourbeR2+](0,0,0) +\axesIIID(0,0,0)(6,6,5) +\end{pspicture} +\end{LTXexample} + + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-fusion-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-fusion-en.tex new file mode 100644 index 00000000000..f53bed63614 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-fusion-en.tex @@ -0,0 +1,66 @@ +\section{Fusing solids} + +It is possible to arrange several solids within the same +structure: this is done with the operation \Lkeyword{fusion} of +solids. This technique uses the painting algorithm for the whole +scene. + +To do so, you must activate the option \verb+\psset{solidmemory}+ +to memorize the structures of the different solids within +\Lcs{psSolid}, with each of them given a separate name. + +You use the object \Lkeyword{fusion} of \Lcs{psSolid}, by indicating in +the parameter \Lkeyword{base} the list of names of the solids to be +fused. + +To draw the scene, don't forget to conclude the code with +\verb+\composeSolid+. + +\psset{lightsrc=50 -50 50,viewpoint=40 16 32 rtp2xyz,Decran=40} +\begin{LTXexample}[width=7.5cm] +\psset{unit=.6} +\begin{pspicture}(-6,-5)(6,7) +\psset{solidmemory} +\psSolid[object=cylindre,h=6,fillcolor=blue, + r=1.5, + ngrid=4 16, + action=none, + name=A1, + ](0,0,-4) +\psSolid[object=anneau,h=6,fillcolor=red!50, + R=4,r=3,h=1, + action=none, + name=B1, + ](0,0,-1) +\psSolid[object=fusion, + action=draw**, + base=A1 B1, + ](0,0,0) +\composeSolid +\end{pspicture} +\end{LTXexample} + + +\begin{LTXexample}[width=6.5cm] +\psset{unit=0.5} +\begin{pspicture}(-6,-5)(6,5) +\psset{solidmemory} +\psset{lightsrc=50 -50 50,viewpoint=100 -30 40, + Decran=100,linewidth=0.5\pslinewidth, + ngrid=18 18,fillcolor=white, + h=12,r=2,RotX=90} +\psframe*[linecolor=black](-6,-5)(6,5) +\psSolid[object=cylindrecreux, + action=none, + name=cylindre1](0, 6, 0) +\psSolid[object=cylindrecreux, + RotZ=90, + action=none, + name=cylindre2](-6, 0, 0) +\psSolid[object=fusion, + base=cylindre1 cylindre2,RotX=0] +\composeSolid +\end{pspicture} +\end{LTXexample} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-fusionjps-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-fusionjps-en.tex new file mode 100644 index 00000000000..0f6c965ee44 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-fusionjps-en.tex @@ -0,0 +1,740 @@ +\def\grille{% quadrillage du plan Oxy + \psPoint(-5,-5,0){S1} + \psPoint(-5,5,0){S2} + \psPoint(5,5,0){S3} + \psPoint(5,-5,0){S4} +\pspolygon*[linecolor=gray!20](S1)(S2)(S3)(S4) +\multido{\ix=-5+1}{11}{% + \psPoint(\ix\space,-5,0){A} + \psPoint(\ix\space,5,0){B} + \psline(A)(B)} +\multido{\iy=-5+1}{11}{% + \psPoint(-5,\iy\space,0){A} + \psPoint(5,\iy\space,0){B} + \psline(A)(B)} + \psPoint(0,0,0){O} + \psPoint(5,0,0){X} + \psPoint(0,5,0){Y} + \psPoint(0,0,8){Z} + \psline[arrowsize=0.3,arrowinset=0.2,linecolor=blue]{->}(O)(X) + \psline[arrowsize=0.3,arrowinset=0.2,linecolor=blue]{->}(O)(Y) + \psline[arrowsize=0.3,arrowinset=0.2,linecolor=blue]{->}(O)(Z) + \uput[r](X){\textcolor{blue}{$x$}}\uput[u](Y){\textcolor{blue}{$y$}}% + \uput[r](Z){\textcolor{blue}{$z$}}\uput[u](O){\textcolor{blue}{$O$}}} + + +\section{Fusing with \textit{jps code}} + +We can also \Index{fuse solids} by passing the code directly using +\textit{jps code}. The calculation of the hidden parts is carried +out by the PostScript routines of the \texttt{solides.pro} file, +but the lines of code are ``encapsulated'' within a +\texttt{pspicture} environment thanks to the command +\verb+\codejps{ps code}+. + +\subsection{Using \textit{jps code}} + +\subsubsection{The choice of object} + +\begin{compactitem} + \item \texttt{[section] n newanneau}: choice of a cylindrical ring defined by + the coordinates of the vertices of its intersection with the plane $Oyz$. + \item \texttt{2 1.5 6 [4 16] newcylindre}: choice of a vertical cylinder +with the following parameters: + \begin{compactitem} + \item \texttt{z0=2}: the position of the base centre on the axis $Oz$; + \item \texttt{radius=1.5}: radius of the cylinder; + \item \texttt{z1=6}: the position of the top centre on the + axis $Oz$; + \item \texttt{[4 16]}: the cylinder is sliced horizontally into 4 pieces and +vertically into 16 sectors. + \end{compactitem} + \end{compactitem} + +\subsubsection{The transformations} + +\begin{compactitem} + \item \texttt{\{-1 2 5 translatepoint3d\} solidtransform}: the object +previously chosen is translated to the point with the +coordinates $(x=-1,y=2,z=5)$. + \item \texttt{\{90 0 45 rotateOpoint3d\} solidtransform}: the object +previously chosen is rotated around the axes $(Ox,Oy,Oz)$, in +this order: rotation of 90$^\mathsf{o}$ about $(Ox)$ followed +by a rotation of 45$^\mathsf{o}$ about $(Oz)$. +\end{compactitem} + +\subsubsection{The choice of object colour} + +\begin{compactitem} + \item dup (yellow) outputcolors: a yellow object illuminated in + white light. +\end{compactitem} + +\subsubsection{Fusing objects} + +\begin{compactitem} + \item The \Index{fusion} is finally made with the instruction \texttt{solidfuz}. +\end{compactitem} + +\subsubsection{Designing objects} + +\begin{compactitem} + \item There are three drawing options: + \begin{compactitem} + \item \texttt{drawsolid}: only draw edges; hidden edges are drawn dashed; + \item \texttt{drawsolid*}: draw and fill solids in their coded order (not + a very interesting option at first glance); hidden edges are drawn dashed; + \item \texttt{drawsolid**}: draw and fill solids with the + painting algorithm; only those parts seen by the observer are + drawn. + \end{compactitem} +\end{compactitem} +\begin{center} +\psset{lightsrc=50 -50 50,viewpoint=40 16 32 rtp2xyz,Decran=40} +\psset{unit=0.4} +\begin{minipage}{0.3\linewidth} +\begin{pspicture}(-6,-5)(6,7) +\psframe*[linecolor=gray!40](-6,-5)(6,7) +\codejps{ +% solide 1 + /tour { + -6 1.5 6 [4 16] newcylindre + dup (jaune) outputcolors + } def +% solide 2 + /anneau { + [4 -1 4 1 3 1 3 -1] 24 newanneau + {0 0 -1 translatepoint3d} solidtransform + dup (orange) outputcolors + } def +% fusion + tour anneau solidfuz + drawsolid} +\end{pspicture} +\end{minipage} +\hfill +\begin{minipage}{0.3\linewidth} +\begin{pspicture}(-6,-5)(6,7) +\psframe*[linecolor=gray!40](-6,-5)(6,7) +\codejps{ +% solide 1 + /tour { + -6 1.5 6 [4 16] newcylindre + dup (jaune) outputcolors + } def +% solide 2 + /anneau { + [4 -1 4 1 3 1 3 -1] 24 newanneau + {0 0 -1 translatepoint3d} solidtransform + dup (orange) outputcolors + } def +% fusion + tour anneau solidfuz + drawsolid*} +\end{pspicture} +\end{minipage} +\hfill +\begin{minipage}{0.3\linewidth} +\begin{pspicture}(-6,-5)(6,7) +\psframe*[linecolor=gray!40](-6,-5)(6,7) +\codejps{ +% solide 1 + /tour { + -6 1.5 6 [4 16] newcylindre + dup (jaune) outputcolors + } def +% solide 2 + /anneau { + [4 -1 4 1 3 1 3 -1] 24 newanneau + {0 0 -1 translatepoint3d} solidtransform + dup (orange) outputcolors + } def +% fusion + tour anneau solidfuz + drawsolid**} +\psPoint(0,0,8){Z} +\psPoint(0,0,6){Z'} +\psline[arrowsize=0.3,arrowinset=0.2]{->}(Z')(Z) +\uput[u](Z){$z$} +\end{pspicture} +\end{minipage} +\end{center} + +\begin{verbatim} +\psset{lightsrc=50 -50 50,viewpoint=50 20 50 rtp2xyz,Decran=50} +\begin{pspicture}(-6,-2)(6,8) +\psframe(-6,-2)(6,8) +\codejps{ +% solide 1 + /tour{ + -6 1.5 6 [4 16] newcylindre + dup (jaune) outputcolors + } def +% solide 2 + /anneau{ + [4 -1 4 1 3 1 3 -1] 24 newanneau + {0 0 -1 translatepoint3d} solidtransform + dup (orange) outputcolors + } def +% fusion + tour anneau solidfuz + drawsolid**} +\end{pspicture} +\end{verbatim} + +\newpage + +\subsection{A \Index{chloride ion}} +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-4)(3,4) +\psset{lightsrc=100 -50 -10,lightintensity=3,viewpoint=200 20 10 rtp2xyz,Decran=20} +{\psset{linewidth=0.5\pslinewidth} +\codejps{/Cl {9.02 [18 16] newsphere +{-90 0 0 rotateOpoint3d} solidtransform + dup (Green) outputcolors} def +/Cl1 { Cl {10.25 10.25 10.25 translatepoint3d} solidtransform } def +/Cl2 { Cl {10.25 -10.25 10.25 translatepoint3d} solidtransform } def +/Cl3 { Cl {-10.25 -10.25 10.25 translatepoint3d} solidtransform } def +/Cl4 { Cl {-10.25 10.25 10.25 translatepoint3d} solidtransform } def +/Cl5 { Cl {10.25 10.25 -10.25 translatepoint3d} solidtransform } def +/Cl6 { Cl {10.25 -10.25 -10.25 translatepoint3d} solidtransform } def +/Cl7 { Cl {-10.25 -10.25 -10.25 translatepoint3d} solidtransform } def +/Cl8 { Cl {-10.25 10.25 -10.25 translatepoint3d} solidtransform } def +/Cs {8.38 [18 16] newsphere + dup (White) outputcolors} def +/Cl12{ Cl1 Cl2 solidfuz} def +/Cl123{ Cl12 Cl3 solidfuz} def +/Cl1234{ Cl123 Cl4 solidfuz} def +/Cl12345{ Cl1234 Cl5 solidfuz} def +/Cl123456{ Cl12345 Cl6 solidfuz} def +/Cl1234567{ Cl123456 Cl7 solidfuz} def +/Cl12345678{ Cl1234567 Cl8 solidfuz} def +/C_Cs { Cl12345678 Cs solidfuz} def +C_Cs drawsolid**}}% +\psPoint(0,0,0){P} +\psPoint(10.25,10.25,10.25){Cl1} +\psPoint(10.25,-10.25,10.25){Cl2} +\psPoint(-10.25,-10.25,10.25){Cl3} +\psPoint(-10.25,10.25,10.25){Cl4} +\psPoint(10.25,10.25,-10.25){Cl5} +\psPoint(10.25,-10.25,-10.25){Cl6} +\psPoint(-10.25,-10.25,-10.25){Cl7} +\psPoint(-10.25,10.25,-10.25){Cl8} +\pspolygon[linestyle=dashed](Cl1)(Cl2)(Cl3)(Cl4) +\pspolygon[linestyle=dashed](Cl5)(Cl6)(Cl7)(Cl8) +\psline[linestyle=dashed](Cl2)(Cl6) +\psline[linestyle=dashed](Cl3)(Cl7) +\psline[linestyle=dashed](Cl1)(Cl5) +\psline[linestyle=dashed](Cl4)(Cl8) +\pcline[offset=0.5]{<->}(Cl2)(Cl1) +\aput{:U}{a} +\pcline[offset=0.5]{<->}(Cl6)(Cl2) +\aput{:U}{a} +\end{pspicture} +\end{LTXexample} + +We define the chloride ion $\mathrm{Cl^-}$: +\begin{verbatim} +/Cl {9.02 [12 8] newsphere + {-90 0 0 rotateOpoint3d} solidtransform + dup (Green) outputcolors} def +\end{verbatim} +which we shift to each vertex of a cube: +\begin{verbatim} +/Cl1 { Cl {10.25 10.25 10.25 translatepoint3d} solidtransform } def +/Cl2 { Cl {10.25 -10.25 10.25 translatepoint3d} solidtransform } def +/Cl3 { Cl {-10.25 -10.25 10.25 translatepoint3d} solidtransform } def +/Cl4 { Cl {-10.25 10.25 10.25 translatepoint3d} solidtransform } def +/Cl5 { Cl {10.25 10.25 -10.25 translatepoint3d} solidtransform } def +/Cl6 { Cl {10.25 -10.25 -10.25 translatepoint3d} solidtransform } def +/Cl7 { Cl {-10.25 -10.25 -10.25 translatepoint3d} solidtransform } def +/Cl8 { Cl {-10.25 10.25 -10.25 translatepoint3d} solidtransform } def +\end{verbatim} +Then a caesium ion $\mathrm{Cs^+}$ is placed in the center: +\begin{verbatim} +/Cs {8.38 [12 8] newsphere + dup (White) outputcolors} def +\end{verbatim} +Finally we fuse the separate spheres in pairs. + +\vfill + + +\subsection{A prototype of a \Index{vehicle}} +\begin{center} +\psset{lightsrc=100 0 100,viewpoint=25 10 10,Decran=30} +\begin{pspicture}(-6,-4)(6,8) +\pstVerb{/Pneu { + /m {90 4 div} bind def + /Scos {m cos 2 m mul cos add 3 m mul cos add} bind def + /Z0 {h 4 div} bind def + /c {Z0 Scos div} bind def + /Z1 {Z0 c m cos mul add} bind def + /Z2 {Z1 c m 2 mul cos mul add} bind def + /R1 {R c m sin mul sub} bind def + /R2 {R1 c m 2 mul sin mul sub} bind def + /R3 {R2 c m 3 mul sin mul sub} bind def + R h 4 div neg % 1 + R h 4 div % 2 + R1 Z1 % 3 + R2 Z2 % 4 + R3 h 2 div % 5 + r h 2 div % 6 + r h 2 div neg % 7 + R3 h 2 div neg % 8 + R2 Z2 neg % 9 + R1 Z1 neg % 10 + } def}% +\grille +\codejps{ +/roue12 { +% solide 1 + /R 2 def /r 1 def /h 1 def + [Pneu] 36 newanneau + {90 0 90 rotateOpoint3d} solidtransform + {3 4 2 translatepoint3d} solidtransform + dup (White) outputcolors +% solide 2 + [Pneu] 36 newanneau + {90 0 90 rotateOpoint3d} solidtransform + {-3 4 2 translatepoint3d} solidtransform + dup (White) outputcolors +% fusion + solidfuz } def +/axe12{ +0 0.1 6 [4 16] newcylindre +{90 0 90 rotateOpoint3d} solidtransform +{-3 4 2 translatepoint3d} solidtransform +dup (White) outputcolors +} def +/roue12axes { +roue12 axe12 solidfuz } def +/roue34 { +% solide 3 + /R 1.5 def /r 1 def /h 1 def + [Pneu] 36 newanneau + {90 0 110 rotateOpoint3d} solidtransform + {3 -4 1.5 translatepoint3d} solidtransform + dup (White) outputcolors +% solide 4 + [Pneu] 36 newanneau + {90 0 110 rotateOpoint3d} solidtransform + {-3 -4 1.5 translatepoint3d} solidtransform + dup (White) outputcolors +% fusion + solidfuz } def +/axe34{ +0 0.1 6 [16 16] newcylindre +{90 0 90 rotateOpoint3d} solidtransform +{-3 -4 1.5 translatepoint3d} solidtransform +dup (White) outputcolors +} def +/roue34axes34 { +roue34 axe34 solidfuz } def +/roues {roue34axes34 roue12axes solidfuz} def +/chassis { +0 1 8 [4 16] newcylindre +{100 0 0 rotateOpoint3d} solidtransform +{0 4 2.5 translatepoint3d} solidtransform +dup (White) outputcolors +} def +roues chassis solidfuz + drawsolid**} +\psPoint(0,0,2.7){Z'} +\psline[arrowsize=0.3,arrowinset=0.2,linecolor=blue]{->}(Z')(Z) +\end{pspicture} +\end{center} +We have to operate in several steps to fuse the solids in pairs: +\begin{compactitem} + \item We first fuse the two front wheels \texttt{roue12}: + \begin{verbatim} +/roue12 { +% solide 1 + /R 2 def /r 1 def /h 1 def + [Pneu] 36 newanneau + {90 0 90 rotateOpoint3d} solidtransform + {3 4 2 translatepoint3d} solidtransform + dup (White) outputcolors +% solide 2 + [Pneu] 36 newanneau + {90 0 90 rotateOpoint3d} solidtransform + {-3 4 2 translatepoint3d} solidtransform + dup (White) outputcolors +% fusion + solidfuz } def + \end{verbatim} + \item Then the two wheels and their axis: + \begin{verbatim} +/axe12{ +0 0.1 6 [4 16] newcylindre +{90 0 90 rotateOpoint3d} solidtransform +{-3 4 2 translatepoint3d} solidtransform +dup (White) outputcolors +} def +/roue12axes { +roue12 axe12 solidfuz } def +\end{verbatim} + \item After that the rear wheels and their axis: + \begin{verbatim} +/roue34 { +% solide 3 + /R 1.5 def /r 1 def /h 1 def + [Pneu] 36 newanneau + {90 0 110 rotateOpoint3d} solidtransform + {3 -4 1.5 translatepoint3d} solidtransform + dup (White) outputcolors +% solide 4 + [Pneu] 36 newanneau + {90 0 110 rotateOpoint3d} solidtransform + {-3 -4 1.5 translatepoint3d} solidtransform + dup (White) outputcolors +% fusion + solidfuz } def +/axe34{ +0 0.1 6 [16 16] newcylindre +{90 0 90 rotateOpoint3d} solidtransform +{-3 -4 1.5 translatepoint3d} solidtransform +dup (White) outputcolors +} def +/roue34axes34 { +roue34 axe34 solidfuz } def +\end{verbatim} + +\item Then fuse the two wheel assemblies: +\begin{verbatim} +/roues {roue34axes34 roue12axes solidfuz} def +\end{verbatim} + +\item The final step is to fuse the previously generated solid with +the chassis: +\begin{verbatim} +/chassis { +0 1 8 [4 16] newcylindre +{100 0 0 rotateOpoint3d} solidtransform +{0 4 2.5 translatepoint3d} solidtransform +dup (White) outputcolors +} def +roues chassis solidfuz + drawsolid**} +\end{verbatim} +\end{compactitem} + + +\subsection{A \Index{wheel} -- or a space station} + +\begin{center} +\begin{pspicture}(-6,-5)(6,6) +\psset{lightsrc=50 -50 50,viewpoint=40 50 60,Decran=60,linewidth=0.5\pslinewidth} +%\psframe*[linecolor=black](-6,-5)(6,5) +\codejps{ + /rayon0 { + 1 0.2 6 [4 16] newcylindre + {90 0 0 rotateOpoint3d} solidtransform + dup (White) outputcolors + } def +36 36 360 { + /angle exch def + /rayon1 { + 1 0.2 6 [4 16] newcylindre + {90 0 angle rotateOpoint3d} solidtransform + dup (White) outputcolors + } def + /rayons {rayon0 rayon1 solidfuz} def + /rayon0 rayons def + } for + /moyeu { -2 1 2 [4 10] newcylindre dup (jaune) outputcolors} def + /rayonsmoyeu {rayons moyeu solidfuz} def + /pneu {2 7 [18 36] newtore dup (White) outputcolors} def + /ROUE {pneu rayonsmoyeu solidfuz} def + ROUE drawsolid**} +\end{pspicture} +\end{center} +We define the first spoke: +\begin{verbatim} + /rayon0 { + 1 0.2 6 [4 16] newcylindre + {90 0 0 rotateOpoint3d} solidtransform + dup (White) outputcolors + } def +\end{verbatim} +Then, with a loop, we fuse all the spokes of the wheel: +\begin{verbatim} +36 36 360 { + /angle exch def + /rayon1 { + 1 0.2 6 [4 16] newcylindre + {90 0 angle rotateOpoint3d} solidtransform + dup (White) outputcolors + } def + /rayons {rayon0 rayon1 solidfuz} def + /rayon0 rayons def + } for +\end{verbatim} +After that, we draw the hub and the tyre of the wheel, and finally +fuse all of them: +\begin{verbatim} + /moyeu { -0.5 1 0.5 [4 10] newcylindre dup (White) outputcolors} def + /rayonsmoyeu {rayons moyeu solidfuz} def + /pneu {2 7 [18 36] newtore dup (jaune) outputcolors} def + /ROUE {pneu rayonsmoyeu solidfuz} def + ROUE drawsolid** +\end{verbatim} + + +\subsection{Intersection of two cylinders} + +\begin{LTXexample}[width=8cm] +\begin{pspicture}(-4,-3)(6,3) +\psset{lightsrc=50 -50 50,viewpoint=100 -30 +40,Decran=100,linewidth=0.5\pslinewidth, unit=0.5} +\codejps{ + /cylindre1 { + -6 2 6 [36 36] newcylindrecreux %newcylindre + {90 0 0 rotateOpoint3d} solidtransform + dup (Yellow) (White) inoutputcolors + } def + /cylindre2 { + -6 2 6 [36 36] newcylindrecreux %newcylindre + {90 0 90 rotateOpoint3d} solidtransform + dup (Yellow) (White) inoutputcolors + } def + /UnionCylindres {cylindre1 cylindre2 solidfuz} def + UnionCylindres drawsolid**} +\end{pspicture} +\end{LTXexample} + + +\subsection{Intersection between a sphere and a cylinder} + +This time we draw the curve of intersection using +\verb+\psSolid[object=courbe]+. + +\begin{LTXexample}[width=8cm] +\psset{unit=0.5,lightsrc=50 -50 50,viewpoint=100 0 0 rtp2xyz,Decran=110,linewidth=0.5\pslinewidth} +\begin{pspicture}(-7,-6)(5,6) +\defFunction{F}(t){t cos dup mul 5 mul}{t cos t sin mul 5 mul}{t sin 5 mul} +\codejps{% + /cylindre1 { + -5 2.5 5 [36 36] newcylindre + {2.5 0 0 translatepoint3d} solidtransform + dup (White) outputcolors + } def + /sphere1 { + 5 [36 72] newsphere + dup (White) outputcolors + } def + /CS {cylindre1 sphere1 solidfuz} def + CS drawsolid**} +\psPoint(0,0,0){O} +\psSolid[object=courbe,r=0, + function=F, + range=0 360, + linecolor=red,linewidth=4\pslinewidth] +\end{pspicture} +\end{LTXexample} + + +\subsection{Two linked \Index{rings}} + +\begin{LTXexample}[width=8cm] +\begin{pspicture}(-5,-4)(3,3) +\psset{lightsrc=50 50 50,viewpoint=40 50 60,Decran=30,unit=0.85} +\codejps{ + /anneau1 {1 7 [12 36] newtore + {0 0 0 translatepoint3d} solidtransform + dup (Yellow) outputcolors} def + /anneau2 {1 7 [12 36] newtore + {90 0 0 rotateOpoint3d} solidtransform + {7 0 0 translatepoint3d} solidtransform + dup (White) outputcolors} def + /collier {anneau1 anneau2 solidfuz} def + collier drawsolid**} +\end{pspicture} +\end{LTXexample} + + + +\subsection{The \Index{methane molecule}: wooden model} + +\begin{LTXexample}[width=8cm] +\begin{pspicture}(-4.5,-4)(3.2,5) +\psset{lightsrc=50 50 10,lightintensity=2,viewpoint=100 50 20 rtp2xyz, +Decran=30} +\psset{linecolor={[cmyk]{0,0.72,1,0.45}},linewidth=0.5\pslinewidth, + unit=1} +%\psframe[fillstyle=solid,fillcolor=green!20](-4,-4)(3.2,5) +\pstVerb{/hetre {0.764 0.6 0.204 setrgbcolor} def + /chene {0.568 0.427 0.086 setrgbcolor} def + /bois {0.956 0.921 0.65 setrgbcolor} def + }% +\codejps{ + /H1 { + 2 [18 16] newsphere + {-90 0 0 rotateOpoint3d} solidtransform + {0 10.93 0 translatepoint3d} solidtransform + dup (hetre) outputcolors} def + /L1 { + 0 0.25 10 [12 10] newcylindre + {-90 0 0 rotateOpoint3d} solidtransform + dup (bois) outputcolors + } def +/HL1{ H1 L1 solidfuz} def +/HL2 { HL1 {0 0 -109.5 rotateOpoint3d} solidtransform } def +/HL3 { HL2 {0 -120 0 rotateOpoint3d} solidtransform } def +/HL4 { HL2 {0 120 0 rotateOpoint3d} solidtransform } def + /C {3 [18 16] newsphere + {90 0 0 rotateOpoint3d} solidtransform + dup (chene) outputcolors} def +/HL12 { HL1 HL2 solidfuz} def +/HL123 { HL12 HL3 solidfuz} def +/HL1234 { HL123 HL4 solidfuz} def +/methane { HL1234 C solidfuz} def + methane drawsolid**} +\end{pspicture} +\end{LTXexample} + + +\subsection{The \Index{thiosulphate ion}} + +\begin{center} +\begin{pspicture}(-4,-3)(4.5,5.5) +\psset{lightsrc=100 10 -20,lightintensity=3,viewpoint=200 30 +20 rtp2xyz,Decran=40} +%\psframe(-4,-3)(4.5,5.5) +{\psset{linewidth=0.5\pslinewidth} +\codejps{ +/Soufre1 {3.56 [20 16] newsphere + dup (Yellow) outputcolors} def +/Soufre2 {3.56 [20 16] newsphere + {0 0.000 20.10 translatepoint3d} solidtransform + dup (Yellow) outputcolors} def +% Liaison simple +/LiaisonR { + 7.5 0.5 15 [10 10] newcylindre + dup (Red) outputcolors + } def +/LiaisonY { + 0 0.5 7.5 [10 10] newcylindre + dup (Yellow) outputcolors + } def +% fin Liaison simple +/Liaison{LiaisonR LiaisonY solidfuz} def +/Ox {2.17 [20 16] newsphere + {0 0 15 translatepoint3d} solidtransform + dup (Red) outputcolors} def +/LO { Liaison Ox solidfuz} def +/LO1 { LO {0 -109.5 0 rotateOpoint3d} solidtransform } def +/LOx1 { LO1 {0 0 120 rotateOpoint3d} solidtransform } def +% fin liaison simple S-O +% Liaison double S=O +/LiaisonD1 {Liaison {-0.75 0 0 translatepoint3d} solidtransform} def +/LiaisonD2 {Liaison {0.75 0 0 translatepoint3d} solidtransform} def +/LiaisonDD { LiaisonD1 LiaisonD2 solidfuz} def +/LiaisonDOx {LiaisonDD Ox solidfuz} def +/LiaisonDOx1 {LiaisonDOx {0 -109.5 0 rotateOpoint3d} solidtransform } def +/LiaisonDOx2 {LiaisonDOx1 {0 0 -120 rotateOpoint3d} solidtransform } def +/LO12 { LiaisonDOx1 LiaisonDOx2 solidfuz} def +/LO123 {LO12 LOx1 solidfuz} def +% liaison simple S-S +/L4 { 0 0.5 20.10 [16 10] newcylindre + dup (Yellow) outputcolors + } def +/S1L4{ Soufre1 L4 solidfuz} def +/S1S2L4{ S1L4 Soufre2 solidfuz} def +/S2O3 { S1S2L4 LO123 solidfuz} def +S2O3 drawsolid**} +\axesIIID(0,0,0)(25,20,25)} +\psPoint(0,0,20.1){S2} +\psPoint(-14.14,0,-5){O1} +\psPoint(7.07,-12.24,-5 ){O2} +\psPoint(7.07,12.24,-5 ){O3} +\pcline[linestyle=dotted]{<->}(O2)(O) +\aput{:U}{15 pm} +\pcline[linestyle=dotted]{<->}(O)(S2) +\aput{:U}{\small 20,1 pm} +\pcline[linestyle=dotted]{<->}(O2)(O3) +\lput*{:U}{\small 24,5 pm} +\pcline[linestyle=dotted]{<->}(O2)(S2) +\lput*{:U}{\small 28,8 pm} +\pstMarkAngle[arrows=<->,MarkAngleRadius=0.8,linestyle=dotted]{O2}{O}{O3}{\footnotesize 109,4$^{\mathrm{o}}$} +\pstMarkAngle[arrows=<->,MarkAngleRadius=0.8,linestyle=dotted]{O1}{O}{S2}{\footnotesize 109,5$^{\mathrm{o}}$} +\rput(0,-2.5){$\mathrm{S_2^{\phantom{2}}O_3^{2-}}$} +\end{pspicture} +\end{center} + +We first define the two sulphur atoms and place them on the $Oz$ +axis. $\mathrm{S_1}$ is placed at the origin $O$. +\begin{verbatim} +\codejps{ +/Soufre1 {3.56 [20 16] newsphere + dup (Yellow) outputcolors} def +/Soufre2 {3.56 [20 16] newsphere + {0 0.000 20.10 translatepoint3d} solidtransform + dup (Yellow) outputcolors} def +\end{verbatim} +Then the single bond \textsf{S-O} using the following convention: +half red---the half connected to \textsf{O}, and half yellow---the half connected to \textsf{S}. +\begin{verbatim} +/LiaisonR { + 7.5 0.5 15 [10 10] newcylindre + dup (Red) outputcolors + } def +/LiaisonY { + 0 0.5 7.5 [10 10] newcylindre + dup (Yellow) outputcolors + } def +/Liaison{LiaisonR LiaisonY solidfuz} def +\end{verbatim} +The oxygen atom, its bond, and the setting of the combined unit: +\begin{verbatim} +/Ox {2.17 [20 16] newsphere + {0 0 15 translatepoint3d} solidtransform + dup (Red) outputcolors} def +/LO { Liaison Ox solidfuz} def +/LO1 { LO {0 -109.5 0 rotateOpoint3d} solidtransform } def +/LOx1 { LO1 {0 0 120 rotateOpoint3d} solidtransform } def +% fin liaison simple S-O +\end{verbatim} +For the double bond \textsf{S=O}, we take the single bond above +and duplicate it with shifts of 0.75~cm along the $Ox$ axis. +\begin{verbatim} +% Liaison double S=O +/LiaisonD1 {Liaison {-0.75 0 0 translatepoint3d} solidtransform} def +/LiaisonD2 {Liaison {0.75 0 0 translatepoint3d} solidtransform} def +/LiaisonDD { LiaisonD1 LiaisonD2 solidfuz} def +\end{verbatim} +Connecting it to the \textsf{O} atom: +\begin{verbatim} +/LiaisonDOx {LiaisonDD Ox solidfuz} def +\end{verbatim} +and with two successive rotations we position the two bonds +\textsf{=O}: +\begin{verbatim} +/LiaisonDOx1 {LiaisonDOx {0 -109.5 0 rotateOpoint3d} solidtransform } def +/LiaisonDOx2 {LiaisonDOx1 {0 0 -120 rotateOpoint3d} solidtransform } def +\end{verbatim} +The following step consists of fusing the two connections: +\begin{verbatim} +/LO12 { LiaisonDOx1 LiaisonDOx2 solidfuz} def +/LO123 {LO12 LOx1 solidfuz} def +\end{verbatim} +Then the single bond \textsf{S-S} is created: +\begin{verbatim} +% liaison simple S-S +/L4 { 0 0.5 20.10 [16 10] newcylindre + dup (Yellow) outputcolors + } def +\end{verbatim} +and fused with the two atoms \textsf{S-S}: +\begin{verbatim} +/S1L4{ Soufre1 L4 solidfuz} def +/S1S2L4{ S1L4 Soufre2 solidfuz} def +\end{verbatim} +The last step will be to fuse the two \textsf{S-S} and the three +\textsf{O} already equipped with their bonds: +\begin{verbatim} +/S2O3 { S1S2L4 LO123 solidfuz} def +S2O3 drawsolid**} +\end{verbatim} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-geode-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-geode-en.tex new file mode 100644 index 00000000000..34e6104d6ff --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-geode-en.tex @@ -0,0 +1,200 @@ +\section{The object \texttt{geode}} + +\subsection{Mathematical presentation} + +Some excellent tutorials about geodes and their duals are available on the following websites: + +\centerline{\url{http://fr.wikipedia.org/wiki/G\%C3\%A9ode}} +%I was not sure whether you meant ``geode'' so I looked up this url. Wikipedia indicated that there is no article about this. + +The parametrisation of a geode complies with that given on the website: + + +\centerline{\url{http://hypo.ge-dip.etat-ge.ch/www/math/html/amch104.html}} + +``\textit{We can define a geode with two parameters: a number $N$ indicating the type of the initial polyhedron ($N = 3$ for the tetrahedron, $N = 4$ for the octahedron and $N = 5$ for the icosahedron) and a number $n$ indicating the number of divisions along the edge's length.}'' + + +The article \textit{Indexing the Sphere with the Hierarchical Triangular Mesh} describes a method that allows us to obtain a representation of geodes: + + +\centerline{\url{http://research.microsoft.com/research/pubs/view.aspx?msr_tr_id=MSR-TR-2005-123}} + +\subsection{Construction with pst-solides3d} + +Two approaches are possible to generate a geode or its dual: +either via \verb+\codejps+, or via the objects of +\Lcs{psSolid}. + +For a geode, the codes +\begin{verbatim} +\codejps{N n newgeode drawsolid**} +\end{verbatim} +and +\begin{verbatim} +\psSolid[object=geode,ngrid=N n] +\end{verbatim} +are equivalent. And for its dual, the codes +\begin{verbatim} +\codejps{N n newdualgeode drawsolid**} +\end{verbatim} +and +\begin{verbatim} +\psSolid[object=geode,dualreg,ngrid=N n] +\end{verbatim} + + + +\subsection{Some examples of geodes and their duals} + +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-3)(3,3) +\psset{viewpoint=50 -20 30 rtp2xyz,Decran=100} +\psSolid[object=geode, + ngrid=5 0] +%\codejps{5 0 newgeode drawsolid**} +\psframe*(-2,-2.8)(2,-2.2) +\rput(0,-2.5){\textcolor{white}{\textsf{N=5 n=0}}} +\end{pspicture} +\end{LTXexample} +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-3)(3,3) +\psset{viewpoint=50 -20 30 rtp2xyz,Decran=100} +\psSolid[object=geode, + dualreg, + ngrid=5 0] +%\codejps{5 0 newdualgeode drawsolid**} +\psframe*(-2,-2.8)(2,-2.2) +\rput(0,-2.5){\textcolor{white}{\textsf{N=5 n=0}}} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-3)(3,3) +\psset{viewpoint=50 -20 30 rtp2xyz,Decran=100} +\psSolid[object=geode, + ngrid=5 1] +%\codejps{5 1 newgeode drawsolid**} +\psframe*(-2,-2.8)(2,-2.2) +\rput(0,-2.5){\textcolor{white}{\textsf{N=5 n=1}}} +\end{pspicture} +\end{LTXexample} +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-3)(3,3) +\psset{viewpoint=50 -20 30 rtp2xyz,Decran=100} +\psSolid[object=geode, + dualreg, + ngrid=5 1] +%\codejps{5 1 newdualgeode drawsolid**} +\psframe*(-2,-2.8)(2,-2.2) +\rput(0,-2.5){\textcolor{white}{\textsf{N=5 n=1}}} +\end{pspicture} +\end{LTXexample} + +\subsection{The parameters of the \Index{geodes}} + +The radius of the sphere is fixed at 1, so to vary the dimensions of the +geodes one plays around with one or the other of the two following parameters: +\begin{compactitem} + \item The unit: \verb+\psset{unit=2}+ + \item The position of the screen: + \texttt{\Lkeyword{viewpoint}=50 -20 30},\texttt{\Lkeyword{Decran}=100}, if the distance to the screen + is twice as far as the distance to the viewer, one scales the scenery by a factor of two. +\end{compactitem} + +\encadre{Within \textit{jps}, the setup for the geode is \textbackslash{}codejps\{\textbf{N n newgeode}\} and + for its dual it is \textbackslash{}codejps\{\textbf{N n + newdualgeode}\}.} + +\encadre{With \Lcs{psSolid}, the parameters $N$ and $n$ are transmitted via the argument \Lkeyword{ngrid}} + +The color and \Index{transparency} options are available for the geodes as well. + +\begin{LTXexample}[width=7cm] +\psset{viewpoint=50 -20 30 rtp2xyz,Decran=150} +\begin{pspicture}(-3.5,-3.5)(3.5,3.5) +\psset{linewidth=2pt} +\codejps{ +/geode42{4 2 newdualgeode} def +.7 setfillopacity +orange +/geodetransparente{ +geode42 +dup videsolid +dup (orange) inputcolors +dup [.1 .9] solidputhuecolors} def +geodetransparente +drawsolid**} +\end{pspicture} +\end{LTXexample} + +\subsection{Advice for a `fast' construction of a geode} + +The calculation time for the geodes and their duals depends on the number of divisions of an edge +(the second parameter $n$) and will increase rapidly with $n$ +which is really uncomfortable, because one has to wait more or less patiently, until +the result of the transformation \Cadre{dvips->ps2pdf} is ready. + +As happens for all other solids, it is possible to save the calculation in external files, + which then saves calculation time when one has to make a test run of colours or view point. + +We have to operate in two stages: + +\subsubsection{Backup the parameters of the geodes in a \texttt{\Index{.dat}} file} + +\begin{verbatim} +\documentclass{article} +\usepackage{pst-solides3d} +\begin{document} +\codejps{ +4 4 newdualgeode + dup {[.5 .6]} exec solidputhuecolors +(geodedual44) writesolidfile +} +\end{document} +\end{verbatim} +\Cadre{LaTeX->dvips->GSview (Windows)ou gv (Linux)} + +The last operation will generate 4 files: +\begin{compactitem} + \item \texttt{geodedual44-couleurs.dat} $\rightarrow$ the colors of the faces; + \item \texttt{geodedual44-faces.dat} $\rightarrow$ the list of the faces; + \item \texttt{geodedual44-sommets.dat} $\rightarrow$ the list of the vertices; + \item \texttt{geodedual44-io.dat} $\rightarrow$ the number of the faces and vertices. +\end{compactitem} + +\encadre{By default, under Windows and Linux, the security of files on the hard drive is activated and doesn't allow you to write on the drive. +To deactivate that security option, more or less temporarily, here the two corresponding procedures: + +\begin{description} + + \item[Linux:] Advice from Jean-Michel \textsc{Sarlat}: the simplest will be to use GhostScript directly, within the console. As there is no image to wait for: + +\$$>$ gs -dNOSAFER monfichier.ps quit.ps + \item[Windows:] Within the menu \texttt{Options}, the option + \textsf{Security of files} must be unchecked. +\end{description}} + +\subsubsection{Reading the data and drawing the geode} + +%% \begin{LTXexample}[pos=t] +%% \psset{unit=2} +%% \psset{lightsrc=10 0 10,SphericalCoor=true,viewpoint=50 -20 30,Decran=100} +%% \begin{pspicture}(-2,-2)(2,2) +%% \psframe(-2,-2)(2,2) +%% \psSolid[object=datfile,file=data/geodedual44] +%% \end{pspicture} +%% \end{LTXexample} + +The advantage of this method becomes even more evident when one compares the compilation of two files producing the same result by different methods: + +The file \texttt{geode42\_direct.tex} calculates the solid and its view. The file \texttt{geode42\_precalcul.tex} uses the file + \texttt{.dat} including the precalculated data of the file +\texttt{calc\_geode42.tex}. These three files are included in the distribution. + +\subsection{Some other examples} +You will find numerous other examples of geodes on the website: + +\centerline{\url{http://melusine.eu.org/lab/bpst/pst-solides3d/geodes}} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-grille-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-grille-en.tex new file mode 100644 index 00000000000..f69da2f468e --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-grille-en.tex @@ -0,0 +1,52 @@ +\section{The grid} + +The object \verb+grille+ allows you to obtain a solid plane. +The key \texttt{[base=$x{min}$ ${x{max}}$ ${y{min}}$ +${y{max}}$]} lets you specify the dimension of the grid. % $ + + +\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample}[width=6.5cm] +\begin{pspicture}(-3.5,-1.5)(3.5,2.5) +\psSolid[object=grille, + base=0 4 -3 3, + linecolor=gray](0,0,0) +\axesIIID(0,0,0)(4,3,3) +\end{pspicture} +\end{LTXexample} + + +The key \texttt{[ngrid=$n_1$ $n_2$]} lets you specify +fineness of the grid. If $n_2$ is not set up, it is considered that $n_2 = +n_1$. + +If $n_1$ is an integer, it represents the number of grid points along the +$Ox$ axis. If it is a real, it represents the step size along the +$Ox$ axis. For example, the number \verb+1+ is an integer, the number \verb+1.+ is real (note the decimal point). + + + +\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample}[width=6.5cm] +\begin{pspicture}(-3.5,-1.5)(3.5,2.5) +\psSolid[object=grille, + ngrid=1, + base=0 4 -3 3, + linecolor=gray](0,0,0) +\axesIIID(0,0,0)(3,3,3) +\end{pspicture} +\end{LTXexample} + +\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample}[width=6.5cm] +\begin{pspicture}(-3.5,-1.5)(3.5,2.5) +\psSolid[object=grille, + ngrid=1. 1, + base=0 4 -3 3, + linecolor=gray](0,0,0) +\axesIIID(0,0,0)(3,3,3) +\end{pspicture} +\end{LTXexample} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-image2d-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-image2d-en.tex new file mode 100644 index 00000000000..72b5067426d --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-image2d-en.tex @@ -0,0 +1,394 @@ +\section{Projection of images} + + +This command displays an eps image on a plane defined by an origin and a normal, this plan can be the face +of a predefined object: a cube for example. The eps image must be prepared according to the method +described in the documentation for +`\textsf{pst-anamorphosis'}\footnote{\url{http://melusine.eu.org/syracuse/G/pst-anamorphosis/doc/}}. + +The macro includes various options: +\begin{verbatim} + \psImage[file=<filename with extension>, + divisions=10, + normale=nx ny nz, + origine=xO yO zO, + phi=angle, + unitPicture=28.45](x,y) +\end{verbatim} +It focuses the image on the plane at the point defined by the origin, it may be moved to another point +by setting the \emph{optional} values \verb+(x,y)+. You can omit these values +if we do not translate the image into another point than the origin of the plan. + +\psframebox[linestyle=none,fillcolor=yellow,fillstyle=solid]{\texttt{divisions=20}} +selects the number of sub-segments for \texttt{lineto} in the image file to display. The higher the number, +the higher the projected image will be faithful to the original. However, the projection takes place on a +plane, the deformation will be small in all cases except one approaches very close to the plane, therefore +a small number of sub-divisions will generally give a correct result and will perform calculations quickly . + +\psframebox[linestyle=none,fillcolor=yellow,fillstyle=solid]{\texttt{phi}} can rotate the image of a fixed +value in degrees. + +\psframebox[linestyle=none,fillcolor=yellow,fillstyle=solid]{\texttt{unitImage=28.45}} +allows to resize the size of the eps image that is generally points per cm, a larger value will give a smaller image. + +If you want to place the image on the front of an object, it will follow the following procedure: +\begin{itemize} + \item determine the number of faces of the object, see the documentation of `\textsf{pst-solides3d} '; + \item give to the normal of the face in question and origin at the center of that face. We can always + shift the image with \verb+(x, y)+. +\end{itemize} + +\begin{verbatim} +\begin{pspicture}(-5,-5)(5,5) +\psset{solidmemory} +\psSolid[object=cube,a=8,action=draw,name=OBJECT,linecolor=red]% +\psImage[file=tiger.eps,normal=OBJECT 0 solidnormaleface, + origine=OBJECT 0 solidcentreface,unitPicture=75] +\psImage[file=tiger.eps,normal=OBJECT 1 solidnormaleface, + origine=OBJECT 1 solidcentreface,unitPicture=75] +\psImage[file=tiger.eps,normal=OBJECT 4 solidnormaleface, + origine=OBJECT 4 solidcentreface,unitPicture=75] +\psImage[file=tiger.eps,normal=OBJECT 3 solidnormaleface, + origine=OBJECT 3 solidcentreface,unitPicture=75] +\psImage[file=tiger.eps,normal=OBJECT 2 solidnormaleface, + origine=OBJECT 2 solidcentreface,unitPicture=75] +\end{pspicture} +\end{verbatim} + +If the selected plan is not visible to the set position, it may, if desired, force the display of the +image with the \verb+visibility+. + + + +\begin{pspicture}(-10,-4)(6,13) +\psframe(-10,-4)(6,13) +\psset{viewpoint=12 60 20 rtp2xyz,Decran=10,lightsrc=viewpoint} +\psImage[file=images/tiger.eps,normal=1 0 0,origine=0 2 2](0,3) +\psSolid[object=plan, + definition=normalpoint, + args={0.01 2 2 [1 0 0 90]}, + action=draw,linecolor=red, + planmarks, + showBase, + base=-2 2 -2 4] +\psImage[file=images/tiger.eps,normal=0 1 0,origine=2 0 2]%(0,0) +\psSolid[object=plan, + definition=normalpoint, + args={2 0.01 2 [0 1 0 180]}, + action=draw,linecolor=red, + planmarks, + showBase, + base=-2 2 -2 2] +\psImage[file=images/tiger.eps,normal=0 0 1,origine=2 2 0](2,0) +\psSolid[object=plan, + definition=normalpoint, + args={2 2 0.01 [0 0 1 90]}, + action=draw,linecolor=red, + planmarks, + showBase, + base=-2 3 -2 2]% +\psImage[file=images/parrot.eps,normal=1 1 1,origine=5 5 5,unitPicture=75,phi=90]%(0,0) +\psSolid[object=plan, + definition=normalpoint, + args={5 5 5 [1 1 1 180]}, + action=draw,linecolor=red, + planmarks, + showBase, + base=-2 2 -2 2] +\axesIIID(0,0,0)(4,5,6) +\end{pspicture} + + +\psset{unit=1cm} +\psset{viewpoint=20 -120 30 rtp2xyz,Decran=20,unitPicture=15,lightsrc=viewpoint} +\begin{pspicture}[solidmemory](-5,-7.5)(7,6) +\psSolid[object=cube,a=8,name=OBJECT,linecolor=red,fillcolor=white%,numfaces=all,fontsize=100 +] +\psset[pst-solides3d]{normal=OBJECT 0 solidnormaleface} +\psImage[file=images/tiger.eps,origine=OBJECT 0 solidcentreface,phi=-90](0,0) +%\psset[pst-solides3d]{normal=OBJECT 1 solidnormaleface} +%\psImage[file=images/tiger.eps, +% origine=OBJECT 1 solidcentreface] +%\psset[pst-solides3d]{normal=OBJECT 4 solidnormaleface} +%\psImage[file=images/tiger.eps,origine=OBJECT 4 solidcentreface] +\psset[pst-solides3d]{normal=OBJECT 3 solidnormaleface} +\psImage[file=images/tiger.eps,origine=OBJECT 3 solidcentreface] +\psset[pst-solides3d]{normal=OBJECT 2 solidnormaleface} +\psImage[file=images/tiger.eps,origine=OBJECT 2 solidcentreface] +\end{pspicture} + + + +\section{A bit of theory} + +\begin{minipage}{.45\textwidth} +The image is projected into a plane defined by a normal $\vec{K}$ and origin $O'(x_O,y_O,z_O)$. +The coordinates of points in each image are given in reference to a benchmark plan +$(O,\vec {I},\vec{J})$ whose vectors are determined from $\vec{K}$ as follows: +This vector $\vec{K}$ is defined by $\theta$ and $\varphi$, we calculate these values from the coordinates. +With $(O,\vec{i},\vec{j},\vec{k})$ + +\begin{align*} + \vec{K}=\left( + \begin{aligned} + \cos\varphi & \cos\theta\\ + \cos\varphi & \sin\theta\\ + \sin\varphi +\end{aligned}% +\right) +\end{align*} + +You must then choose the other two basis vectors + $(\vec{I},\vec{J},\vec{K})$. +I choose to keep $\vec{I}$ at the plane $Oxy$ +\end{minipage} +% +\hfill +% +\begin{minipage}{0.45\textwidth} +\begin{pspicture}(-3,-5)(4,5) +\psset{unit=5} +\psset{viewpoint=50 15 20 rtp2xyz ,Decran=35} +\psset{solidmemory} +\pstVerb{/Theta 45 def /Phi 45 def + /cosPhi {Phi cos} bind def + /sinPhi {Phi sin} bind def + /cosTheta {Theta cos} bind def + /sinTheta {Theta sin} bind def + /Kx {cosPhi cosTheta mul} bind def + /Ky {cosPhi sinTheta mul} bind def + /Kz sinPhi def}% +\psSolid[object=plan,definition=normalpoint,args={0 0 0 [Kx Ky Kz 145]},action=draw,linecolor=blue,base=-1 1 -1 0] +\psSolid[object=plan,definition=normalpoint,args={0 0 0 [0 0 1]},action=draw**,linecolor=red,base=-1 1 -1 1] +\axesIIID(0,0,0)(1.25,1.25,1.25) +\psSolid[object=plan,definition=normalpoint,args={0 0 0 [0 0 1]},action=none,linecolor=red,name=Oxy,base=-1 1 -1 1] +\psset{plan=Oxy}% +\psProjection[object=cercle,resolution=360,args=0 0 1,linecolor=gray,linestyle=dashed,range=0 360] +\psProjection[object=texte,text=q,fontsize=5,PSfont=Symbol,isolatin=false,phi=90](.25,0.125)% +\psSolid[object=plan, + definition=normalpoint, + args={0 0 0 [1 -1 0]}, + action=none,linecolor=red, + name=Oxz, + base=-1 1 -1 1 + ]% +\psset{plan=Oxz}% +\psProjection[object=cercle,resolution=360, + args=0 0 1,linecolor=gray, + linestyle=dashed, + range=0 90]% +\psSolid[object=vecteur, + definition={[.02 .1]}, + linecolor={[cmyk]{1,0,1,0.5}}, + args=Kx Ky Kz](0,0,0) +\psSolid[object=plan, + definition=normalpoint, + args={0 0 0 [Kx Ky Kz 145]}, + action=draw,linecolor=blue, + base=-1 1 0 1,name=projection]% +\psProjection[object=texte,plan=projection,text=plan de projection,fontsize=4](0,0.85)% +\psSolid[object=vecteur, + definition={[.02 .1]}, + linecolor=red, + args=sinTheta neg cosTheta 0 ](0,0,0)% +\psSolid[object=plan, + definition=normalpoint, + args={0 0 0 [sinTheta cosTheta neg 0]}, + action=none,linecolor=blue, + base=-1 1 -1 1,name=verticale]% +\psProjection[object=texte,text=f,plan=verticale,PSfont=Symbol,isolatin=false,fontsize=4](0.5,0.2)% +\psSolid[object=vecteur, + definition={[.02 .1]}, + linecolor=blue, + args=cosTheta neg sinPhi mul sinTheta neg sinTheta mul cosPhi ](0,0,0)% +\psPoint(Kx, Ky,Kz){K} +\psPoint(Kx, Ky,0){XY} +\psPoint(Kx,0,0){X} +\psPoint(0, Ky,0){Y} +\psPoint(0,0,0){O} +\psPoint(cosTheta neg sinPhi mul, sinTheta neg sinTheta mul, cosPhi){J} +\psPoint(sinTheta neg, cosTheta, 0){I} +\psline(O)(XY) +\psline[linestyle=dashed](XY)(K) +\psline(X)(XY)(Y) +\pstVerb{/xTube {t Cos 0.4 mul} def /yTube {t Sin 0.4 mul} def /zTube {0} def}% +\defFunction{F}(t){xTube}{yTube}{zTube}% +% choix de deux points très voisins sur le tube +\pstVerb{/t1 0.22 pi mul def /t2 0.25 pi mul def }% +\psPoint(/t t1 def xTube ,yTube,zTube){A} +\psPoint(/t t2 def xTube ,yTube,zTube){B} +\psSolid[object=courbe, + r=0, + function=F, + range=0 0.25 pi mul, + fillcolor=red] +\psline[linecolor=red,arrowsize=0.03]{->}(A)(B) +% +\pstVerb{/xT {t Cos 0.4 mul cosPhi mul} def /yT {t Cos 0.4 mul cosPhi mul} def /zT {t Sin 0.4 mul} def}% +\defFunction{F}(t){xT}{yT}{zT}% +% choix de deux points très voisins sur le tube +\pstVerb{/t1 0.22 pi mul def /t2 0.25 pi mul def }% +\psPoint(/t t1 def xT ,yT,zT){A} +\psPoint(/t t2 def xT ,yT,zT){B} +\psSolid[object=courbe, + r=0, + function=F, + range=0 0.25 pi mul, + fillcolor={[rgb]{0.3,0.18,0.18}}] +\psline[linecolor={[rgb]{0.3,0.18,0.18}},arrowsize=0.03]{->}(A)(B) +\uput[u](J){\blue$\overrightarrow{J}$} +\uput[ur](K){\color[cmyk]{1,0,1,0.5}{$\overrightarrow{K}$}} +\uput[r](I){\red$\overrightarrow{I}$} %$ +\end{pspicture} +\end{minipage} + +\endinput + + + +Seen from above, in the plane $Oxy$: + +\begin{minipage}{.4\textwidth} +\[ +\overrightarrow{I}=\left(% + \begin{aligned} + -\sin\theta\\ + \hphantom{-}\cos\theta\\ + 0 + \end{aligned} + \right) + \] +\end{minipage} +\hfill +\begin{minipage}{0.5\textwidth} + +\begin{pspicture}(-3,-4)(4,2) +\psline{->}(4,0)\uput[0](4,0){$y$} +\psline[linestyle=dashed](0,2) +\psline{->}(0,-3.5)\uput[270](0,-3.5){$x$} +\uput[135](0,0){O} +{\psset{linewidth=2\pslinewidth} +\psline{->}(0,-2)\uput[0](0,-2){$\overrightarrow{i}$} +\psline{->}(2,0)\uput[90](2,0){$\overrightarrow{j}$} +\psline[linestyle=dotted](3;-30)\uput[0](3;-30){$x'$} +\psline[linecolor=red,doubleline=true]{->}(2;60)\uput[0](2;60){$\red \overrightarrow{I}$} +} +\psarc{->}(0,0){1.5}{-90}{-30}\uput[0](1.6;-60){$\theta$} +\end{pspicture} +\end{minipage} + +Il reste à trouver $\overrightarrow{J}$ pour que la base +($\overrightarrow{I},\overrightarrow{J},\overrightarrow{K}$) soit directe : +$\overrightarrow{J}=\overrightarrow{K}\times\overrightarrow{I}$ +\[ +\overrightarrow{J}=\left(\begin{aligned} + \cos\varphi\cos\theta\\ + \cos\varphi\sin\theta\\ + \sin\varphi + \end{aligned} + \right) +\times +\left( + \begin{aligned}{c} + -\sin\theta\\ + \hphantom{-}\cos\theta\\ + 0 + \end{aligned} + \right) + = + \left(\begin{aligned} + -\sin\varphi\cos\theta\\ + -\sin\varphi\sin\theta\\ + \cos\varphi + \end{aligned} + \right) + \] + The transformation matrice: +\[ +A=\left(% + \begin{array}{ccc} + -\sin\theta&-\sin\varphi\cos\theta&\cos\varphi\cos\theta\\ + \hphantom{-}\cos\theta&-\sin\varphi\sin\theta&\cos\varphi\sin\theta\\ + 0&\cos\varphi&\sin\varphi + \end{array} + \right) + \] + +to determine the coordinates ($ x, y, z $) of a point $M$ if one knows its + coordinates $(X, Y, Z)$ in the reference + $(O,\overrightarrow{I},\overrightarrow{J},\overrightarrow{K})$. + + \[ + \left(\begin{aligned}{c} + x\\ + y\\ + z + \end{aligned} + \right) + =\left(% + \begin{array}{ccc} + -\sin\theta&-\sin\varphi\cos\theta&\cos\varphi\cos\theta\\ + \hphantom{-}\cos\theta&-\sin\varphi\sin\theta&\cos\varphi\sin\theta\\ + 0&\cos\varphi&\sin\varphi + \end{array} + \right) +\left(\begin{aligned} + X\\ + Y\\ + Z + \end{aligned} + \right) +\] +\[ +\left\lbrace\begin{array}{cccclcl} +x&=&-X\sin\theta&-&Y\sin\varphi\cos\theta&+&Z\cos\varphi\cos\theta\\ +y&=&\hphantom{-}X\cos\theta&-&Y\sin\varphi\sin\theta&+&Z\cos\varphi\sin\theta\\ +z&=&0&+&Y\cos\varphi&+&Z\sin\varphi +\end{array} +\right. +\] + +If we consider a point on the plane in the plane $XOY$ + +\[ +\left\lbrace\begin{array}{ccccl} +x&=&-X\sin\theta&-&Y\sin\varphi\cos\theta\\ +y&=&\hphantom{-}X\cos\theta&-&Y\sin\varphi\sin\theta\\ +z&=&0&+&Y\cos\varphi +\end{array} +\right. +\] +Et si maintenant, ce repère $OXYZ$ est translaté en un point +$O'(x_{O'},y_{O'},z_{O'})$ +\[ +\left\lbrace\begin{array}{cccclcl} +x&=&-X\sin\theta&-&Y\sin\varphi\cos\theta&+&x_{O'}\\ +y&=&\hphantom{-}X\cos\theta&-&Y\sin\varphi\sin\theta&+&y_{O'}\\ +z&=&0&+&Y\cos\varphi&+&z_{O'} +\end{array} +\right. +\] + +Remarks: +\begin{itemize} +\item $\overrightarrow{K}$ since we can obviously choose another associated base $ (\overrightarrow {I}, +\overrightarrow {J}) $ by turning the previously calculated around $ \overrightarrow {K} $ of the selected angle. +For this first draft order I preferred to rotate the image, which probably has the disadvantage lengthen calculations \ldots\ + +\item Jean-Paul Vigneault made a different choice for the base $(\overrightarrow{I}, \overrightarrow{J} $, +he calculated $ \overrightarrow {J}$ from $\overrightarrow {K} $ by relation: +\[ +\overrightarrow{J}=\overrightarrow{K}\wedge \left(% + \begin{array}{c} + 1\\ + 0\\ + 0 + \end{array} + \right) +\] + $\overrightarrow{I}=\overrightarrow{J}\wedge\overrightarrow{K}$. +We can bring the system defined in `\textsf{pst-solides3d}' to the one I chose by setting the \textsf{phi} +of `\textsf{pst-solides3d}' (which allows you to turn the mark ) the proper value \ldots\ to calculate. + +\end{itemize} + diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-keywords-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-keywords-en.tex new file mode 100644 index 00000000000..90d4a8db49f --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-keywords-en.tex @@ -0,0 +1,611 @@ +\section{Alphabetical list of keywords} + + +%%% some convenient definitions +\def\|{\discretionary{|}{}{|}}%%% +\def\_{\discretionary{}{}{}}%%% +\def\[{{\upshape [}}%%% +\def\]{{\upshape ]}}%%% +\def\({{\upshape (}}%%% +\def\){{\upshape )}}%%% +\def\kwd#1{\texttt{\upshape #1}}%%% +\def\~{\discretionary{\kwd|}{}{\kwd|}}%%% +\let\mc\multicolumn%%% +\def\£{\hphantom{def}} + +\begin{tabular}{|p{3.5cm}|p{5.8cm}|} + \hline + \multicolumn2{|c|}{\textbf{Glossary of symbols}}\\[.2em] + \hline + \multicolumn{1}{|l|}{\textbf{Symbol}}& + \multicolumn{1}{l|}{\textbf{Use/meaning}} \\ \hline + \kwd{object}, \kwd{sommets}, ...& keywords\\ + $A$, $B$, $C$, $I$, $P$ & names of points\\ + $x$ $y$ & coordinates of a point in a plane\\ + $x$ $y$ $z$ & coordinates of a 3d point\\ + $r$ $\theta$ $\phi$ & spherical coordinates of a 3d point\\ + $L$, $M$ & names of lines\\ + $C$, $r$ & circle, centre name $C$, radius $r$\\ + $a$ $b$ $c$ & components of a normal\\ + \[$a$ $b$ $c$ $d$\]&the plane $ax+by+cz+d=0$\\ + $a$, $b$ & intercepts of lines\\ + $u$, $v$ & names of vectors\\ + $\alpha$ & angle/angle of rotation\\ + $k$ & scaling factor\\ + $S$ & name of a solid\\ + $i$ & index number of a vertex/face\\ + $w$ & linewidth\\ + \textit{num} & integer\\ + \textit{value} & real number\\ + \textit{length} & positive real number\\ + \textit{string} & text string\\ + $a$\~$b$\~$c$\~... & alternatives\\ + \hline +\end{tabular} + + +\begin{longtable}{|>{\bfseries\ttfamily\color{blue}}p{2.4cm}@{} + |>{\ttfamily}p{4.5cm}@{}|>{\itshape}p{7.5cm}@{}|>{\ttfamily}p{1.7cm}@{}|} + \hline + \multicolumn{1}{|l|}{\textbf{Name}}& + \multicolumn{1}{l|}{\textbf{Command/Object}}& + \multicolumn{1}{l|}{\textbf{Value}}& + \multicolumn{1}{l|}{\textbf{Default}} \\ \hline\hline +\endfirsthead +\hline + \multicolumn{1}{|l|}{\textbf{Name}}& + \multicolumn{1}{l|}{\textbf{Command/Object}}& + \multicolumn{1}{l|}{\textbf{Value}}& + \multicolumn{1}{l|}{\textbf{Default}} \\ \hline\hline +\endhead +\multicolumn{4}{|r|}{\textit{Continued on next page}}\\ \hline +\endfoot +\hline \multicolumn{4}{|r|}{\textit{End of table}}\\ \hline +\endlastfoot + +a& + \textbackslash{}psSolid&&\\[.5em] + &object=cube\|tetrahedron\|octahedron\|% + dodecahedron\|icosahedron&length&2\\ + \hline + +a, b and c& + \textbackslash{}psSolid&&\\[.5em] + &object=\_parallelepiped&length&4\\ + \hline + +action& + \textbackslash{}psSolid&\upshape\ttfamily + none\|draw\|draw*\|draw**\|writeobj\|writeoff\|writesolid&\texttt{draw**}\\ + \hline + +affinage& + \textbackslash{}psSolid& + \kwd{all}\~ $i_0$ $i_1$ ... $i_n$&\\ + \hline + +affinage\-coeff& + \textbackslash{}psSolid&value&0.8\\ + \hline + +affinagerm& + \textbackslash{}psSolid& + boolean&true\\ + \hline + +algebraic& + \textbackslash{}psFunction, \textbackslash{}psSurface& + boolean&false\\ + \hline + +args& + \textbackslash{}psSolid&&\\[.5em] + + &object=plan&&\\ + &definition&&\\ + &\£=equation&\{\[a b c d \]\}\~% + \{\[a b c d \] $\alpha$\}&\\ + &\£=normalpoint&\{$x_0$ $y_0$ $z_0$ \[a b c\]\}\~&\\ + &&\{$x_0$ $y_0$ $z_0$ \[a b c $\alpha$\]\}\~&\\ + &&\{$x_0$ $y_0$ $z_0$ \[$u_x$ $u_y$ $u_z$ a b c\]\}\~&\\ + &&\{$x_0$ $y_0$ $z_0$ \[$u_x$ $u_y$ $u_z$ a b c $\alpha$\]\}&\\ + &\£=solidface&$S$ $i$&\\[.5em] + + &object=point&$x$ $y$ $z$ \~ $P$&\\ + &definition&&\\ + &\£=addv3d&$x_1$ $y_1$ $z_1$ $x_2$ $y_2$ $z_2$ \~ u v&\\ + &\£=barycentre3d&\{\[$A$ $i_A$ $B$ $i_B$\]\}&\\ + &\£=hompoint3d&$P$ $A$ $k$&\\ + &\£=isobarycentre3d&\{\[$A_0$ $A_1$ ... $A_n$\]\}&\\ + &\£=milieu3d&$A$ $B$&\\ + &\£=mulv3d&$x$ $y$ $z$ $k$ \~ $u$ $k$&\\ + &\£=normalize3d&$x$ $y$ $z$ \~ $u$&\\ + &\£=orthoprojplane3d&$P$ $A$ $v$&\\ + &\£=rotateOpoint3d&$P$ $\alpha_x$ $\alpha_y$ $\alpha_z$&\\ + &\£=scaleOpoint3d&$x$ $y$ $z$ $k_x$ $k_y$ $k_z$ \~ name $k_x$ $k_y$ $k_z$&\\ + &\£=solidcentreface&$S$ $i$&\\ + &\£=solidgetsommet&$S$ $i$&\\ + &\£=subv3d&$x_1$ $y_1$ $z_1$ $x_2$ $y_2$ $z_2$ \~ $u$ $v$&\\ + &\£=sympoint3d&$P$ $A$&\\ + &\£=translatepoint3d&$P$ $v$&\\ + &\£=vectprod3d&$x_1$ $y_1$ $z_1$ $x_2$ $y_2$ $z_2$ \~ $u$ $v$&\\[.5em] + + &object=vecteur&$x$ $y$ $z$ \~&\\ + &&$x_1$ $y_1$ $z_1$ $x_2$ $y_2$ $z_2$ \kwd{addv3d} \~&\\ + &&$x_1$ $y_1$ $z_1$ $x_2$ $y_2$ $z_2$ \kwd{subv3d} \~&\\ + &&$x$ $y$ $z$ $k$ \kwd{mulv3d} \~&\\ + &&$x$ $y$ $z$ \kwd{normalize3d} \~&\\ + &&$x_1$ $y_1$ $z_1$ $x_2$ $y_2$ $z_2$ \kwd{vectprod3d} &\\[.5em] + + &object=vecteur3d&$x_A$ $y_A$ $z_A$ $x_B$ $y_B$ $z_B$ \~ $A$ $B$&\\[.6em] + +args& + \textbackslash{}psProjection&&\\[.5em] + + &object=cercle&$x$ $y$ $r$ \~ $C$ $r$&\\ + &definition&&\\ + &\£=ABcercle&$A$ $B$ $C$&\\ + &\£=diamcercle&$A$ $B$&\\[.5em] + + &object=droite&$x_1$ $y_1$ $x_2$ $y_2$ \~ $A$ $B$&\\ + &definition&&\\ + &\£=axesymdroite&$L$ $M$&\\ + &\£=bissectrice&$A$ $B$ $C$&\\ + &\£=horizontale&$b$&\\ + &\£=mediatrice&$A$ $B$&\\ + &\£=paral&$L$ $A$&\\ + &\£=perp&$L$ $A$&\\ + &\£=rotatedroite&$L$ $A$ $\alpha$&\\ + &\£=translatedroite&$L$ $u$&\\ + &\£=verticale&$a$&\\[.5em] + + &object=line&$A_0$ $A_1$ ... $A_n$&\\[.5em] + + &object=point&&\\ + &definition&&\\ + &\£=axesympoint&$P$ $L$&\\ + &\£=cpoint&$\alpha$ $C$ $r$&\\ + &\£=hompoint&$P$ $A$ $k$&\\ + &\£=interdroite&$L$ $M$&\\ + &\£=interdroitecercle&$L$ $C$ $r$&\\ + &\£=milieu&$A$ $B$&\\ + &\£=orthoproj&$P$ $L$&\\ + &\£=parallelopoint&$A$ $B$ $C$&\\ + &\£=projx&$P$&\\ + &\£=projy&$P$&\\ + &\£=rotatepoint&$P$ $I$ $\alpha$&\\ + &\£=sympoint&$P$ $I$&\\ + &\£=translatepoint&$P$ $u$&\\ + &\£=xdpoint&$x$ $L$&\\ + &\£=ydpoint&$y$ $L$&\\[.5em] + + &object=polygone&$A_0$ $A_1$ ... $A_n$&\\ + &definition&&\\ + &\£=axesympol&pol $L$&\\ + &\£=hompol&pol $I$ $\alpha$&\\ + &\£=rotatepol&pol $I$ $\alpha$&\\ + &\£=sympol&pol $I$&\\ + &\£=translatepol&pol $u$&\\[.5em] + + &object=rightangle&$A$ $B$ $C$&\\[.5em] + + &object=vecteur&&\\ + &definition&&\\ + &\£=addv&$A$ $B$&\\ + &\£=mulv&$u$ $k$&\\ + &\£=normalize&$u$&\\ + &\£=orthovecteur&$u$&\\ + &\£=subv&$u$ $v$&\\ + &\£=vecteur&$A$ $B$&\\ + \hline + +axe& + \textbackslash{}psSolid&&\\[.5em] + &object=\_cylindre\|prisme\|ruban&$x$ $y$ $z$&0 0 1\\ + \hline + +axesboxed& + \textbackslash{}psSolid&boolean&false\\ + \hline + +axisemph& + \textbackslash{}axesIIID~ \textbackslash{}gridIIID&\{text style\}&\\ + \hline + +axisnames& + \textbackslash{}axesIIID&\{a,b,c\}&\{x,y,z\}\\ + \hline + +base& + \textbackslash{}psSolid&&\\[.5em] + &object=face\|prisme\|ruban&$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$ ... + $x_n$ $y_n$&\begin{tabular}[t]{rr} -1 & -1\\ 1 & -1\\ 0 & 1\end{tabular}\\ + &object=fusion&$S_1$ $S_2$&\\ + &object=grille&$x_{\textrm{\upshape\scriptsize min}}$ + $x_{\textrm{\upshape\scriptsize max}}$ + $y_{\textrm{\upshape\scriptsize min}}$ $y_{\textrm{\upshape\scriptsize max}}$&\\ + \hline + +biface& + \textbackslash{}psSolid&&\\[.5em] + &object=face&boolean&true\\ + \hline + +chanfrein& + \textbackslash{}psSolid&boolean&false\\ + \hline + +chanfrein\-coeff& + \textbackslash{}psSolid&value&0.2\\ + \hline + +deactiv\-atecolor& + \textbackslash{}psSolid&boolean&false\\ + \hline + +decal& + \textbackslash{}psSolid&num&-2\\ + \hline + +definition& + \textbackslash{}psSolid&&\\[.5em] + &object=plan& + \upshape\ttfamily + equation\|normalpoint\|solidface&\\[.5em] + &object=point& + \upshape\ttfamily + addv3d\|barycentre3d\|hompoint3d\|isobarycentre3d\|milieu3d\|% + orthoprojplane3d\|rotateOpoint3d\|scaleOpoint3d\|solidcentreface\|% + solidgetsommets&\\ + &&&\\[-.6em] + &object=vecteur& + \upshape\ttfamily + vecteur3d\|addv3d\|subv3d\|mulv3d\|normalize3d\|vectprod3d&{}\\ + &&&\\[-.6em] +definition& + \textbackslash{}psProjection&&\\[.5em] + &object=cercle& + \upshape\ttfamily + ABcercle\|diamcercle&\\ + &&&\\[-.6em] + &object=droite& + \upshape\ttfamily + axesymdroite\|bissectrice\|horizontale\|mediatrice\|% + paral\|perp\|rotatedroite\|translatedroite\|% + verticale&\\ +% &&&\\[-.6em] + &object=point& + \upshape\ttfamily + axesympoint\|cpoint\|hompoint\|interdroite\|interdroitecercle\|% + milieu\|orthoproj\|parellelopoint\|projx\|projy\|rotatepoint\|% + sympoint\|translatepoint\|xdpoint\|ydpoint&\\ +% &&&\\[-.6em] + &object=polygone& + \upshape\ttfamily + axesympol\|hompol\|rotatepol\|sympol\|% + translatepol&\\ +% &&&\\[-.6em] + &object=vecteur& + \upshape\ttfamily + addv\|normalize\|mulv\|orthovecteur\|subv\|vecteur&\\ +\hline + +dualreg& + \textbackslash{}psSolid&&\\[.5em] + &object=geode&boolean&false\\ + \hline + +faces& + \textbackslash{}psSolid&&\\[.5em] + &object=new&\{\[$i_1$ $i_2$ ... $i_n$ \]\[$i_1'$ $i_2'$ ... $i_m'$ \] ... \}&\\ + \hline + +fcol& + \textbackslash{}psSolid& $i_0$ \($color_0$\) $i_1$ \($color_1$\) ...&\\ + \hline + +fcolor& + \textbackslash{}psSolid&&\\[.5em] + &affinagerm& color &\\ + \hline + +file& + \textbackslash{}psSolid&&\\[.5em] + &action=writesolid&filename&\\[.5em] + &object=datfile\|objfile\|offfile&filename&\\ + \hline + +fillcolor& + \textbackslash{}psSolid, \textbackslash{}psSurface&color&white\\ + \hline + +function& + \textbackslash{}psSolid, \textbackslash{}defFunction&&\\[.5em] + &object=cone\|courbe\|courbeR2\|cylindre\|surfaceparametree&name&\\ + \hline + +grid& + \textbackslash{}psSolid&boolean&true\\ + \hline + +h& + \textbackslash{}psSolid&&\\[.5em] + &object=cone\|cylindre\|prisme\|tronccone&length&6\\ + \hline + +hollow& + \textbackslash{}psSolid&&\\[.5em] + &object=cone\|cylindre\|prisme\|tronccone&boolean&false\\ + \hline + +hue,& + \textbackslash{}psSolid, \textbackslash{}psSurface&$h_0$ $h_1$&\\ +inhue, &&$h_0$ $h_1$ $s$ $b$&\\ +inouthue &&$h_0$ $s_0$ $b_0$ $h_1$ $s_1$ $b_1$ \kwd{(hsb)}&\\ + &&$r_0$ $g_0$ $b_0$ $r_1$ $g_1$ $b_1$&\\ + &&$c_0$ $m_0$ $y_0$ $k_0$ $c_1$ $m_1$ $y_1$ $k_1$&\\ + &&\(color$_1$\) \(color$_2$\)&\\ + \hline + +incolor& + \textbackslash{}psSolid, \textbackslash{}psSurface&color&green\\ + \hline + + +intersec\-tioncolor& + \textbackslash{}psSolid&\(color$_1$\) ... \(color$_n$\)&(rouge)\\ + \hline + +intersec\-tionline\-width& + \textbackslash{}psSolid&$w_1$ ... $w_n$&1\\ + \hline + +intersec\-tionplan& + \textbackslash{}psSolid, \textbackslash{}psSurface&name \~ \{eq$_1$ ... eq$_n$\} + \textrm{\upshape where eq$_i$=}\[$a_i$ $b_i$ $c_i$ $d_i$\]&\\ + \hline + +labelsep& + \textbackslash{}axesIIID&length[unit]&\\ + \hline + + +light\-intensity& + \textbackslash{}psSolid, \textbackslash{}psSurface&value&2\\ + \hline + +lightsrc& + \textbackslash{}psSolid, \textbackslash{}psSurface&$x$ $y$ $z$&20 30 50\\ + \hline + +load& + \textbackslash{}psSolid&&\\[.5em] + &object=load&name&\\ + \hline + +mathLabel& + \textbackslash{}axesIIID&boolean&true\\ + \hline + +mode& + \textbackslash{}psSolid& + \upshape\ttfamily + 0\|1\|2\|3\|4&0\\ + \hline + +name& + \textbackslash{}psSolid, \textbackslash{}psProjection&name&\\ + \hline + +ngrid& + \textbackslash{}psSolid&&\\[.5em] + &object=cube\|prisme\|prismecreux&$n_1$&\\ + &&&\\[-0.6em] + &object=cone\|conecreux\|cylindre\|cylindrecreux\|% + tore\|tronccone\|troncconecreux&$n_1$ $n_2$&\\ + &&&\\[-0.6em] + &object=grille\|surface\|surface*\|surfaceparametree&$n_1$\~ $n_1$ $n_2$&\\ + \hline + +num& + \textbackslash{}psSolid&\kwd{all} \~ $i_0$ $i_1$ ... $i_n$&\\ + \hline + +object& + \textbackslash{}psSolid& + \upshape\ttfamily + new\|anneau\|calottesphere\|cone\|conecreux\|cube\|% + cylindre\|cylindrecreux\|datfile\|dodecahedron\|face\|% + fusion\|geode\|grille\|icosahedron\|load\|octahedron\|% + objfile\|parallelepiped\|plan\|prisme\|ruban\|% + sphere\|surfaceparametree\|tetrahedron\|% + tore\|tronccone\|troncconecreux&\\ + &&&\\[-0.6em] +object& + \textbackslash{}psProjection& + \upshape\ttfamily + cercle\|courbe\|courbeR2\|droite\|line\|point\|polygone\|% + rightangle\|texte\|vecteur&\\ + \hline + + +opacity& + \textbackslash{}psSolid&value&1\\ + \hline + +origine& + \textbackslash{}psSolid&&\\[.5em] + &object=plan&$x_0$ $y_0$ $z_0$&0 0 0\\ + \hline + +path& + \textbackslash{}psProjection&pscode&newpath 0 0 moveto\\ + \hline + +phi& + \textbackslash{}psSolid, \textbackslash{}psProjection&$\alpha$&0\\ + \hline + +plangrid& + \textbackslash{}psSolid&&\\[.5em] + &object=plan&boolean&false\\ + \hline + +planmarks& + \textbackslash{}psSolid&&\\[.5em] + &object=plan&boolean&false\\ + \hline + +plansection& + \textbackslash{}psSolid&\{plan$_1$ ... plan$_n$\} \textrm{\upshape where + plan$_i$=}\[$a_i$ $b_i$ $c_i$ $d_i$\]&\\ + \hline + +plansepare& + \textbackslash{}psSolid&\{\[a b c d \]\}&\\ + \hline + +\pagebreak + +pos& + \textbackslash{}psProjection&&\\[0.5em] + &object=point& + \upshape\ttfamily + ul\~cl\~bl\~dl\~ub\~cb\~bb\~db\~uc\~cc\~bc\~dc\~ur\~cr\~br\~dr&cc\\ + \hline + +QZ& + \textbackslash{}psSolid, \textbackslash{}psSurface&value&0\\ + \hline + +RotX, RotY, RotZ& + \textbackslash{}psSolid&$\alpha$&0\\ + \hline + +r& + \textbackslash{}psSolid&&\\[.5em] + &object=anneau\|courbe&length&2\\ + \hline + +R& + \textbackslash{}psSolid&&\\[.5em] + &object=anneau&length&4\\ + \hline + +r0& + \textbackslash{}psSolid&&\\[.5em] + &object=tore\|troncone\|troncconecreux&length&1.5\\ + \hline + +r1& + \textbackslash{}psSolid&&\\[.5em] + &object=tore\|troncone\|troncconecreux&length&4\\ + \hline + +range& + \textbackslash{}psSolid&&\\[.5em] + &object=cercle\|courbe\|courbeR2&$t_{\textrm{\upshape\scriptsize min}}$ + $t_{\textrm{\upshape\scriptsize max}}$&-5 5\\ + &&&\\[-0.6em] + &object=surfacepara\-metree&$u_{\textrm{\upshape\scriptsize min}}$ + $u_{\textrm{\upshape\scriptsize max}}$ + $v_{\textrm{\upshape\scriptsize min}}$ $v_{\textrm{\upshape\scriptsize max}}$&\\ + \hline + +resolution& + \textbackslash{}psSolid&&\\[.5em] + &object=courbe\|courbeR2\|ruban&$n$&36\\ + \hline + +rm& + \textbackslash{}psSolid&$i_0$ $i_1$ ... $i_n$&\\ + \hline + +section& + \textbackslash{}psSolid&&\\[.5em] + &object=anneau¯o\{pscode\}&\textbackslash{}Section\\ + \hline + +show& + \textbackslash{}psSolid&\kwd{all} \~ $i_0$ $i_1$ ... $i_n$&\\ + \hline + +showBase& + \textbackslash{}psSolid&&\\[.5em] + &object=plan&boolean&false\\ + \hline + +showbase& + \textbackslash{}psSolid&&\\[.5em] + &object=plan&boolean&false\\ + \hline + +showOrigin& + \textbackslash{}axesIIID&boolean&true\\ + \hline + +sommets& + \textbackslash{}psSolid&&\\[.5em] + &object=new&$x_1$ $y_1$ $z_1$ $x_2$ $y_2$ $z_2$ ... $x_n$ $y_n$ $z_n$&\\ + \hline + +spotX,spotY, spotZ& + \textbackslash{}psSurface, \textbackslash{}gridIIID& + \upshape\ttfamily + u\~ul\~l\~dl\~d\~dr\~r\~ur&\\ + \hline + +stepX,stepY, stepZ& + \textbackslash{}gridIIID&$n$&1\\[.5em] + \hline + +text& + \textbackslash{}psProjection&&\\[0.5em] + &object=point&string&\\ + \hline + +theta& + \textbackslash{}psSolid&&\\[.5em] + &object=calottesphere&$\alpha$&90\\ + \hline + +ticklength& + \textbackslash{}gridIIID&$length$&0.2\\[.5em] + \hline + +transform& + \textbackslash{}psSolid, \textbackslash{}defFunction + &\{pscode\}\~function&\\[.5em] + \hline + +trunc& + \textbackslash{}psSolid& + \kwd{all} \~ $i_0$ $i_1$ ... $i_n$&\\ + \hline + +trunccoeff& + \textbackslash{}psSolid&value&0.2\\ + \hline + + +viewpoint& + \textbackslash{}psset&$x$ $y$ $z$ \~ $r$ $\theta$ $\phi$ + \kwd{rtp2xyz} + &10 10 10\\ + \hline + +visibility& + \textbackslash{}psSolid, \textbackslash{}psProjection&boolean&true\\ + \hline + + +Zmin& + \textbackslash{}psSurface, \textbackslash{}gridIIID&value&-4\\ + \hline + +Zmax& + \textbackslash{}psSurface, \textbackslash{}gridIIID&value&4\\ + +\end{longtable} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-ligne3D-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-ligne3D-en.tex new file mode 100644 index 00000000000..0632869a50b --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-ligne3D-en.tex @@ -0,0 +1,38 @@ +\section{Drawing a \Index{line}} + +This command is adapted from the macro \verb+\pstThreeDLine+ from the package +\texttt{pst-3dplot} of Herbert \textsc{Voss}% +\footnote{\url{http://tug.ctan.org/tex-archive/graphics/pstricks/contrib/pst-3dplot}.} + +We use \texttt{\textbackslash psLineIIID[options](x0,y0,z0)(x1,y1,z1)\ldots(xn,yn,zn)}, +with the following possible options: +\begin{itemize} + \item \texttt{\Lkeyword{linecolor}=colour}; + \item \texttt{\Lkeyword{doubleline}=true}; + \item \texttt{\Lkeyword{linearc}=value}. +\end{itemize} +It is not possible to put arrowheads at the ends of the lines. + +\begin{LTXexample}[width=6.5cm] +\psset{viewpoint=50 20 30 rtp2xyz,Decran=50} +\begin{pspicture}(-3,-4)(4,4) +\psSolid[object=cube,a=4,action=draw*, + fillcolor=magenta!20]% +\psLineIIID[linecolor=blue, + linewidth=0.1,linearc=0.5, + doubleline=true](-2,-2,-2)(2,2,2)(2,2,-2)(2,-2,0) +\psPoint(2,-2,0){A}\psPoint(-2,-2,-2){B} +\psPoint(2,2,2){C}\psPoint(2,2,-2){D} +\psdot[dotsize=0.2](A)\psdot[dotsize=0.2](B) +\psdot[dotsize=0.2](C)\psdot[dotsize=0.2](D) +\psLineIIID[linecolor=green]% + (-2,-2,-2)(2,2,2)(2,2,-2)(2,-2,0) +\psPolygonIIID[linecolor=red, + fillstyle=vlines,linearc=0.5, + linewidth=0.1](-2,-2,2)(-2,2,2)(2,2,2)(2,-2,2) +\axesIIID(2,2,2)(4,4,4) +\end{pspicture} +\end{LTXexample} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-lignedeniveau-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-lignedeniveau-en.tex new file mode 100644 index 00000000000..a1081a17c9b --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-lignedeniveau-en.tex @@ -0,0 +1,44 @@ +\section{Lines of \Index{intersecting planes}} + +For every object of the type \Lcs{psSolid}, it is possible to draw the lines +of intersection between a chosen solid and one or more planes. + +The numeric argument \texttt{\Lkeyword{intersectiontype}=$k$} (value $-1$ by default) +determines whether or not to draw the intersection lines. Set to $0$, the +intersection lines are drawn. + +There are three keys to be handled: + +\begin{itemize} + +\item \texttt{\Lkeyword{intersectionplan}=\{[$eq_1$] ... [$eq_n$]\}} +defines a list of the equations $eq_i$ of the intersecting planes. The $eq_i$ +could as well be some objects from the type \Lkeyword{plan} (see the related section). +\begin{equation*} + ax+by+cz+d=0 \qquad \text{that would deliver $[a\, b\, c\, d\,]$ as one of the $n$ equations} +\end{equation*} + +\item \texttt{\Lkeyword{intersectionlinewidth}=$w_1$ ... $w_n$} +defines a list of the thickness in picas $w_i$ for each of the intersection lines. + +\item \texttt{\Lkeyword{intersectioncolor}=color$_1$ ... color$_n$} +defines a list for the colors of the intersection lines. + +\end{itemize} + +\begin{LTXexample}[width=6cm] +\psset{lightsrc=20 -20 10,viewpoint=50 -20 10 rtp2xyz,Decran=50} +\psset{unit=0.5} +\begin{pspicture*}(-5,-4)(5,5) +\psSolid[object=cube, + intersectiontype=0, + intersectionplan={[1 0 .5 2] [1 0 .5 -1]}, + intersectionlinewidth=1 2, + intersectioncolor=(bleu) (rouge), + RotX=20,RotY=90,RotZ=30, + a=6, + action=draw*] +\end{pspicture*} +\end{LTXexample} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-modes-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-modes-en.tex new file mode 100644 index 00000000000..755db834811 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-modes-en.tex @@ -0,0 +1,51 @@ +\section{The \Index{modes}} + +For some solids, there are certain gratings predefined. +We can setup the key values to \texttt{\Lkeyword{mode}=0, 1, 2, 3 or 4} which allows to have some some gratings from very coarse \texttt{\Lkeyword{mode}=0} up to very fine \texttt{\Lkeyword{mode}=4}. + +This permits us to have a draft version of a solid with \texttt{\Lkeyword{mode}=0} (fewer calculations) and then refine it with \texttt{\Lkeyword{mode}=4} for the final version. + +\psResetSolidKeys +%% avec mode = 0 +\begin{center} +\psset{lightsrc=10 5 0,viewpoint=50 20 -40 rtp2xyz,Decran=35,unit=0.5cm,% + incolor=white,fillcolor=green!50,r0=5,r1=2,h=5,object=troncconecreux,r0=5,r1=2,h=5} +\begin{pspicture}(-5,-5)(5,5) +\psframe(-5,-5)(5,5) +\psSolid[mode=0] +\rput(0,-4.5){\psframebox[fillstyle=solid,fillcolor=black]{\small \textcolor{white}{\texttt{[mode=0]}}}} +\end{pspicture} +% +\begin{pspicture}(-5,-5)(5,5) +\psframe(-5,-5)(5,5) +\psSolid[mode=1]% +\rput(0,-4.5){\psframebox[fillstyle=solid,fillcolor=black]{\small\textcolor{white}{\texttt{[mode=1]}}}} +\end{pspicture} +% +\begin{pspicture}(-5,-5)(5,5) +\psframe(-5,-5)(5,5) +\psSolid[mode=2]% +\rput(0,-4.5){\psframebox[fillstyle=solid,fillcolor=black]{\textcolor{white}{\texttt{[mode=2]}}}} +\end{pspicture} +% +\begin{pspicture}(-5,-5)(5,5) +\psframe(-5,-5)(5,5) +\psSolid[mode=3]% +\rput(0,-4.5){\psframebox[fillstyle=solid,fillcolor=black]{\textcolor{white}{\texttt{[mode=3]}}}} +\end{pspicture} +% +\begin{pspicture}(-5,-5)(5,5) +\psframe(-5,-5)(5,5) +\psSolid[mode=4]% +\rput(0,-4.5){\psframebox[fillstyle=solid,fillcolor=black]{\textcolor{white}{\texttt{[mode=4]}}}} +\end{pspicture} +% +\begin{pspicture}(-5,-5)(5,5) +\psframe(-5,-5)(5,5) +\psSolid[mode=5]% +\rput(0,-4.5){\psframebox[fillstyle=solid,fillcolor=black]{\small\textcolor{white}{\texttt{[mode=5] => [mode=4] forced}}}} +\end{pspicture} +\end{center} +%\newpage + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-new-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-new-en.tex new file mode 100644 index 00000000000..cc29fb6e98f --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-new-en.tex @@ -0,0 +1,142 @@ +\section{Construction from scratch} + +The object \Lkeyword{new} constructs a solid. Two parameters are used: \Lkeyword{sommets} +which indicates the list of coordinates of the different vertices, and \Lkeyword{faces} which +gives the list of faces of the solid; a face is characterized by a list of the indices of its\Index{vertices}, listed +in counterclockwise order +when the face is viewed from the exterior of the solid. + +\clearpage + +\subsection{Example 1: a house} +\begin{LTXexample}[width=6.5cm] +\psset{unit=0.5} +\psset{lightsrc=10 -20 50,viewpoint=50 -20 30 rtp2xyz,Decran=50} +\begin{pspicture*}(-7,-4)(7,7) +\psSolid[object=new, + sommets= + 2 4 3 -2 4 3 -2 -4 3 2 -4 3 + 2 4 0 -2 4 0 -2 -4 0 2 -4 0 + 0 4 5 0 -4 5, + faces={ + [0 1 2 3] [7 6 5 4] [0 3 7 4] + [3 9 2] [1 8 0] [8 9 3 0] + [9 8 1 2] [6 7 3 2] [2 1 5 6]}, + num=all,show=all,action=draw] +\end{pspicture*} +\end{LTXexample} + +Note that the solid \Lkeyword{new} uses the same options as the other solids. +For example, we give the same solid as above below, using the parameters +\Lkeyword{hollow}, \Lkeyword{incolor}, \Lkeyword{fillcolor}, and \Lkeyword{rm}. + +%% example 2 +\begin{LTXexample}[width=6.5cm] +\psset{unit=0.5} +\psset{lightsrc=10 -20 50,viewpoint=50 -20 30 rtp2xyz,Decran=50} +\begin{pspicture*}(-7,-3.5)(7,7.5) +\psSolid[object=new,fillcolor=red!50,incolor=yellow, + action=draw**,hollow,rm=2, + sommets= + 2 4 3 -2 4 3 -2 -4 3 2 -4 3 + 2 4 0 -2 4 0 -2 -4 0 2 -4 0 + 0 4 5 0 -4 5, + faces={ [0 1 2 3][7 6 5 4][0 3 7 4] + [3 9 2] [1 8 0] [8 9 3 0][9 8 1 2] + [6 7 3 2][2 1 5 6]}, + num=all,show=all] +\end{pspicture*} +\end{LTXexample} + +\subsection{Example 2: a \Index{hyperboloid} with a fixed radius} + +%\psset{lightsrc=10 20 30,SphericalCoor=true,viewpoint=50 20 30} +%\psset{SphericalCoor=true,viewpoint=50 20 30} + + +As always, the options of the macro \Lcs{psSolid} can handle Postscript code, even \textit{jps code} + +Unlike an example in pure PostScript, where we use the parameters +$a$, $b$ and $h$ which are transmitted by the options of PSTricks. +In this way one obtains a variable solid constructed from scratch. + +Remark: the code being used comes from a \textit{jps} source used in practice, as in: + +\noindent\url{http://melusine.eu.org/lab/bjps/solide/tour.jps} +\begin{LTXexample}[width=6.5cm] +\psset{unit=0.75} +\psset{lightsrc=10 -20 50,viewpoint=50 -20 30 rtp2xyz,Decran=50} +\begin{pspicture*}(-5,-5)(3,5) +\psSolid[object=new,fillcolor=red!50,incolor=yellow, + hollow, a=10, %% nb d'etages + b=20, %% diviseur de 360, nb de meridiens + h=8, %% hauteur + action=draw**,sommets= + /z0 h neg 2 div def + a -1 0 { + /k exch def + 0 1 b 1 sub { + /i exch def + /r z0 h a div k mul add dup mul 4 div 1 add sqrt def + 360 b idiv i mul cos r mul 360 b idiv i mul sin r mul + z0 h a div k mul add + } for + } for, + faces={ + 0 1 a 1 sub { + /k exch def + k b mul 1 add 1 k 1 add b mul 1 sub { + /i exch def + [i i 1 sub b i add 1 sub b i add] + } for + [k b mul k 1 add b mul 1 sub k 2 add b mul 1 sub k 1 add b mul] + } for +}] +\end{pspicture*} +\end{LTXexample} + + + +\subsection{Example 3: importing external files} + + +From a file describing a solid in a particular format (other than \texttt{\Index{.obj}} or \texttt{\Index{.off}}), +we can create a \texttt{\Index{.dat}} file containing the coordinates of the vertices, +and another \texttt{.dat} file containing the tables of indices of the vertices on each face. +These files can then be entered as parameters \Lkeyword{sommets} and \Lkeyword{faces} +when using the PostScript instruction \Lkeyword{run}. + + +In the example below, the files \verb+sommets_nefer.dat+ +and \verb+faces_nefer.dat+ have been placed in the directory of the compiler. + +\begin{LTXexample}[width=5.5cm] +\psset{unit=0.4} +\definecolor{AntiqueWhite}{rgb}{0.98,0.92,0.84} +\begin{pspicture}(-7,-9)(7,7) +\psset{lightsrc=30 -40 10} +\psset{viewpoint=50 -50 20 rtp2xyz,Decran=50} +\psset{RotX=90,sommets= (data/sommets_nefer.dat) run} +\psSolid[object=new,fillcolor=AntiqueWhite,linewidth=0.5\pslinewidth, + faces={(data/faces_nefer.dat) run}]% +\psSolid[object=new,fillcolor=red,linewidth=0.5\pslinewidth, + faces={(data/faces_nefer_levres.dat) run}]% +\psSolid[object=new,fillcolor=black, + faces={(data/faces_nefer_sourcils.dat) run}]% +\end{pspicture} +\hfill +\begin{pspicture}(-7,-9)(7,7) +\psset{lightsrc=-10 -40 -5,lightintensity=.5} +\psset{viewpoint=50 -80 10 rtp2xyz,Decran=50} +\psset{RotX=90,RotZ=30,sommets= (data/sommets_nefer.dat) run} +\psSolid[object=new,fillcolor=AntiqueWhite,linewidth=0.5\pslinewidth, + grid,faces={(data/faces_nefer.dat) run}] +\psSolid[object=new,fillcolor=red,linewidth=0.5\pslinewidth,grid, + faces={(data/faces_nefer_levres.dat) run}] +\psSolid[object=new,fillcolor=black, + faces={(data/faces_nefer_sourcils.dat) run}] +\end{pspicture} +\end{LTXexample} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-nommersolide-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-nommersolide-en.tex new file mode 100644 index 00000000000..0c534dcf1a5 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-nommersolide-en.tex @@ -0,0 +1,62 @@ +\section{Naming a solid} + +For certain purposes, it is helpful to save a solid in working +storage to allow it to be referenced later on. To do so, we +activate the Boolean \Lkeyword{solidmemory}, which allows the +transmission of a variable throughout the code. + +Consequently, activation of this Boolean deactivates drawing +by the macros \Lcs{psSolid}, \Lcs{psSurface} and \Lcs{psProjection} +immediate. To obtain the drawing, we use the macro +\Lkeyword{\composeSolid} at the end of the code. + +When \verb+\psset{solidmemory}+ is set up, we can use the option +\Lkeyword{name} of the macro \Lcs{psSolid}. + +In the example below, a coloured solid is constructed, which is +named $A$. It is drawn using the object \texttt{\Lkeyword{object}=cube} with +the parameter \texttt{\Lkeyword{load}=$A$}. + +Note that \texttt{\Lkeyword{linecolor}=blue}, used while constructing our cube, +has no effect on the drawing: only the structure of the solid is +stored (vertices, faces, colours of faces), not the thickness of +any line, nor its colour, nor the position of the light source. +The settings of those parameters are taken into account at the +time the solid is rendered. + + +Finally, we demonstrate the use of the option +\Lkeyword{deactivatecolor} which allows the cube to keep its +original red colour (otherwise the default colours would be used +within the object \Lkeyword{load}). + +\psset{lightsrc=10 0 10,viewpoint=50 -20 10 rtp2xyz,Decran=50} +\begin{LTXexample}[width=6.5cm] +\psset{unit=0.75} +\begin{pspicture*}(-4,-4)(5,4) +\psset{solidmemory} +\psSolid[object=cube, + linecolor=blue, + a=4,fillcolor=red!50, + ngrid=3, + action=none, + name=A, + ](0,0,0) +\psSolid[object=load, + deactivatecolor, + load=A] +\composeSolid +\end{pspicture*} +\end{LTXexample} + +With the option \Lkeyword{solidmemory}, the names of variables are +relatively well encapsulated, and there will be no conflict with +the variables of the dvips driver. There remains however the risk +of a collision with the names used in the \texttt{solides.pro} +file. You could use only single letter variable names, for +example, and it is necessary to avoid names like \verb+vecteur+, +\verb+distance+, \verb+droite+, etc. which are already defined in +the package. + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-numeroterfacettes-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-numeroterfacettes-en.tex new file mode 100644 index 00000000000..e8eaf331ce3 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-numeroterfacettes-en.tex @@ -0,0 +1,99 @@ +\section{Numbering of the faces} + +The option \Lkeyword{numfaces} gives permission to number every face with its correspondent index number. +\begin{itemize} + \item \texttt{\Lkeyword{numfaces}=\Lkeyval{all}} all faces are numbered; + \item \verb+numefaces=0 1 2 3+ only the faces that have index 0, 1, 2 and 3 are numbered. +\end{itemize} +The option \Lkeyword{fontsize} allows to fix the measurement of the used character set. +Finally, the Boolean \Lkeyword{visibility} the numbering of \Index{faces} that are not visible. +By default, the Boolean is set to \texttt{\Lkeyword{visibility}=true}, so the visibility is set up (e.~g. numbers are not set to invisible faces). + + +\psset{viewpoint=50 20 30 rtp2xyz,Decran=50} +\begin{LTXexample}[width=8cm] +\psset{unit=1} +\begin{pspicture}(-4,-3)(3,1.5) +\psSolid[object=grille, + base=0 4 -2 2, + numfaces=2 6 7 10, + linecolor=gray](0,0,0) +\axesIIID(0,0,0)(4,2,1) +\end{pspicture} +\end{LTXexample} + + + +%% \begin{multicols}{2} +%% +%% \bgroup +%% \psset{SphericalCoor=true,viewpoint=50 20 30} +%% \begin{center} +%% \psset{unit=0.75} +%% \psset{lightsrc=30 -20 10,SphericalCoor=true,viewpoint=50 -20 10,Decran=50} +%% \begin{pspicture*}(-5,-4)(6,6) +%% \psframe(-5,-4)(6,6) +%% \axesIIID(0,0,0)(4,4,4) +%% \psSolid[object=cube, +%% RotY=90, +%% ngrid=4, +%% numfaces=2 6 10, +%% action=draw**](0,0,0) +%% \end{pspicture*} +%% \end{center} +%% \egroup +%% +%% \columnbreak +%% +%% \begin{verbatim} +%% \axesIIID(0,0,0)(4,4,4) +%% \psSolid[object=cube, +%% RotY=90, +%% ngrid=4, +%% numfaces=2 6 10, +%% action=draw**](0,0,0) +%% \end{verbatim} +%% +%% \end{multicols} + + + + +\psset{viewpoint=50 -20 10 rtp2xyz,Decran=50} +\begin{LTXexample}[width=8cm] +\begin{pspicture*}(-4,-3)(4,3) +\psSolid[object=cube, + RotY=90, + ngrid=4, + fontsize=15, + action=draw, + numfaces=all,](0,0,0) +\end{pspicture*} +\end{LTXexample} + +%%% exemple 3 + +The options of \Lcs{psSolid} accept PostScript commands, in particular the \verb+for+ loop. + +With the instruction \verb+numfaces=0 1 5 {} for+ all faces with the index numbers between 0 +and 5 are set up. The instruction \verb+numfaces=8 3 23 {} for+ sets up every third index number between 8 and 23. + +\psset{viewpoint=50 -20 10 rtp2xyz,Decran=50} +\begin{LTXexample}[width=8cm] +\begin{pspicture*}(-4,-3)(4,3) +\axesIIID(0,0,0)(8,3,2) +\psSolid[object=grille, + RotY=90, + RotZ=180, + ngrid=1., + fontsize=15, + numfaces= + 0 1 5 {} for + 8 3 23 {} for, + base=-2 2 -3 3, + visibility=false, + action=draw](0,0,0) +\end{pspicture*} +\end{LTXexample} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-opacity-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-opacity-en.tex new file mode 100644 index 00000000000..0f59166c0cf --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-opacity-en.tex @@ -0,0 +1,11 @@ +\section{Nuances of \Index{transparency}} + +The key value \texttt{\Lkeyword{opacity}=$k$} with $k \in \mathbb{R}$ and $0\leq +k\leq 1$, allows you to define the level of \Index{opacity}. + +Within \textit{jps code}, we use an equivalent expression +\texttt{$k$ setfillopacity}. The last expression finds its application in the option \Lkeyword{fcol}. For example the instruction, +\verb+fcol=0 (.5 setfillopacity yellow)+, +which defines the face with the index number 0, sets it to yellow with an opacity of 50\%. + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-parametres-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-parametres-en.tex new file mode 100644 index 00000000000..cff403cbab4 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-parametres-en.tex @@ -0,0 +1,271 @@ +\section{The parameters of \texttt{pst-solides3d}} + +\begin{longtable}{|>{\bfseries\ttfamily\color{blue}}l + |>{\ttfamily\centering}m{2cm}|m{10cm}|} + \hline + \multicolumn{1}{|c|}{\textbf{Parameter}}& + \multicolumn{1}{c|}{\textbf{Default}}& + \multicolumn{1}{c|}{\textbf{Description}} \\ \hline\hline +\endfirsthead +\hline + \multicolumn{1}{|c|}{\textbf{Parameter}}& + \multicolumn{1}{c|}{\textbf{Default}}& + \multicolumn{1}{c|}{\textbf{Description}} \\ \hline\hline +\endhead +\multicolumn{3}{|r|}{\textit{Continued on next page}}\\ \hline +\endfoot +\multicolumn{3}{|r|}{\textit{End of table}}\\ \hline +\endlastfoot + +object&&predefined objects for use with +\texttt{\textbackslash{}psSolid} and +\texttt{\textbackslash{}psProjection}: \texttt{\Lkeyword{object}=myName} +where \texttt{myName} is the type of object\\ +\hline + +viewpoint&10 10 10&the coordinates of the point of view\\ \hline + +a&2&the value of \texttt{a} has several interpretations: the edge +length of a cube, the radius of the circumscribed sphere of +regular polyhedrons, the length of one of the edges of a +parallelepiped\\ \hline + +r&2&the radius of a cylinder or sphere\\ \hline + +h&6&the height of a cylinder, cone, truncated cone, or prism\\ +\hline + +r0&1.5&the inner radius of a torus\\\hline + +r1&4&the mean radius of a torus\\ \hline + +phi&0&the lower latitude of a spherical zone\\ \hline + +theta&90&the upper latitude of a spherical zone\\ \hline + +a,b and c&4&the lengths of three incident edges of a parallelepiped\\ +\hline + +base&\begin{tabular}{rr}-1 & -1 \\ 1 & -1 \\ 0 & +1\end{tabular}&the coordinates of vertices in the $xy$-plane +for specified shapes\\ +\hline + +axe&0 0 1&the direction of the axis of inclination of a prism\\ +\hline + +action&draw**&uses the painting algorithm to draw the solid +without hidden edges and with coloured faces\\ \hline + +lightsrc&20 30 50&the Cartesian coordinates of the light source\\ +\hline + +lightintensity&2&the intensity of the light source\\ \hline + +ngrid&n1 n2& sets the grid for a chosen solid\\ \hline + +mode&0&sets a predefined grid: values are 0 to 4. +\texttt{mode=0} is a large grid and \texttt{mode=4} is a fine +grid\\ \hline + +grid& true&if \texttt{grid} is used then gridlines are suppressed\\ +\hline + +biface&true&draw the interior face; if you only want the exterior +shown write \texttt{biface=false} +\\ \hline + +algebraic&false&\texttt{algebraic=true} (also written as +\texttt{[algebraic]}) allows you to give the equation of a surface +in algebraic form (otherwise RPN is enabled); the package +\texttt{pstricks-add} must be loaded in the preamble\\ \hline + +fillcolor&white&specifies a colour for the outer faces of a +solid\\ \hline + +incolor&green&specifies a colour for the inner faces of a solid\\ +\hline + +hue&&the colour gradient used for the outer faces of a solid\\ +\hline + +inhue&&the colour gradient used for internal faces\\ +\hline + +inouthue&&the colour gradient used for both internal and +external faces as a single continuation\\ +\hline + +fcol&&permits you to specify, in order of face number $0$ to $n-1$ +(for $n$ faces) the colour of the appropriate face:\par +\texttt{fcol=0 (Apricot) 1 (Aquamarine) etc.}\\ \hline + +rm&&removes visible faces: \texttt{rm=1 2 8} removes faces 1, 2 +and 8 \\ \hline + +show&&determines which vertices are shown as points: +\texttt{show=0 1 2 3} shows the vertices 0, 1, 2 and 3, +\texttt{show=all} shows all the vertices\\ \hline + +num&&numbers the vertices; for example \texttt{num=0 1 2 3} +numbers the vertices 0,1,2 and 3, and \texttt{num=all} numbers +all the vertices\\ \hline + +name&&the name given to a solid\\ \hline + +solidname&&the name of the active solid\\ \hline + +RotX&0&the angle of rotation of the solid around $Ox$ (in +degrees)\\ \hline + +RotY&0&the angle of rotation of the solid around $Oy$ (in +degrees)\\ \hline + +RotZ&0&the angle of rotation of the solid around $Oz$ (in +degrees)\\ \hline + +hollow&false& draws the inside of hollow solids: cylinder, cone, +truncated cone and prism\\ \hline + +decal&-2&reassign the index numbers of the vertices within a \texttt{base}\\ +\hline + +axesboxed& false& this option for surfaces allows semi-automatic +drawing of the 3D coordinate axes, since the limits of $z$ must be +set by +hand; enabled with \texttt{axesboxed}\\ +\hline + +Zmin&$-4$& the minimum value of $z$\\ \hline + +Zmax&$4$& the maximum value of $z$\\ \hline + +QZ&$0$& shifts the coordinate axes vertically by the chosen value\\ +\hline + +spotX&dr&the position of the tick labels on the $x$-axis\\ \hline + +spotY&dl&the position of the tick labels on the $y$-axis\\ \hline + +spotZ&l&the position of the tick labels on the $z$-axis\\ \hline + +resolution&36&the number of points used to draw a curve\\ \hline + +range&-4 4 &the limits for function input\\ \hline + +function& f & the name given to a function\\ \hline + +path&newpath \par 0 0 moveto& the projected path\\ \hline + +%normal&0 0 1&the normal to the surface being defined\\ \hline + +text&&the projected text\\ \hline + +visibility&false& if \texttt{false} the text applied to a hidden +face is +not rendered\\ +\hline + +chanfreincoeff&0.2&the chamfering coefficient\\ \hline + +trunccoeff&0.25&the truncation coefficient\\ \hline + +dualregcoeff&1&the dual solid coefficient\\ \hline %%%% is this used anywhere? + +affinagecoeff&0.8&the hollowing coefficient\\ \hline + +affinage& & determines which faces are hollowed out: +\texttt{affinage=0 1 2 3} recesses faces 0, 1, 2 and 3, +\texttt{affinage=all} recesses all faces\\ \hline + +affinagerm& &keep the central part of hollowed out faces\\ \hline + +intersectiontype&-1&the type of intersection between a plane and a +solid; a positive value draws the intersection\\ \hline + +plansection&&list of equations of intersecting planes, when used +only for their intersections \\ +\hline + +plansepare&&the equation of the separating plane for a solid\\ +\hline + +{\small intersectionlinewidth}&1&the thickness of an intersection +in \texttt{pt}; if there are several inter\-sections of different +thicknesses then list them like so:\par +\texttt{intersectionlinewidth=1 1.5 1.8 etc.}\\ +\hline + +intersectioncolor&(rouge)&the colour used for intersections; if +several inter\-sections in different colours are required, list +them as follows:\par \texttt{intersectioncolor=(rouge) (vert) etc.}\\ +\hline + +intersectionplan&[0 0 1 0]&the equation of the intersecting +plane\\ \hline + +definition&&defines a point, a vector, a plane, a spherical arc, +etc.\\ \hline + +args&&arguments associated with \texttt{definition}\\ +\hline + +section&\textbackslash Section&the coordinates of the vertices of +a cross-section of a solid ring\\ \hline + +planmarks&false&scales the axes of the plane\\ \hline + +plangrid&false&draws the coordinate axes of the plane \\ \hline + +showbase&false&draws the unit vectors of the plane\\ \hline + +showBase&false&draws the unit vectors of the plane and the normal +vector to the plane\\ \hline + +deactivatecolor&false&disables the colour management of PSTricks\\ +\hline + +transform&&a formula, applied to the vertices of a solid, to +transform it\\ \hline + +axisnames&\{x,y,z\}&the labels of the axes in 3D\\ \hline + +axisemph&&the style of the axes labels in 3D\\ \hline + +showOrigin&true&draws the axes from the origin, or not if set to +\texttt{false}\\ \hline + +mathLabel&true&draws the axes labels in math mode, or not if set +to \texttt{false}\\ \hline + +file&&the name of the data file having \texttt{.dat} extension +written with \texttt{action=writesolid} or read with +\texttt{object=datfile}\\ +\hline + +load&&the name of the object to be loaded\\ \hline + +fcolor&&the colour of the refined parts of the faces of an object\\ +\hline + +sommets&&the list of vertices of a solid for use with \texttt{object=new}\\ +\hline + +faces&&the list of faces of a solid for use with \texttt{object=new}\\ +\hline + +stepX&1&a positive integer giving the interval between ticks on +the $x$-axis of \texttt{\textbackslash{}gridIIID}\\ \hline + +stepY&1&a positive integer giving the interval between ticks on +the $y$-axis of \texttt{\textbackslash{}gridIIID}\\ \hline + +stepZ&1&a positive integer giving the interval between ticks on +the $z$-axis of \texttt{\textbackslash{}gridIIID}\\ \hline + +ticklength&0.2&the length of tickmarks for +\texttt{\textbackslash{}gridIIID}\\ \hline + +\end{longtable} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-plan-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-plan-en.tex new file mode 100644 index 00000000000..347ff175073 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-plan-en.tex @@ -0,0 +1,364 @@ +\section{The object \texttt{plan}} + +\subsection{Presentation: type \texttt{plan\/} and type \texttt{solid} } + +The object +\Lkeyval{plan} is special in +\texttt{pst-solides3d}. However, all the objects presented until now have had a common structure: + they are of type \verb+solid+: in other words, they are defined by a list of vertices, faces and colours. + +For many applications, it is necessary to have some additional information for a \Index{plane}: an origin, an +orientation, a reference base etc. + +To fulfill all these requirements, another +data structure of type \Lkeyval{plan} was created, which allows one to save all this necessary information. These manipulations of the plane will be controlled +by such an object. +Only when rendering takes place will an object of type \Lkeyval{plan} be converted to an object of type \verb+solid+ which conforms to the macro \Lcs{psSolid}. + +An object of type \Lkeyval{plan} is used to describe an oriented affine plane. +For a complete definition of such an object, + an origin +$I$, a basis $(\vec u, \vec v)$ for that plane, a scaling of the axis $(I, \vec u)$ and a scaling of the axis +$(I, \vec v)$ are needed. +In addition, we can specify the fineness of the grid---in other words, the number of faces---used to represent that portion of the affine plane +while transforming in an object of the type \verb+solid+.%I'm confused by this last phrase. + +This type of object can be used to define planes of section; it is then necessary to define a plane for projection.%check if this keeps your sense + +Its usage is quite easy to understand for users of PSTricks. +The only thing that you need to know is that, if we manipulate a +\texttt{\Lkeyword{object}=\Lkeyval{plan}} with the macro \Lcs{psSolid}, we manipulate two objects at the same time: one of type \Lkeyval{plan} and +the other of type \verb+solid+. When we select a backup +of that object (see chapter ``\textit{Advanced usage}'') with the name $monplan$ for example with the option \texttt{\Lkeyword{name}=monplan}, there are +in fact 2 backups that are effected. +The first, with the name \texttt{monplan}, is an object of type \Lkeyval{plan}, and the second, with the name \texttt{monplan\_s}, is an object of type \verb+solid+. + + +\subsection{Defining an oriented plane} + +To generate such an object, one uses \texttt{\Lkeyword{object}=\Lkeyval{plan}} which comes with a few arguments: + +\begin{itemize} + +\item \Lkeyword{definition} which specifies the method to defining the plane. + +\item \Lkeyword{args} which specifies the necessary arguments for the method chosen. + +\item \texttt{\Lkeyword{base}=$xmin$ $xmax$ $ymin$ $ymax$} which specifies the dimensions of each axis. + +\item \verb+[phi]+ (value $0$ by default) which specifies the angle of rotation (in degrees) of the plane around its normal. + + + +\end{itemize} + +\subsection{Special options} + +The object \verb+plan+ comes with some special options for viewing: +\begin{itemize} +\item \Lkeyword{planmarks} which shows axes and scaling (with ticks), +\item \Lkeyword{plangrid} which shows the grid, +\item \Lkeyword{showbase} which shows the basis vectors for the plane, and +\item \Lkeyword{showBase} (note the capital letters) which shows the basis vectors of the plane +and draws the associated normal vector. +\end{itemize} +These options apply regardless of the method of definition of the plane. + +\begin{center} +\psset{unit=0.4} +\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,fontsize=10} +\begin{pspicture*}(-5,-4)(6,4) +\psframe(-5,-4)(5,3) +\psSolid[object=plan, + definition=equation, + args={[0 0 1 0]}, + fillcolor=Aquamarine, + base=-2.2 2.2 -3.2 3.2] +\end{pspicture*} +%% +\psset{unit=1} +\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,fontsize=10} +\begin{pspicture*}(-5,-4)(6,4) +\psframe(-5,-4)(5,3) +\psSolid[object=plan, + definition=equation, + args={[0 0 1 0]}, + fillcolor=Aquamarine, + base=-2.2 2.2 -3.2 3.2, + planmarks] +\end{pspicture*} +%% +\psset{unit=1} +\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,fontsize=10} +\begin{pspicture*}(-5,-4)(6,4) +\psframe(-5,-4)(5,3) +\psSolid[object=plan, + definition=equation, + args={[0 0 1 0]}, + fillcolor=Aquamarine, + base=-2.2 2.2 -3.2 3.2, + plangrid] +\end{pspicture*} +%% +\psset{unit=1} +\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,fontsize=10} +\begin{pspicture*}(-5,-4)(6,4) +\psframe(-5,-4)(5,3) +\psSolid[object=plan, + definition=equation, + args={[0 0 1 0]}, + fillcolor=Aquamarine, + base=-2.2 2.2 -3.2 3.2, + showbase] +\end{pspicture*} +%% +\psset{unit=1} +\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,fontsize=10} +\begin{pspicture*}(-5,-4)(6,4) +\psframe(-5,-4)(5,3) +\psSolid[object=plan, + definition=equation, + args={[0 0 1 0]}, + fillcolor=Aquamarine, + base=-2.2 2.2 -3.2 3.2, + showBase] +\end{pspicture*} +%% +\psset{unit=1} +\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,fontsize=10} +\begin{pspicture*}(-5,-4)(6,4) +\psframe(-5,-4)(5,3) +\psSolid[object=plan, + definition=equation, + args={[0 0 1 0]}, + fillcolor=Aquamarine, + base=-2.2 2.2 -3.2 3.2, + plangrid, + showBase, + action=none +] +\end{pspicture*} +\end{center} + +These options can be used, even if the plane is not drawn. + +\subsection{Defining a plane with a cartesian equation} + +The \textit{cartesian equation} of a plane is of the form +\[ + ax+by+cz+d=0 +\] +The coefficients $a$, $b$, $c$ and $d$ determine an affine plane. + +\subsubsection{Usage with default orientation and origin} + +To define an affine plane, we can use +\texttt{\Lkeyword{definition}=\Lkeyval{equation}}, and \texttt{\Lkeyword{args}=\{[$a$ $b$ $c$ +$d$]\}}. The orientation and origin of the affine plane must be given. + +For example, the quadruple $(a, b, c, d) = (0, 0, 1, 0)$ determines +the plane with the equation $z=0$: + +\begin{LTXexample}[width=6.5cm] +\psset{viewpoint=10 18 60 rtp2xyz,Decran=10, + fontsize=10,unit=0.65} +\begin{pspicture*}(-5,-4)(5,4) +\psSolid[object=plan, + definition=equation, + args={[0 0 1 0]}, + fillcolor=Aquamarine, + planmarks, + base=-2.2 2.2 -3.2 3.2, + showbase] +\axesIIID(0,0,0)(2.2,3.2,4) +\end{pspicture*} +\end{LTXexample} + +The parameter \texttt{\Lkeyword{base}=$xmin$ $xmax$ $ymin$ $ymax$} specifies the extent along each axis. + +\subsubsection{Specifying the origin} + +The parameter \texttt{\Lkeyword{origine}=$x_0$ $y_0$ $z_0$} specifies +the origin of the affine plane. +If the chosen point $(x_0, y_0, z_0)$ doesn't fit the equation of the plane, it will be ignored.% The meaning of this is unclear to me. + +For example, a plane with the equation $z=0$ for which $(1, 2, 0)$ has been chosen as a possible origin:%(finish the sentence---it does what?) + + +\begin{LTXexample}[width=6.5cm] +\psset{viewpoint=10 18 60 rtp2xyz,Decran=10, + fontsize=10,unit=0.65cm} +\begin{pspicture*}(-4,-5.5)(6,4) +\psSolid[object=plan, + definition=equation, + args={[0 0 1 0]}, + fillcolor=Aquamarine, + origine=1 2 0, + base=-2.2 2.2 -3.2 3.2, + planmarks] +\axesIIID(0,0,0)(2.2,3.2,4) +\end{pspicture*} +\end{LTXexample} + + +\subsubsection{Specifying the orientation} + +If the chosen orientation is unsatisfactory, +we can specify an angle of rotation $\alpha $ (in degrees) around the normal of the plane with the syntax +\texttt{\Lkeyword{args}=\{[a b c d] $\alpha $\}}. + + +\begin{LTXexample}[width=6.5cm] +\psset{viewpoint=10 18 60 rtp2xyz, + Decran=10,fontsize=10,unit=0.65cm} +\begin{pspicture*}(-5,-4)(5,4) +\psSolid[object=plan, + definition=equation, + args={[0 0 1 0] 90}, + fillcolor=Aquamarine, + base=-2.2 2.2 -3.2 3.2, + planmarks] +\axesIIID(0,0,0)(3.2,2.2,4) +\end{pspicture*} +\end{LTXexample} + + +\subsection{Defining a plane using a normal vector and a point} + +It is also possible to define a plane by giving a point and a normal vector. + In this case one uses the parameter \texttt{\Lkeyword{definition}=\Lkeyval{normalpoint}}. + +If wanted, we can specify the orientation, but it can be omitted. + +\subsubsection{First Method: orientation Unspecified} + +We use \texttt{\Lkeyword{args}=\{$x_0$ $y_0$ $z_0$ [$a$ $b$ $c$]\}} where $(x_0, +y_0, z_0)$ is the origin of the affine plane, and $(a, b, c)$ is a vector normal to that plane. + + +\begin{LTXexample}[width=6.5cm] +\psset{viewpoint=10 18 60 rtp2xyz, + Decran=10,fontsize=10,unit=0.65cm} +\begin{pspicture*}(-5,-4)(5,4) +\psSolid[object=plan, + definition=normalpoint, + args={0 0 0 [0 0 1]}, + fillcolor=Aquamarine, + planmarks, + base=-2.2 2.2 -3.2 3.2, + showbase] +\axesIIID(0,0,0)(2.2,3.2,4) +\end{pspicture*} +\end{LTXexample} + + +\subsubsection{Second Method: Specifying an angle of rotation} + +We use \texttt{\Lkeyword{args}=\{$x_0$ $y_0$ $z_0$ [$a$ $b$ $c$ $\alpha +$]\}} where $(x_0, y_0, z_0)$ is the origin of the affine plane, $(a, b, +c)$ a normal vector of that plane, and $\alpha $ the angle of rotation (in +degrees) around the normal vector of that plane. + + + +\begin{LTXexample}[width=6.5cm] +\psset{viewpoint=10 18 60 rtp2xyz, + Decran=10,fontsize=10,unit=0.65} +\begin{pspicture*}(-5,-4)(5,4) +\psSolid[object=plan, + definition=normalpoint, + args={0 0 0 [0 0 1 45]}, + fillcolor=Aquamarine, + planmarks, + base=-2.2 2.2 -3.2 3.2, + showbase] +\axesIIID(0,0,0)(2.2,3.2,4) +\end{pspicture*} +\end{LTXexample} + + +\subsubsection{Third Method: Specifying the first basis vector} + +We use \texttt{\Lkeyword{args}=\{$x_0$ $y_0$ $z_0$ [$u_x$ $u_y$ $u_z$ $a$ $b$ +$c$ ]\}} where $(x_0, y_0, z_0)$ is the origin of the affine plane, +$(a, b, c)$ a normal vector of that plane, and $(u_x, u_y, u_z)$ the first basis vector for that plane. + + +\begin{LTXexample}[width=6.5cm] +\psset{viewpoint=10 18 60 rtp2xyz, + Decran=10,fontsize=10,unit=0.65cm} +\begin{pspicture*}(-5,-4)(5,4) +\psSolid[object=plan, + definition=normalpoint, + args={0 0 0 [1 1 0 0 0 1]}, + fillcolor=Aquamarine, + planmarks, + base=-2.2 2.2 -3.2 3.2, + showbase, +] +\axesIIID(0,0,0)(2.2,3.2,4) +\end{pspicture*} +\end{LTXexample} + + +\subsubsection{Fourth Method: Specifying the first basis vector and an angle of rotation} + +We use \texttt{\Lkeyword{args}=\{$x_0$ $y_0$ $z_0$ [$u_x$ $u_y$ $u_z$ $a$ $b$ +$c$ $\alpha $]\}} where $(x_0, y_0, z_0)$ is the origin of the affine plane, +$(a, b, c)$ is a normal vector of that plane, $(u_x, u_y, u_z)$ is the first basis vector for that plane and $\alpha $ (in degrees) is a rotation around the axis of the normal vector. + + +\begin{LTXexample}[width=6.5cm] +\psset{viewpoint=10 18 60 rtp2xyz, + Decran=10,fontsize=10,unit=0.65cm} +\begin{pspicture*}(-5,-4)(5,4) +\psSolid[object=plan, + definition=normalpoint, + args={0 0 0 [1 1 0 0 0 1 45]}, + fillcolor=Aquamarine, + planmarks, + base=-2.2 2.2 -3.2 3.2, + showbase] +\axesIIID(0,0,0)(2.2,3.2,4) +\end{pspicture*} +\end{LTXexample} + + +\subsection{Defining a plane from a face of a solid} + +We use \texttt{\texttt{\Lkeyword{definition}=\Lkeyval{solidface}}} with the arguments +\texttt{\texttt{\Lkeyword{args}=$name$ $i$}} where $name$ is the name of the designated solid and +$i$ is the index of the face. The origin is taken as the centre of the chosen face. + +In the example below, the plane is defined through the face with the index 0 from the cube named $A$. + + +\begin{LTXexample}[width=6.5cm] +\psset{viewpoint=10 18 20 rtp2xyz,Decran=8} +\begin{pspicture}(-3.5,-2)(3,2.5) +\psset{solidmemory} +\psSolid[object=cube,a=2,fontsize=20,numfaces=all,name=A] +\psSolid[object=plan, + definition=solidface, + args=A 0, + showBase] +\end{pspicture} +\end{LTXexample} + +If the user specifies the coordinates $(x, y, z)$ within the macro +\verb+\psSolid[...](+$x,y,z$\verb+)+, a plane is generated parallel to the face with index $i$ of the solid $name$, and translated to the point $(x, y, z)$ which now is taken as the origin. + + +\begin{LTXexample}[width=6.5cm] +\psset{viewpoint=10 18 20 rtp2xyz,Decran=8} +\begin{pspicture}(-3.5,-1.5)(3,3) +\psset{solidmemory} +\psSolid[object=cube,a=2,fontsize=20,numfaces=all,name=A] +\psSolid[object=plan, + definition=solidface, + args=A 0, + showBase](0,0,2) +\end{pspicture} +\end{LTXexample} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-poems-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-poems-en.tex new file mode 100644 index 00000000000..10348097e0e --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-poems-en.tex @@ -0,0 +1,71 @@ +\section{The poems} + +Dans ma jeunesse, j'\'{e}coutais le son de la pluie dans les maisons de plaisir ; + +les tentures frissonnaient sous la lumi\`{e}re rouge des cand\'{e}labres. + +Dans mon \^{a}ge m\^{u}r, j'ai \'{e}cout\'{e} le son de la pluie +en voyage, \`{a} bord d'un bateau ; + +les nuages pesaient bas sur l'immensit\'{e} du fleuve ; + +une oie sauvage s\'{e}par\'{e}e de ses soeurs appelait dans le vent d'ouest. + +Aujourd'hui, j'\'{e}coute le son de la pluie sous le charme d'un ermitage monastique. + +Ma t\^{e}te est chenue, chagrins et bonheurs, s\'{e}parations et retrouvailles - tout est vanit\'{e}. + +Dehors, sur les marches, les gouttes tambourinent jusqu'\`{a} l'aube. + +\begin{flushleft} +Juang Jie from \textit{Les id\'{e}es de autres} by Simon Leys +\end{flushleft} + +O cet effrayant torrent tout au fond + +O et la mer la mer \'{e}carlate quelquefois comme du feu + +Et les glorieux couchers de soleil + +Et les figuiers dans les jardins de l'Alameda + +Et toutes les ruelles bizarres + +Et les maisons roses et bleues et jaunes + +Et les roseraies et les jasmins et les g\'{e}raniums + +Et les cactus de Gibraltar quand j'\'{e}tais jeune fille + +Et une Fleur de la montagne oui + +Quand j'ai mis la rose dans mes cheveux comme les filles Andalouses + +Ou en mettrai-je une rouge oui + +Et comme il m'a embrass\'{e}e sous le mur mauresque + +Je me suis dit apr\`{e}s tout aussi bien lui qu'un autre + +Et alors je lui ai demand\'{e} avec les yeux de demander encore +oui + +Et alors il m'a demand\'{e} si je voulais oui + +Dire oui ma fleur de la montagne + +Et d'abord je lui ai mis mes bras autour de lui oui + +Et je l'ai attir\'{e} sur moi pour qu'il sente mes seins tout parfum\'{e}s oui + +Et son coeur battait comme un fou + +Et oui j'ai dit oui + +Je veux bien Oui. + +\begin{flushleft} +Monologue of \textit{Molly Bloom} from \textit{Ulysses} by James Joyce +\end{flushleft} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-point-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-point-en.tex new file mode 100644 index 00000000000..859d4a0f330 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-point-en.tex @@ -0,0 +1,88 @@ +\section{The object \texttt{point}} + +\subsection{Definition via coordinates} + +The object \Lkeyword{point} defines a \Index{point}. The simplest method is to use the argument \texttt{\Lkeyword{args}=$x$ $y$ $z$} to specify its coordinates. +If we have already named a point $M(x, y, z)$ (see chapter ``\textit{Advanced usage\/}''), we can easily use the argument \texttt{args=$M$}. + +\subsection{Some other definitions} + +There are some other possibilities for defining a point. Here a list of possible definitions with the appropriate arguments: + +\begin{itemize} + +\item \texttt{\Lkeyword{definition}=\Lkeyval{solidgetsommet}}; +\texttt{\Lkeyword{args}= $solid$ $k$}. + +The vertex with index $k$ of the solid $solid$. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{solidcentreface}}; +\texttt{\Lkeyword{args}=$solid$ $k$}. + +The centre of the face with index $k$ of the solid $solid$. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{isobarycentre3d}}; +\texttt{\Lkeyword{args}=\{[ $A_0$ $\ldots $ $A_{n}$ ]\}}. + + {The isobarycentre of the system $[(A_0, 1); + \ldots ; (A_n, 1)]$.} + +\item \texttt{\Lkeyword{definition}=\Lkeyval{barycentre3d}}; +\Lkeyword{args}= \{[ $A$ $a$ $B$ $b$ ] \}. + + {The barycentre of the system $[(A, a) ; (B, b)]$.} + +\item \texttt{\Lkeyword{definition}=\Lkeyval{hompoint3d}}; +\texttt{\Lkeyword{args}={$M$ $A$ $\alpha $}}. + + {The image of $M$ via a homothety with centre $A$ and ratio $\alpha $.} + +\item \texttt{\Lkeyword{definition}=\Lkeyval{sympoint3d}}; +\texttt{\Lkeyword{args}= {$M$ $A$}}. + + {The image of $M$ via the center of symmetry $A$}%I don't understand + +\item \texttt{\Lkeyword{definition}=\Lkeyval{translatepoint3d}}; +\texttt{\Lkeyword{args}= {$M$ $u$}}. + + {The image of $M$ under the translation via the vector $\vec u$} + +\item \texttt{\Lkeyword{definition}=\Lkeyval{scaleOpoint3d}}; +\texttt{\Lkeyword{args}= {$x$ $y$ $z$ $k_1$ $k_2$ $k_3$}}. + + {This gives a ``dilation'' \ of the coordinates of the point $M (x, y, + z)$ on the axes $Ox$, $Oy$ and $Oz$ each multiplied by an appropriate factor $k_1$, + $k_2$ and $k_3$} + +\item \texttt{\Lkeyword{definition}=\Lkeyval{rotateOpoint3d}}; +\texttt{\Lkeyword{args}= {$M$ $\alpha_x$ $\alpha_y$ $\alpha_z$}}. + + {The image of $M$ through consecutive rotations---centered at $O$---and with respective angles + $\alpha_x$, $\alpha_y$ and $\alpha_z$ around the axes $Ox$, + $Oy$ and $Oz$.} + + + +%% Projection orthogonale d'un point 3d sur un plan +%% Mx My Mz (=le point a projeter) +%% Ax Ay Az (=un point du plan) +%% Vx Vy Vz (un vecteur normal au plan) +\item \Lkeyword{definition}=\Lkeyval{orthoprojplane3d}; +\texttt{\Lkeyword{args}= {$M$ $A$ $\vec v$}}. + + {The projection of the point $M$ to the plane $P$ which is defined + by the point $A$ and the vector $\vec v$, perpendicular to $P$.} + +\item \texttt{\Lkeyword{definition}=\Lkeyval{milieu3d}}; +\texttt{\Lkeyword{args}= {$A$ $B$}}. + + {The midpoint of $[AB]$} + +\item \texttt{\Lkeyword{definition}=\Lkeyval{addv3d}}; +\texttt{\Lkeyword{args}= {$A$ $u$}}. + + {Gives the point $B$ so that $\overrightarrow {AB} = \vec u$} + +\end{itemize} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-pointagesommets-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-pointagesommets-en.tex new file mode 100644 index 00000000000..01b3ba47b15 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-pointagesommets-en.tex @@ -0,0 +1,37 @@ +\section{Numbering of the vertices} + +There is an option that permits the marking of the \Index{vertices} (with a black circle) and/or numbers them either globally or individually. +\begin{itemize} + \item \texttt{\Lkeyword{show}=all} marks all the vertices; + \item \texttt{\Lkeyword{num}=all} numbers all the vertices; + \item \verb+show=0 1 2 3+ marks the vertices with the index number 0, 1, 2 and 3; + \item \verb+num=0 1 2 3+ numbers the vertices with the index number 0, 1, 2 and 3. +\end{itemize} +% +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-2.5)(7,2.5) +\psset{viewpoint=50 20 20 rtp2xyz,Decran=40} +\psSolid[ + action=draw, + object=cube, + RotZ=30, + show=all, + num=all + ]% +\end{pspicture} +\end{LTXexample} + + +\begin{LTXexample}[width=6cm] +\begin{pspicture}(-3,-2.5)(7,2.5) +\psset{viewpoint=50 20 20 rtp2xyz,Decran=40} +\psSolid[action=draw, + object=cube, + RotZ=30, + show=0 1 2 3, + num=0 1 2 3 + ]% +\end{pspicture} +\end{LTXexample} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-positionnerpointconnu-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-positionnerpointconnu-en.tex new file mode 100644 index 00000000000..9459490057b --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-positionnerpointconnu-en.tex @@ -0,0 +1,42 @@ +\section{Positioning a named point} + +\begin{verbatim} +\psPoint(x,y,z){name} +\end{verbatim} +This is a command similar to \verb+\pnode(! x y){name}+. It places +the node \texttt{(name)} at the point with the coordinates $(x,y,z)$, +viewed with the chosen point of view \texttt{\Lkeyword{viewpoint}=vx vy vz}. We can +now use the point to mark it, draw lines, polygons, etc. + +Let's place the centres of the atoms of the methanol molecule $\mathrm{CH_3COH}$. + +\begin{LTXexample}[width=8cm] +\begin{pspicture}(-4,-4)(4,5) +\psset{viewpoint=100 50 20 rtp2xyz,Decran=20} +\axesIIID(3,3,3)(20,20,20) +\psPoint(-4.79,2.06,0){C1} +\psPoint(-4.79,15.76,0){Ox} +\psPoint(8.43,5.57,0){C2} +\psPoint(-14.14,3.34,0){H3} +\psPoint(14.14,-2.94,8.90){H6} +\psPoint(14.14,-2.94,-8.90){H7} +\psPoint(6.43,-16.29,0){H8} +\psline(C1)(H3)\psline(C2)(H7) +\psline(C2)(H8)\psline(C1)(C2) +\psline[doubleline=true](C1)(Ox) +\psline(C2)(H6) +\uput[r](H3){$\mathrm{H_1}$} +\uput[l](H6){$\mathrm{H_2}$} +\uput[l](H7){$\mathrm{H_3}$} +\uput[l](H8){$\mathrm{H_4}$} +\uput{0.25}[u](C1){$\mathrm{C_1}$} +\uput{0.25}[d](C2){$\mathrm{C_2}$} +\uput{0.25}[r](Ox){$\red\mathrm{O}$} +\psdots[dotstyle=o,dotsize=0.3](H3)(H6)(H7)(H8) +\psdots[dotsize=0.4](C1)(C2) +\psdot[linecolor=red,dotsize=0.4](Ox) +\end{pspicture} +\end{LTXexample} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-positionnersolide-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-positionnersolide-en.tex new file mode 100644 index 00000000000..2e1a4086bda --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-positionnersolide-en.tex @@ -0,0 +1,305 @@ +\section{Positioning a solid} + +\subsection{\Index{Translation}} + +The following command~ +\texttt{\Lcs{psSolid}[object=cube,+\textit{options}](x,y,z)} shifts the +centre of the cube to the point with the coordinates $\mathtt{(x,y,z)}$. + +The next example will copy the cube with edge length of 1 +\begin{pspicture}(-0.5,-0.5)(.5,.5) +\psset{Decran=40,viewpoint=50 35 35 rtp2xyz,a=1,lightsrc=50 30 20} +\psset{fillcolor=yellow,mode=3} +\psSolid[object=cube](0.5,0.5,0.5)% c1 +\end{pspicture} +to the points with the coordinates $\mathtt{(0.5,0.5,0.5)}$, + $\mathtt{(4.5,0.5,0.5)}$ etc. so that the copied cubes setup the vertices + of a new cube with the edge length 5. +\begin{center} +\begin{pspicture}(-4,-5)(5,5) +\psframe(-4,-5)(5,5) +%\psset{SphericalCoor,Decran=3,viewpoint=10 35 35,a=1,lightsrc=50 20 10} +\psset{Decran=40,viewpoint=50 35 35 rtp2xyz,a=1,lightsrc=50 30 20} +\psSolid[object=grille,base=0 6 0 6,fillcolor=gray!40]%% +\psSolid[object=grille,base=0 6 0 6,RotY=90,fillcolor=gray!30](0,0,6)% +\psSolid[object=grille,base=0 6 0 6,RotX=-90,fillcolor=gray!20](0,0,6)% +\psPoint(1,0.5,0.5){c11} +\psPoint(0.5,0.5,1){c12} +\psPoint(0.5,1,0.5){c13} +\psPoint(4.5,4.5,1){c21} +\psPoint(4,4.5,0.5){c22} +\psPoint(4.5,4,0.5){c23} +\psPoint(4,0.5,0.5){c41} +\psPoint(4.5,0.5,1){c42} +\psPoint(4.5,1,0.5){c43} +\psPoint(0.5,4,0.5){c51} +\psPoint(0.5,4.5,1){c52} +\psPoint(1,4.5,0.5){c53} +\psPoint(0.5,0.5,4){c61} +\psPoint(0.5,1,4.5){c62} +\psPoint(1,0.5,4.5){c63} +\psPoint(4,0.5,4.5){c71} +\psPoint(4.5,1,4.5){c72} +\psPoint(4.5,0.5,4){c73} +\axesIIID(1,1,1)(6,6,6) +{\psset{fillcolor=yellow,mode=3} +\psSolid[object=cube](0.5,0.5,0.5)% c1 +\psline[linestyle=dashed,linecolor=red,linewidth=1.5pt](c11)(c41) +\psline[linestyle=dashed,linecolor=red,linewidth=1.5pt](c12)(c61) +\psline[linestyle=dashed,linecolor=red,linewidth=1.5pt](c13)(c51) +\psSolid[object=cube](4.5,0.5,0.5) +\psSolid[object=cube](0.5,4.5,0.5) +\psSolid[object=cube](0.5,0.5,4.5) +\psSolid[object=cube](4.5,4.5,4.5) +\psSolid[object=cube](4.5,0.5,4.5) +\psSolid[object=cube](4.5,4.5,0.5) +\psSolid[object=cube](0.5,4.5,4.5)} +\psSolid[object=grille,base=0 5 0 5,action=draw,linecolor=blue!70,linewidth=1.2pt](0,0,5)% +\psSolid[object=grille,base=0 5 0 5,action=draw,linecolor=blue!70,RotY=90,linewidth=1.2pt](5,0,5)% +\psSolid[object=grille,base=0 5 0 5,action=draw,RotX=-90,linecolor=blue!70,linewidth=1.2pt](0,5,5)% +\end{pspicture} +\end{center} +\begin{verbatim} +\psset{fillcolor=yellow,mode=3} +\psSolid[object=cube](0.5,0.5,0.5) +\psSolid[object=cube](4.5,0.5,0.5) +\psSolid[object=cube](0.5,4.5,0.5) +\psSolid[object=cube](0.5,0.5,4.5) +\psSolid[object=cube](4.5,4.5,4.5) +\psSolid[object=cube](4.5,0.5,4.5) +\psSolid[object=cube](4.5,4.5,0.5) +\psSolid[object=cube](0.5,4.5,4.5) +\end{verbatim} + + +\subsection{Rotation} + +\subsection{Default sequence xyz} + +The \Index{rotation} is effected around the three axes $Ox$, $Oy$ and $Oz$. Let's take a cuboid as an example, +\begin{pspicture}(-1,-0.2)(1,.5) +\psset{Decran=40,viewpoint=50 35 35 rtp2xyz,a=2,b=3,c=1,lightsrc=50 30 30} +\psset{fillcolor=yellow,unit=0.5, + fcol= 0 (red) + 1 (Lavender) + 2 (SkyBlue) + 3 (LimeGreen) + 4 (OliveGreen) + 5 (Yellow) + 6 (Bittersweet)} +\psSolid[object=parallelepiped](0.5,0.5,0.5)% +\end{pspicture} +which will be rotated seperately around the axes $Ox$, $Oy$ and $Oz$. + +\begin{multicols}{4} +\psset{Decran=40,viewpoint=50 35 35 rtp2xyz,a=2,b=3,c=1} +\psset{unit=0.5, + fcol= 0 (red) + 1 (Lavender) + 2 (SkyBlue) + 3 (LimeGreen) + 4 (OliveGreen) + 5 (Yellow) + 6 (Bittersweet), + object=parallelepiped} +\setlength{\columnseprule}{1pt} +\centerline{ +\begin{pspicture}(-2.75,-2.5)(2.95,2.5) +\psframe(-2.75,-2.5)(2.95,2.5) +\psSolid%% +\axesIIID(1,1.5,1)(3,3,2) +\end{pspicture}} +\columnbreak +\centerline{ +\begin{pspicture}(-2.75,-2.5)(2.95,2.5) +\psframe(-2.75,-2.5)(2.95,2.5) +\psSolid[RotZ=60]%% +\psSolid[action=draw,linewidth=0.5\pslinewidth]%% +\axesIIID(1,1.5,1)(2,3,2) +\end{pspicture}} + +\centerline{\texttt{[RotZ=60]}} + +\columnbreak +\centerline{% +\begin{pspicture}(-2.75,-2.5)(2.95,2.5)) +\psframe(-2.75,-2.5)(2.95,2.5) +\psSolid[RotX=30]%% +\psSolid[action=draw,linewidth=0.5\pslinewidth]%% +\axesIIID(1,1.5,1)(2,3,2) +\end{pspicture}} + +\centerline{\texttt{[RotX=30]}} + +\columnbreak +\centerline{% +\begin{pspicture}(-2.75,-2.5)(2.95,2.5) +\psframe(-2.75,-2.5)(2.95,2.5) +\psSolid[RotY=45]%% +\psSolid[action=draw,linewidth=0.5\pslinewidth]%% +\axesIIID(1,1.5,1)(2,3,2) +\end{pspicture}} + +\centerline{\texttt{[RotY=-45]}} +\end{multicols} + + +\subsection{Rotations Sequence} + +\newpsstyle{sol}{fillstyle=crosshatch,hatchcolor=green,hatchwidth=0.25\pslinewidth,hatchsep=5\pslinewidth} +\makeatletter +\def\Die#1#2#3#4{ +\pstVerb{/posP \pst@solides@a\space 0.3 mul def + /rP \pst@solides@a\space 0.1 mul def + /dP \pst@solides@a\space 2 div neg def + /a_2 \pst@solides@a\space 2 div def}% +\psset{solidmemory} +%\psset{visibility=false} +\psSolid[action=draw**, + object=cube, +RotX=#2,RotY=#3,RotZ=#4,RotSequence=#1, + fontsize=15, + trunccoeff=.1, + trunc=all, +% fillcolor=yellow, + fcol=6 1 13 { (rouge) } for, + name=A + ](0,0,0)% +\psSolid[object=plan,action=none, + definition=solidface,args=A 0,name=P0] +\psset{plan=P0} +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=0 0 rP, + range=0 360] +\psSolid[object=plan,action=none, + definition=solidface,args=A 1,name=P1] +\psset{plan=P1} +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=0 0 rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP posP rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP neg posP neg rP, + range=0 360] +\psSolid[object=plan,action=none, + definition=solidface,args=A 2,name=P2] +\psset{plan=P2} +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP posP rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP neg posP neg rP, + range=0 360] +\psSolid[object=plan,action=none, + definition=solidface,args=A 3,name=P3] +\psset{plan=P3} +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP posP rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP posP neg rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP neg posP rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP neg posP neg rP, + range=0 360] +\psSolid[object=plan,action=none, + definition=solidface,args=A 4,name=P4] +\psset{plan=P4} +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=0 0 rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP posP rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP neg posP neg rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP posP neg rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP neg posP rP, + range=0 360] +\psSolid[object=plan,action=none, + definition=solidface,args=A 5,name=P5] +\psset{plan=P5} +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=0 posP rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=0 posP neg rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP posP rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP neg posP neg rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP posP neg rP, + range=0 360] +\psProjection[object=cercle,fillstyle=solid,fillcolor=black, + args=posP neg posP rP, + range=0 360] +\psSolid[object=vecteur, + args=4 0 0, + linecolor=green](a_2,0,0)% +\psSolid[object=vecteur, + args=0 4 0, + linecolor=red](0,a_2,0) +\psSolid[object=vecteur, + args=0 0 4, + linecolor=blue](0,0,a_2) +\rput(0,-2.5){\texttt{RotSequence=#1}} +} +\makeatother + +\begin{center} +\psset{viewpoint=50 60 25 rtp2xyz,Decran=25,lightsrc=viewpoint,a=4,solidmemory}% +\begin{pspicture}(-3,-3)(3,3) +\psframe(-3,-3)(3,3) +\Die{xyz}{0}{0}{0} +\rput(0,-2){\texttt{RotX=0,RotY=0,RotZ=0}} +\end{pspicture} + +\begin{pspicture}(-3,-3)(3,3) +\psframe(-3,-3)(3,3) +\Die{xyz}{90}{90}{90} +\rput(0,-2){\texttt{RotX=90,RotY=90,RotZ=90}} +\end{pspicture} +\begin{pspicture}(-3,-3)(3,3) +\psframe(-3,-3)(3,3) +\Die{xzy}{90}{90}{90} +\rput(0,-2){\texttt{RotX=90,RotY=90,RotZ=90}} +\end{pspicture} + +\begin{pspicture}(-3,-3)(3,3) +\psframe(-3,-3)(3,3) +\Die{yxz}{90}{90}{90} +\rput(0,-2){\texttt{RotX=90,RotY=90,RotZ=90}} +\end{pspicture} +\begin{pspicture}(-3,-3)(3,3) +\psframe(-3,-3)(3,3) +\Die{yzx}{90}{90}{90} +\rput(0,-2){\texttt{RotX=90,RotY=90,RotZ=90}} +\end{pspicture} + +\begin{pspicture}(-3,-3)(3,3) +\psframe(-3,-3)(3,3) +\Die{zxy}{90}{90}{90} +\rput(0,-2){\texttt{RotX=90,RotY=90,RotZ=90}} +\end{pspicture} +\begin{pspicture}(-3,-3)(3,3) +\psframe(-3,-3)(3,3) +\Die{zyx}{90}{90}{90} +\rput(0,-2){\texttt{RotX=90,RotY=90,RotZ=90}} +\end{pspicture} +\end{center} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-prisme-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-prisme-en.tex new file mode 100644 index 00000000000..a6420117f9e --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-prisme-en.tex @@ -0,0 +1,194 @@ +\section{The \Index{prism}} + +A prism is determined by two parameters: +\begin{itemize} + \item The base of the prism can be defined by the coordinates of the vertices + in the $xy$-plane. Note that it is necessary that the four + vertices be given in counterclockwise order with respect to the barycentre of + the base; + \item the direction of the prism axis (the components of the shearing vector). +\end{itemize} + + +\subsubsection{Example 1: a right and \Index{oblique prisms} with polygonal section} + +\begin{center} +\psset{unit=0.5} +\psset{lightsrc=10 5 50,viewpoint=50 20 30 rtp2xyz,,Decran=50} +\begin{minipage}{5cm} +\begin{pspicture*}(-6,-4)(6,9) +\psframe(-6,-4)(6,9) +\psSolid[object=grille,base=-4 4 -4 4,action=draw]% +\psSolid[object=prisme,h=6,base=0 1 -1 0 0 -2 1 -1 0 0]% + \axesIIID(4,4,6)(4.5,4.5,8) +\end{pspicture*} + +\small\texttt{[base=\psframebox[fillstyle=solid,fillcolor=black]{\textcolor{white}{0 1 -1 0 0 -2 1 -1 0 0}},h=6]} +\\ +\end{minipage} +\hspace{2cm} +\begin{minipage}{5cm} +\begin{pspicture*}(-6,-4)(6,9) +\psframe(-6,-4)(6,9) +\psSolid[object=grille,base=-4 4 -4 4,action=draw]% +\psSolid[object=prisme,axe=0 1 2,h=8,base=0 -2 1 -1 0 0 0 1 -1 0]% + \axesIIID(4,4,4)(4.5,4.5,8) +\psPoint(0,4,8){V} +\psPoint(0,4,0){Vy} +\psPoint(0,0,8){Vz} +\uput[l](Vz){8} +\uput[ur](Vy){4} +\psline[linecolor=blue]{->}(O)(V) +\psline[linestyle=dashed](Vz)(V)(Vy) +\end{pspicture*} + +\small\texttt{[base=\psframebox[fillstyle=solid,fillcolor=black]{\textcolor{white}{0 -2 1 -1 0 0 0 1 -1 0}},}% +\\ + \texttt{ axe=\psframebox[fillstyle=solid,fillcolor=black]{\textcolor{white}{0 4 8}},h=8]} +\end{minipage} +\end{center} + + + +\subsubsection{Example 2: a \Index{right prism} with cross-section a rounded square} + +\begin{LTXexample}[width=6.5cm] +\psset{unit=0.5cm} +\psset{lightsrc=10 -20 50,viewpoint=50 -20 30 rtp2xyz,Decran=50} +\begin{pspicture}(-5,-4)(3,9) +\psSolid[object=grille,base=-4 4 -4 4,action=draw] +\psSolid[object=prisme,h=6,fillcolor=yellow, + base= + 0 10 90 {/i exch def i cos 1 add i sin 1 add } for + 90 10 180 {/i exch def i cos 1 sub i sin 1 add} for + 180 10 270 {/i exch def i cos 1 sub i sin 1 sub} for + 270 10 360 {/i exch def i cos 1 add i sin 1 sub} for] +\axesIIID(4,4,6)(6,6,8) +\end{pspicture} +\end{LTXexample} + + +\subsubsection{Example 4: a prism with an elliptic section} + +\psResetSolidKeys +\begin{LTXexample}[width=6.5cm] +\psset{unit=0.5cm} +\begin{pspicture}(-6,-5)(4,12) +\psset{lightsrc=10 20 30,viewpoint=50 20 25 rtp2xyz,Decran=50} +\psSolid[object=grille,base=-6 6 -4 4,action=draw] +\defFunction{FuncI}(t){t cos 4 mul}{t sin 2 mul}{} +\psSolid[object=prisme,h=8,fillcolor=green!20, + base=0 350 {FuncI} CourbeR2+]% +\defFunction{FuncII}(t){t cos 4 mul}{t sin 2 mul}{8} +\psSolid[object=courbe,r=0, + function=FuncII,range=0 360, + linewidth=2\pslinewidth, + linecolor=green] +\axesIIID(6,4,8)(8,6,10) +\end{pspicture} +\end{LTXexample} + +\psset{unit=1cm} + +\subsubsection{Example 3: a right prism with a star-shaped section} + +\begin{LTXexample}[width=6.5cm] +\psset{unit=0.5cm} +\psset{lightsrc=10 -20 50,viewpoint=50 -20 30 rtp2xyz,Decran=50} +\begin{pspicture*}(-5,-4)(6,9) +\defFunction{F}(t){3 t cos 3 exp mul}{3 t sin 3 exp mul}{} +\psSolid[object=grille,base=-4 4 -4 4,action=draw]% +\psSolid[object=prismecreux,h=8,fillcolor=red!50, + resolution=36, + base=0 350 {F} CourbeR2+ + ]% +\end{pspicture*} +\end{LTXexample} + + + +\clearpage +\subsubsection{Example 5: a \Index{roof gutter} with a semi-circular section} + +\begin{LTXexample}[width=7cm] +\psset{unit=0.35cm} +\psset{lightsrc=10 20 30,viewpoint=50 30 25 rtp2xyz,Decran=50} +\begin{pspicture}(-10,-5)(6,10) +\defFunction[algebraic]{F}(t) + {3*cos(t)}{3*sin(t)}{} +\defFunction[algebraic]{G}(t) + {2.5*cos(t)}{2.5*sin(t)}{} +\psSolid[object=grille, + base=-6 6 -6 6,action=draw]% +\psSolid[object=prisme,h=12, + fillcolor=blue!30,RotX=-90, + resolution=19, + base=0 pi {F} CourbeR2+ + pi 0 {G} CourbeR2+](0,-6,3) +\axesIIID(6,6,2)(8,8,8) +\end{pspicture} +\end{LTXexample} + +We draw the exterior face (semicircle of radius 3~cm) in counterclockwise +order: \verb!0 pi {F} CourbeR2+! +Then the interior face (semicircle of radius 2{.}5~cm), is drawn in clockwise order: +\verb!pi 0 {G} CourbeR2+! + +We can turn the solid $-90^{\mathrm{o}}$ and place it at the point $(0,-6,3)$. +If we use the \verb+algebraic+ option to define the functions $F$ +and $G$, the functions $\sin$ and $\cos$ are in radians. + +\subsubsection{The parameter \texttt{\Index{decal}}} + +We wrote above that the first four vertices must be given in counterclockwise order +with respect to the barycentre of the vertices of the base. In fact, this is the +default version of the following rule: If the base has $n+1$ vertices, +and if $G$ is their barycentre, +then $(s_0,s_1)$ on one hand and $(s_{n-1},s_n)$ on the other, should be +in counterclockwise order with respect to $G$. + + +This rule puts constraints on the coding of the base of a prism which +sometimes renders the latter unaesthetically. +For this reason we have introduced the argument \Lkeyword{decal} (default value$=-2$) +which allows us to consider the list of vertices of the base as a circular file +which you will shift round if needed. + +An example: default behavior with \texttt{\Lkeyword{decal}=-2}:\par +\psset{lightsrc=10 20 30,viewpoint=50 80 35 rtp2xyz,Decran=50} +\begin{LTXexample}[width=6cm] +\psset{unit=0.5} +\begin{pspicture}(-6,-4)(6,7) +\defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{} +\psSolid[object=prisme,h=8, + fillcolor=yellow,RotX=-90, + num=0 1 2 3 4 5 6, + show=0 1 2 3 4 5 6, + resolution=7, + base=0 180 {F} CourbeR2+ + ](0,-10,0) +\end{pspicture} +\end{LTXexample} + +We see that the vertex with index~$0$ is not where we expect to find it. + +We start again, but this time suppressing the renumbering: \par +% +\psset{lightsrc=10 20 30,viewpoint=50 80 35 rtp2xyz,Decran=50} +\begin{LTXexample}[width=6cm] +\psset{unit=0.5} +\begin{pspicture}(-6,-4)(6,7) +\defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{} +\psSolid[object=prisme,h=8, + fillcolor=yellow,RotX=-90, + decal=0, + num=0 1 2 3 4 5 6, + show=0 1 2 3 4 5 6, + resolution=7, + base=0 180 {F} CourbeR2+ + ](0,-10,0) +\end{pspicture} +\end{LTXexample} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionangledroit-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionangledroit-en.tex new file mode 100644 index 00000000000..7f2c7ce697b --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionangledroit-en.tex @@ -0,0 +1,59 @@ +\section{Right angle} + +\subsection{Direct definition} + +The object \Lkeyword{rightangle} allows us to specify and draw a +\Index{right angle}. The syntax is: \texttt{[object=rightangle,args=$A$ +$B$ $C$]} + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3,-2.5)(3.5,2.5)% +\psframe*[linecolor=blue!50](-3,-2.5)(3.5,2.5) +\psset{lightsrc=viewpoint,viewpoint=50 30 15,Decran=40} +\psset{solidmemory} +%% definition du plan de projection +\psSolid[object=plan, + definition=equation, + args={[1 0 1 0] 90}, + base=-4 4 -3 3, + fillcolor=white, + linecolor=gray!30, +% plangrid, + planmarks, + name=monplan] +\psset{plan=monplan,visibility=false} +%% definition droite d +\psProjection[object=droite, + definition=horizontale, + args=-1,name=d] +\psset{fontsize=15} +%% definition du point M +\psProjection[object=point, + args=-2 1, + name=M,text=M, + pos=ul] +%% definition du point H +\psProjection[object=point, + definition=orthoproj, + args=M d, + name=H,text=H, + pos=dr] +%% definition du point H' pour orienter l'angle droit +%% et mettre la legende +\psProjection[object=point, + definition=xdpoint, + args=2 d,name=H', + action=none, + text=d,pos=ur] +%% definition d'une ligne +\psProjection[object=line, + args=M H] +%% dessin angle droit +\psProjection[object=rightangle, + args=M H H'] +\composeSolid +%\axesIIID(4,4,2)(5,5,6) +\end{pspicture} +\end{LTXexample} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectioncercle-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectioncercle-en.tex new file mode 100644 index 00000000000..9993f01c6e0 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectioncercle-en.tex @@ -0,0 +1,66 @@ +\section{Circles} + +\subsection{Direct definition} + +The object \Lkeyword{cercle} allows us to define and draw a \Index{circle}. +In the \texttt{pst-solides3d} package, a circle in 2D is defined +by its centre and radius. + +We use the option \Lkeyword{args} to specify the centre and radius of +the chosen circle. We can use coordinates or named variables. + +The argument \texttt{\Lkeyword{range}=$t_{\rm min}$ $t_{\rm max}$} allows %$ +us to specify an arc of the chosen circle. + +As for all the other object, we can save the circle data using the +option \Lkeyword{name}. + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3,-3)(4,3.5)% +\psframe*[linecolor=blue!50](-3,-3)(4,3.5) +\psset{viewpoint=50 30 15,Decran=60} +\psset{solidmemory} +%% definition du plan de projection +\psSolid[object=plan, + definition=equation, + args={[1 0 0 0] 90}, + planmarks, + name=monplan] +\psset{plan=monplan} +%% definition du point A +\psProjection[object=point, + name=A, + text=A, + pos=ur](-2,1.25) +\psProjection[object=cercle, + args=A 1, + range=0 360] +\psProjection[object=cercle, + args=1 1 .5,linecolor=blue, + range=0 180] +\composeSolid +\end{pspicture} +\end{LTXexample} + +\subsection{Some other definitions} + +There are additional methods to define a circle in 2D. The options +\Lkeyword{definition} and \Lkeyword{args} give the following supported +methods: + +\begin{itemize} + +\item \texttt{\Lkeyword{definition}=\Lkeyword{ABcercle}}; +\texttt{\Lkeyword{args}=$A$ $B$ $C$}. + +A circle through the points $A$, $B$ +and $C$. + +\item \texttt{\Lkeyword{definition}=\Lkeyword{diamcercle}}; +\texttt{\Lkeyword{args}=$A$ $B$}. + +A circle with diameter $[AB]$. + +\end{itemize} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectioncourbe-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectioncourbe-en.tex new file mode 100644 index 00000000000..93234f94e7e --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectioncourbe-en.tex @@ -0,0 +1,114 @@ +\section{Curves of real-valued and \Index{parameterised functions}} + +\subsection{Curve of a real-valued function} + +The object \Lkeyword{courbe} allows us to draw a curve, where the +name is given with the option \Lkeyword{function}. This \Index{function}, +with values in $\mathbb{R}$, has to be defined by the macro +\verb+\defFunction+ (see the appropriate paragraph for more +details). + +We can define this function either in algebraic notation, with the +option \Lkeyword{algebraic}, or in Reverse Polish Notation (RPN), +with variables like $(x,u,t\ldots)$, using an expression of the +following form: + + +\begin{verbatim} +\defFunction[algebraic]{nom_fonction}(x){x*sin(x)}{}{} +\end{verbatim} + +\begin{verbatim} +\defFunction{nom_fonction}(x){x dup sin mul}{}{} +\end{verbatim} + + +\encadre{This expression needs to be included within a +\texttt{pspicture} environment.} + +The limits of the variables are defined by the option +\texttt{\Lkeyword{range}=$xmin$ $xmax$}, and the option \texttt{argument=$n$} +defines the number of points to be plotted when drawing the \Index{curve}. + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3,-3)(4,3.5)% +\psframe*[linecolor=blue!50](-3,-3)(4,3.5) +\psset{lightsrc=50 20 20,viewpoint=50 30 15,Decran=60} +\psset{solidmemory} +\defFunction[algebraic]{1_sin}(x){2*sin(1/x)}{}{} +\psSolid[object=grille, + base=-3 0 -3 3, + linewidth=0.5\pslinewidth,linecolor=gray,] +%% definition du plan de projection +\psSolid[object=plan, + definition=equation, + args={[1 0 0 0] 90}, + base=-3.2 3.2 -2.2 2.2, + planmarks, + showBase, + name=monplan] +\psset{plan=monplan} +\psSolid[object=plan, + args=monplan, + linecolor=gray!40, + plangrid, + action=none] +\psProjection[object=courbe, + linecolor=red, + range=-3 3,resolution=720, + function=1_sin] +\composeSolid +\axesIIID(4,2,2)(5,4,3) +\end{pspicture} +\end{LTXexample} + +\subsection{\Index{Parameterised curves}} + +The technique used here is analogous to the above, with the +difference that the values now come from $\mathbb{R}^2$, and the +object for the macro \Lcs{psProjection} is now \Lkeyword{courbeR2}. + +For example, to draw a circle of radius $3$ and centre $O$, we +type: + +\begin{verbatim} +\defFunction[algebraic]{cercle}(t){3*cos(t)}{3*sin(t)}{} +\end{verbatim} + + +Another example: \Index{Lissajous} curves. + + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3,-3)(4,3.5)% +\psframe*[linecolor=blue!50](-3,-3)(4,3.5) +\psset{lightsrc=50 20 20,viewpoint=50 30 15,Decran=60} +\psset{solidmemory} +\defFunction[algebraic]{F}(t){2*sin(0.57735*t)}{2*sin(0.707*t)}{} +\psSolid[object=grille, + base=-3 0 -3 3, + linewidth=0.5\pslinewidth,linecolor=gray,] +%% definition du plan de projection +\psSolid[object=plan, + definition=equation, + args={[1 0 0 0] 90}, + base=-3.2 3.2 -2.2 2.2, + name=monplan, + planmarks, + showBase] +\psset{plan=monplan} +\psSolid[object=plan, + args=monplan, + linecolor=gray!40, + plangrid, + action=none] +\psProjection[object=courbeR2, + range=-25.12 25.12,resolution=720, + normal=1 1 2,linecolor=red, + function=F] +\composeSolid +\axesIIID(4,2,2)(5,4,3) +\end{pspicture} +\end{LTXexample} + +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectiondroite-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectiondroite-en.tex new file mode 100644 index 00000000000..b4259d89b2f --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectiondroite-en.tex @@ -0,0 +1,106 @@ +\section{Lines} + +\subsection{Direct definition} + +The object \texttt{droite} allows us to define and draw a \Index{line}. In +the \texttt{pst-solides3d} package, a line in 2D is defined by its +two end-points. + +We use the option \Lkeyword{args} to specify the end-points of the +chosen line. We can use coordinates or named points. + +As with points and vectors, we can save the coordinates of the +line with the option \Lkeyword{name}. + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3,-3)(4,3.5)% +\psframe*[linecolor=blue!50](-3,-3)(4,3.5) +\psset{viewpoint=50 30 15,Decran=60} +\psset{solidmemory} +%% definition du plan de projection +\psSolid[object=plan, + definition=equation, + args={[1 0 0 0] 90}, + planmarks,name=monplan] +\psset{plan=monplan} +%% definition du point A +\psProjection[object=point, + name=A,text=A, + pos=ur](-2,1.25) +\psProjection[object=point, + name=B,text=B, + pos=ur](1,.75) +\psProjection[object=droite, + linecolor=blue, + args=0 0 1 .5] +\psProjection[object=droite, + linecolor=orange, + args=A B] +\composeSolid +\end{pspicture} +\end{LTXexample} + + +\subsection{Some other definitions} + +There are other methods to define a line in 2D. The options +\Lkeyword{definition} and \Lkeyword{args} are used in these variants: + + + +\begin{itemize} + +\item \texttt{\Lkeyword{definition}=\Lkeyval{horizontale}}; +\texttt{\Lkeyword{args}=$b$}. + +The line with equation $y=b$. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{verticale}}; +\texttt{\Lkeyword{args}=$a$}. + +The line with equation $x=a$. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{paral}}; +\texttt{\Lkeyword{args}=$d$ $A$}. + +A line parallel to $d$ passing through +$A$. + +\item \texttt{\Lkeyword{definition}=\Lkeyword{perp}}; +\texttt{\Lkeyword{args}=$d$ $A$}. + +A line perpendicular to $d$ passing +through $A$. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{mediatrice}}; +\texttt{\Lkeyword{args}=$A$ $B$}. + +The perpendicular bisector of the line +segment $[AB]$. + +\item \texttt{\Lkeyword{definition}=\Lkeyword{bissectrice}}; +\texttt{\Lkeyword{args}=$A$ $B$ $C$}. + +The bisector of the angle $\widehat +{ABC}$. + +\item \texttt{\Lkeyword{definition}=\Lkeyword{axesymdroite}}; +\texttt{\Lkeyword{args}=$d$ $D$}. + +The reflection of the line $d$ in the +line $D$. + +\item \texttt{\Lkeyword{definition}=\Lkeyword{rotatedroite}}; +\texttt{\Lkeyword{args}=$d$ $I$ $r$}. + +The image of the line $d$ after a +rotation with centre $I$ through an angle $r$ (in degrees) + +\item \texttt{\Lkeyword{definition}=\Lkeyword{translatedroite}}; +\texttt{\Lkeyword{args}=$d$ $u$}. + +The image of the line $d$ shifted by the vector $\vec u$. + +\end{itemize} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionligne-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionligne-en.tex new file mode 100644 index 00000000000..de720bbe7bc --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionligne-en.tex @@ -0,0 +1,51 @@ +\section{Lines} + +\subsection{Direct definition} + +The object \Lkeyword{line} defines a \Index{line} (or a series of line +segments). We use the option \Lkeyword{args} to specify the points: +\texttt{[object=line,args=$A_0$ $A_1$ \ldots $A_n$]} + +We can also define a line that has been transformed using a +translation, a rotation, a homothety, etc., as though it were a +polygon. + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3,-3)(4,3.5)% +\psframe*[linecolor=blue!50](-3,-3)(4,3.5) +\psset{lightsrc=50 20 20,viewpoint=50 30 15,Decran=60} +\psset{solidmemory} +\psSolid[object=grille, + base=-3 0 -3 3, + linewidth=0.5\pslinewidth,linecolor=gray,] +%% definition du plan de projection +\psSolid[object=plan, + definition=equation, + args={[1 0 0 0] 90}, + base=-3.2 3.2 -2.2 2.2, + name=monplan, + planmarks] +\psset{plan=monplan} +\psSolid[object=plan, + args=monplan, + linecolor=gray!40, + plangrid, + action=none] +\psProjection[object=line, + args=-1 0 -3 1 1 2, + name=P] +\psProjection[object=line, + definition=rotatepol, + linecolor=blue, + args=P -1 0 -45] +%% du code jps dans la definition +\psProjection[object=line, + definition={2 -2 addv} papply, + linestyle=dashed, + args=P] +\composeSolid +\axesIIID(4,2,2)(5,4,3) +\end{pspicture} +\end{LTXexample} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionpoint-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionpoint-en.tex new file mode 100644 index 00000000000..520083b7052 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionpoint-en.tex @@ -0,0 +1,198 @@ +\section{Points} + +\subsection{Direct definition} + +The object \Lkeyword{point} defines a \Index{point}. The values $(x,y)$ of +its coordinates can be passed directly to the macro +\Lcs{psProjection} or indirectly via the option \Lkeyword{args}. + +Thus the two commands \verb+\psProjection[object=point](1,2)+ and +\verb+\psProjection[object=point,arg=1 2]+ are equivalent and lead +to the projection of the point with coordinates $(1,2)$ onto the +chosen plane. + +\subsection{Labels} + +The option \texttt{\Lkeyword{text}=my text} allows us to project a string of +characters onto the chosen plane next to a chosen point. The +positioning is made with the argument \texttt{\Lkeyword{pos}=value} where +\texttt{value} is one of the following $\{$ul, cl, bl, dl, ub, cb, bb, +db, uc, cc, bc, dc, ur, cr, br, dr$\}$. + +The details of the parameter \Lkeyword{pos} will be discussed in a +later paragraph. + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3,-3)(4,3.5)% +\psframe*[linecolor=blue!50](-3,-3)(4,3.5) +\psset{viewpoint=50 30 15,Decran=60} +\psset{solidmemory} +%% definition du plan de projection +\psSolid[object=plan, + definition=equation, + args={[1 0 0 0] 90}, + name=monplan, + planmarks, + showBase] +\psset{plan=monplan} +%% definition du point A +\psProjection[object=point, + args=-2 1, + text=A, + pos=ur] +\psProjection[object=point, + text=B, + pos=ur](2,1) +\composeSolid +\axesIIID(4,2,2)(5,4,3) +\end{pspicture} +\end{LTXexample} + + + +\subsection{Naming and memorising a point} + +If the option \texttt{\Lkeyword{name}=myName} is given, the coordinates +$(x,y)$ of the chosen point are saved under the name \texttt{myName} and so +can be reused. + +\subsection{Some other definitions} + +There are other methods to define a point in 2D. The options +\Lkeyword{definition} and \Lkeyword{args} support the following +methods: + +\begin{itemize} + +\item \texttt{\Lkeyword{definition}=\Lkeyval{milieu}}; +\texttt{\Lkeyword{args}=$A$ $B$}. + +The midpoint of the line segment $[AB]$ + +\item \texttt{\Lkeyword{definition}=\Lkeyval{parallelopoint}}; +\texttt{\Lkeyword{args}=$A$ $B$ $C$}. + +The point $D$ for which $(ABCD)$ is a +parallelogram. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{translatepoint}}; +\texttt{\Lkeyword{args}=$M$ $u$}. + +The image of the point $M$ shifted by the vector +$\vec u$ + + +\item \texttt{\Lkeyword{definition}=\Lkeyval{rotatepoint}}; +\texttt{\Lkeyword{args}=$M$ $I$ $r$}. + +The image of the point $M$ under a +rotation about the point $I$ through an angle $r$ (in degrees) + +\item \texttt{\Lkeyword{definition}=\Lkeyval{hompoint}}; +\texttt{\Lkeyword{args}=$M$ $A$ $k$}. + +The point $M'$ satisfying +$\overrightarrow {AM'} = k \overrightarrow {AM}$ + +\item \texttt{\Lkeyword{definition}=\Lkeyval{orthoproj}}; +\texttt{\Lkeyword{args}=+$M$ $d$}. + +The orthogonal projection of the point +$M$ onto the line $d$. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{projx}}; +\texttt{\Lkeyword{args}=$M$}. + +The projection of the point $M$ onto the $Ox$ +axis. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{projy}}; +\texttt{\Lkeyword{args}=$M$}. + +The projection of the point $M$ onto the $Oy$ +axis. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{sympoint}}; +\texttt{\Lkeyword{args}=$M$ $I$}. + +The point of symmetry of $M$ with respect +to the point $I$. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{axesympoint}}; +\texttt{\Lkeyword{args}=$M$ $d$}. + +The axially symmetrical point of $M$ with +respect to the line $d$. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{cpoint}}; +\texttt{\Lkeyword{args}=$\alpha $ $C$}. + +The point corresponding to the +angle $\alpha $ on the circle $C$ + +\item \texttt{[definition=xdpoint]}; +\verb+args=+$x$ $d$. + +The $Ox$ intercept $x$ of the line $d$. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{ydpoint}}; +\texttt{\Lkeyword{args}=$y$ $d$}. + +The $Oy$ intercept $y$ of the line $d$. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{interdroite}}; +\texttt{\Lkeyword{args}=$d_1$ $d_2$}. + +The intersection point of the lines +$d_1$ and $d_2$. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{interdroitecercle}}; +\texttt{\Lkeyword{args}=$d$ $I$ $r$}. + +The intersection points of the line +$d$ with a circle of centre $I$ and radius $r$. + +\end{itemize} + +In the example below, we define and name three points $A$, $B$ and +$C$, and then calculate the point $D$ for which $(ABCD)$ is a +parallelogram together with the centre of this parallelogram. + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3,-3)(4,3.5)% +\psframe*[linecolor=blue!50](-3,-3)(4,3.5) +\psset{viewpoint=50 30 15,Decran=60} +\psset{solidmemory} +%% definition du plan de projection +\psSolid[object=plan, + definition=equation, + args={[1 0 0 0] 90}, + name=monplan, + planmarks, + showbase] +\psset{plan=monplan} +%% definition du point A +\psProjection[object=point, + text=A,pos=ur,name=A](-1,.7) +%% definition du point B +\psProjection[object=point, + text=B,pos=ur,name=B](2,1) +%% definition du point C +\psProjection[object=point, + text=C,pos=ur,name=C](1,-1.5) +%% definition du point D +\psProjection[object=point, + definition=parallelopoint, + args=A B C, + text=D,pos=ur,name=D] +%% definition du point G +\psProjection[object=point, + definition=milieu, + args=D B] +\composeSolid +\axesIIID(4,2,2)(5,4,3) +\end{pspicture} +\end{LTXexample} + +\endinput + diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionpolygone-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionpolygone-en.tex new file mode 100644 index 00000000000..74f2f1dcee3 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionpolygone-en.tex @@ -0,0 +1,102 @@ +\section{Polygons} + +\subsection{Direct definition} + +The object \Lkeyword{polygone} allows us to define a \Index{polygon}. We use +the option \Lkeyword{args} to specify the list of vertices: +\texttt{[object=polygone,args=$A_0$ $A_1$ \ldots $A_n$]} + +There are other ways to define a polygon in 2D. The options +\Lkeyword{definition} and \Lkeyword{args} support these methods: + +\begin{itemize} + +%% syntaxe : pol u --> pol' +\item \texttt{\Lkeyword{definition}=\Lkeyword{translatepol}}; +\texttt{\Lkeyword{args}=$pol$ $u$}. + +Translation of the polygon $pol$ by the +vector $\vec u$ + +%% syntaxe : pol u --> pol' +\item \texttt{\Lkeyword{definition}=\Lkeyword{rotatepol}}; +\texttt{\Lkeyword{args}=$pol$ $I$ $\alpha $}. + +Image of the polygon $pol$ +after a rotation with centre $I$ and angle $\alpha $ + +%% syntaxe : pol I alpha --> pol' +\item \texttt{\Lkeyword{definition}=\Lkeyword{hompol}}; +\texttt{\Lkeyword{args}=$pol$ $I$ $\alpha $}. + +Image of the polygon $pol$ +after a homothety (dilation) with centre $I$ and ratio $\alpha$. + +%% syntaxe : pol I --> pol' +\item \texttt{\Lkeyword{definition}=\Lkeyword{sympol}}; +\texttt{\Lkeyword{args}=$pol$ $I$}. + +Image of the polygon $pol$ after a +reflection in the point $I$. + +%% syntaxe : pol D --> pol' +\item \texttt{\Lkeyword{definition}=\Lkeyword{axesympol}}; +\texttt{\Lkeyword{args}=$pol$ $d$}. + +Image of the polygon $pol$ after a +reflection in the line $d$. +\end{itemize} + + +In the following example we define, name and draw the polygon with +vertices $(-1,0)$, $(-3, 1)$, $(0, 2)$, then---in blue---the +image after a rotation about the point $(-1,0)$ through an angle +$-45$. Finally, we translate the polygon with the vector shift +$(2,-2)$ by directly incorporating \textit{jps code} within the +argument of \Lkeyword{definition}. + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3,-3)(4,3.5)% +\psframe*[linecolor=blue!50](-3,-3)(4,3.5) +\psset{lightsrc=50 20 20,viewpoint=50 30 15,Decran=60} +\psset{solidmemory} +\psSolid[object=grille, + base=-3 0 -3 3, + linewidth=0.5\pslinewidth,linecolor=gray,] +%% definition du plan de projection +\psSolid[object=plan, + definition=equation, + args={[1 0 0 0] 90}, + base=-3.2 3.2 -2.2 2.2, + name=monplan, + planmarks, +] +\psset{plan=monplan} +\psSolid[object=plan, + args=monplan, + linecolor=gray!40, + plangrid, + action=none, +] +\psProjection[object=polygone, + args=-1 0 -3 1 0 2, + name=P, +] +\psProjection[object=polygone, + definition=rotatepol, + linecolor=blue, + args=P -1 0 -45, +] +%% du code jps dans la definition +\psProjection[object=polygone, + definition={2 -2 addv} papply, + fillstyle=hlines,hatchcolor=yellow, + linestyle=dashed, + args=P, +] +\composeSolid +\axesIIID(4,2,2)(5,4,3) +\end{pspicture} +\end{LTXexample} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectiontexte-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectiontexte-en.tex new file mode 100644 index 00000000000..b4b2f47c9c9 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectiontexte-en.tex @@ -0,0 +1,619 @@ +\section{Text} + +The object \Lkeyword{texte} of the macro \Lcs{psProjection} allows us +to \Index{project} character strings onto planes. + +\subsection{The parameters and the options} + +There are three parameters:\Lkeyword{text} which defines the +string, \Lkeyword{fontsize}, which gives the dimension of the font +in points (remember: 28.45~pts correspond to 1~cm), and finally +\Lkeyword{pos}, which defines the position of the \Index{text}. By +default, the text is centred at the origin of the plane. + +This last parameter needs some explanation. See the string + \texttt{petit texte} represented below. +\begin{center} +\begin{pspicture}(-5,-2)(5,2) +\rput(0,0){\psframebox[linestyle=none,fillstyle=solid, + fillcolor=yellow!50,framesep=0pt]{\phantom{\timesnormal petit texte}}} +\rput(0,0){\rnode[lb]{A}{\rnode[rb]{B}{\rnode[rt]{C}{% + \rnode[lt]{D}{\rnode[l]{E}{\rnode[r]{F}{% + \rnode[t]{G}{\rnode[b]{H}{\timesnormal petit texte}}}}}}}}} +%\psset{nodesep=5pt} +\ncline{A}{B}\ncline{B}{C}\ncline{C}{D}\ncline{D}{A} +\pnode({A}){A'} +\pnode({B}){B'} +\pnode({C}){C'} +\pnode({D}){D'} +\pnode({E}){E'} +\pnode({F}){F'} +\pnode({G}){G'} +\pnode({H}){H'} +\rput(A){\pnode(0,\baselineskip){B1}} +\rput(B){\pnode(0,\baselineskip){B2}} +\psdots(A')(B')(C')(D')(E')(F')(G')(H')(B1)(B2)(0,0) +\psline(B1)(B2) +\pnode(! \GetCenter{A} A.x 0.5 sub A.y 0.5 sub){A1} +\ncline{->}{A}{A1} +\uput[dl](A1){\texttt{dl}} +\pnode(! \GetCenter{B1} B1.x 0.5 sub B1.y){B1l} +\ncline{->}{B1}{B1l} +\uput[l](B1l){\texttt{bl}} +\pnode(! \GetCenter{E} E.x 0.5 sub E.y){El} +\ncline{->}{E}{El} +\uput[l](El){\texttt{cl}} +\pnode(! \GetCenter{D} D.x 0.5 sub D.y 0.5 add){Dl} +\ncline{->}{D}{Dl} +\uput[ul](Dl){\texttt{ul}} +\pnode(! \GetCenter{G} G.x G.y 0.5 add){Gu} +\ncline{->}{G}{Gu} +\uput[u](Gu){\texttt{uc}} +\pnode(! \GetCenter{H} H.x H.y 0.5 sub){Hd} +\ncline{->}{H}{Hd} +\uput[d](Hd){\texttt{dc}} +\pnode(! \GetCenter{C} C.x 0.5 add C.y 0.5 add){Cr} +\ncline{->}{C}{Cr} +\uput[ur](Cr){\texttt{ur}} +\pnode(! \GetCenter{B} B.x 0.5 add B.y 0.5 sub){Br} +\ncline{->}{B}{Br} +\uput[dr](Br){\texttt{dr}} +\pnode(! \GetCenter{B2} B2.x 0.5 add B2.y){B2r} +\ncline{->}{B2}{B2r} +\uput[r](B2r){\texttt{br}} +\pnode(! \GetCenter{F} F.x 0.5 add F.y){Fr} +\ncline{->}{F}{Fr} +\uput[r](Fr){\texttt{cr}} +\end{pspicture} +\end{center} + +We have $4$~horizontal reference lines: the bottom line +\verb+(d)own+, the base line \verb+(b)aseline+, the median line, +or centre line \verb+(c)enter+, and the upper line \verb+(u)p+. + +There are as well $4$~vertical reference lines: the left line +\verb+(l)eft+, the base line \verb+(b)aseline+, the centre line +\verb+(c)enter+ and the right line \verb+(r)ight+. In the case of +strings, the two vertical lines \verb+l+ and \verb+b+ might be +indistinguishable and easily confounded. + +The intersection of the $4$ horizontal lines with the $4$ vertical +lines gives us $16$~positioning point possibilities \verb+dl+, +\verb+bl+, \verb+cl+, \verb+ul+, \verb+db+, \verb+bb+, \verb+cb+, +\verb+ub+, \verb+dc+, \verb+bc+, \verb+cc+, \verb+uc+, \verb+dr+, +\verb+br+, \verb+cr+, \verb+ur+. + +Of these, $4$~are considered as \textit{inner points}: \verb+bb+, +\verb+bc+, \verb+cb+ and \verb+cc+. + +When the parameter \Lkeyword{pos} of \Lcs{psProjection} is assigned +one of these four inner points, it means that the latter will be +situated at the origin of the plane of projection. + +When the parameter \Lkeyword{pos} of \Lcs{psProjection} is assigned +one of the twelve remaining points, it indicates the direction in +which the text will be positioned relative to the origin of the +plane of projection. + +For example, \verb+\psProjection[...,pos=uc](0,0)+ indicates that +the text will be centred relative to the point $(0,0)$ and +situated above it. + +%% Le plan doit \^{e}tre d\'{e}fini par son origine +%% \Cadre{$\mathtt{(x_0ny_0,z_0)}$} et la normale %$ +%% \Cadre{\texttt{[normal=1 0 0 90]}}. Pour les particularit\'{e}s +%% de la d\'{e}finition de la normale, car il y a trois fa\c{c}ons de le faire ! +%% Tous les d\'{e}tails sont dans la partie \Cadre{\texttt{``Choisir un plan +%% par son origine et une normale''}} de la documentation de +%% \texttt{doc-psProjection}. + +%% La taille de la fonte doit \^{e}tre fix\'{e}e en points avec l'option +%% . . + + +\subsection{Examples of projecting onto a plane} + +\subsubsection{Example 1: \Index{projection} onto $Oxy$, with the option \texttt{pos=bc}} + +\begin{LTXexample}[width=8cm] +\begin{pspicture}(-4,-1.5)(4,1.5) +\psset{solidmemory} +\psset{lightsrc=10 0 10, + viewpoint=50 -90 89.99 rtp2xyz,Decran=50} +\psSolid[object=plan,definition=normalpoint,plangrid, + base=-4 4 -1 1,args={0 0 0 [0 0 1]},name=monplan,] +\psProjection[object=texte, + fontsize=20,linecolor=red, + pos=bc,plan=monplan, + text=j'aimerais tant voir Syracuse, +](0,0)% +\axesIIID(0,0,0)(4,2,1) +\composeSolid +\end{pspicture} +\end{LTXexample} + +\subsubsection{Example 2: \Index{projection} onto $Oxy$, centred text} + +\begin{LTXexample}[width=8cm] +\begin{pspicture}(-4,-1.5)(4,1.5) +\psset{solidmemory} +\psset{lightsrc=10 0 10, + viewpoint=50 -90 89.99 rtp2xyz,,Decran=50} +\psSolid[object=plan,definition=normalpoint,plangrid, + base=-4 4 -1 1,args={0 0 0 [0 0 1]},name=monplan,] +\psProjection[object=texte, + fontsize=20,linecolor=red, + text= L'\^{\i}le de P\^{a}ques et Kairouan, + plan=monplan]% +\axesIIID(0,0,0)(4,2,1) +\end{pspicture} +\end{LTXexample} + + +\subsubsection{Example 3: \Index{projection} onto $Oxy$, with different options +\texttt{pos=dl, etc.}} + +\begin{center} +\psset{unit=.8} +\begin{pspicture}(-4,-1.5)(4,1.5) +\psset{solidmemory} +\psset{lightsrc=10 0 10,viewpoint=50 -90 89.99 rtp2xyz,Decran=50} +\psSolid[object=plan,definition=normalpoint,plangrid, + base=-10 10 -1 1,args={0 0 0 [0 0 1]},name=monplan,] +\psProjection[object=texte, + fontsize=20,linecolor=red, + text=Et les grands oiseaux qui s'amusent, + pos=dl, + plan=monplan]% +\axesIIID(0,0,0)(8,1,1) +\rput(0,-1.5){\Cadre{\texttt{[pos=dl]}}} +\end{pspicture} +\end{center} + +\begin{center} +\psset{unit=.8} +\begin{pspicture}(-4,-1.5)(4,1.5) +\psset{solidmemory} +\psset{lightsrc=10 0 10,viewpoint=50 -90 89.99 rtp2xyz,Decran=50} +\psSolid[object=plan,definition=normalpoint,plangrid, + base=-10 10 -1 1,args={0 0 0 [0 0 1]},name=monplan,] +\psProjection[object=texte, + fontsize=20,linecolor=red, + text= A glisser l'aile sous le vent., + pos=dr, + plan=monplan]% +\axesIIID(0,0,0)(8,1,1) +\rput(0,-1.5){\Cadre{\texttt{[pos=dr]}}} +\end{pspicture} +\end{center} + +\begin{center} +\psset{unit=.8} +\begin{pspicture}(-4,-1.5)(4,1.5) +\psset{solidmemory} +\psset{lightsrc=10 0 10,viewpoint=50 -90 89.99 rtp2xyz,Decran=50} +\psSolid[object=plan,definition=normalpoint,plangrid, + base=-10 10 -1 1,args={0 0 0 [0 0 1]},name=monplan,] +\psProjection[object=texte, + fontsize=20,linecolor=red, + text=Avant que ma jeunesse s'use, + pos=ur, + plan=monplan]% +\axesIIID(0,0,0)(8,1,1) +\rput(0,-1.5){\Cadre{\texttt{[pos=ur]}}} +\end{pspicture} +\end{center} + +\begin{center} +\psset{unit=.8} +\begin{pspicture}(-4,-1.5)(4,1.5) +\psset{solidmemory} +\psset{lightsrc=10 0 10,viewpoint=50 -90 89.99 rtp2xyz,Decran=50} +\psSolid[object=plan,definition=normalpoint,plangrid, + base=-10 10 -1 1,args={0 0 0 [0 0 1]},name=monplan,] +\psProjection[object=texte, + fontsize=20,linecolor=red, + text=Et que mes printemps soient partis, + pos=ul, + plan=monplan]% +\axesIIID(0,0,0)(8,1,1) +\rput(0,-1.5){\Cadre{\texttt{[pos=ul]}}} +\end{pspicture} +\end{center} + +\begin{center} +\psset{unit=.8} +\begin{pspicture}(-4,-1.5)(4,1.5) +\psset{solidmemory} +\psset{lightsrc=10 0 10,viewpoint=50 -90 89.99 rtp2xyz,Decran=50} +\psSolid[object=plan,definition=normalpoint,plangrid, + base=-10 10 -1 1,args={0 0 0 [0 0 1]},name=monplan,] +\psProjection[object=texte, + fontsize=20,linecolor=red, + text=J'aimerais tant voir Syracuse, + pos=uc, + plan=monplan]% +\axesIIID(0,0,0)(8,1,1) +\rput(0,-1.5){\Cadre{\texttt{[pos=uc]}}} +\end{pspicture} +\end{center} + +\begin{center} +\psset{unit=.8} +\begin{pspicture}(-4,-1.5)(4,1.5) +\psset{solidmemory} +\psset{lightsrc=10 0 10,viewpoint=50 -90 89.99 rtp2xyz,Decran=50} +\psSolid[object=plan,definition=normalpoint,plangrid, + base=-10 10 -1 1,args={0 0 0 [0 0 1]},name=monplan,] +\psProjection[object=texte, + fontsize=20,linecolor=red, + text=Pour m'en souvenir \`{a} Paris., + pos=dc, + plan=monplan]% +\axesIIID(0,0,0)(8,1,1) +\rput(0,-1.5){\Cadre{\texttt{[pos=dc]}}} +\end{pspicture} +\end{center} + +\subsubsection{Example 4: \Index{projection} onto $Oxy$ with text rotation} + +\begin{LTXexample}[width=8cm] +\begin{pspicture}(-4,-3)(4,3) +\psset{solidmemory} +\psset{lightsrc=10 0 10, + viewpoint=50 -90 89.99 rtp2xyz,Decran=50} +\psSolid[object=plan,definition=normalpoint,plangrid, + base=-4 4 -3 3,args={0 0 0 [0 0 1]},name=monplan,] +\psset{plan=monplan} +\psProjection[object=texte, + fontsize=28.45,linecolor=gray!50, + text=Tournez man\`{e}ges]% +\psProjection[object=texte, + fontsize=28.45,linecolor=red, + text=Tournez man\`{e}ges, + phi=60]% +\axesIIID(0,0,0)(4,3,1) +\end{pspicture} +\end{LTXexample} +The text rotation is introduced by the parameter \texttt{phi=60}. + +\subsubsection{Example 5: positioning text at a point} + +\begin{LTXexample}[width=8cm] +\begin{pspicture}(-4,-3)(4,3) +\psset{solidmemory} +\psset{viewpoint=50 -90 89.99 rtp2xyz,Decran=50} +\psSolid[object=plan,definition=normalpoint,plangrid, + base=-4 4 -3 3,args={0 0 0 [0 0 1]},name=monplan,] +\psset{fontsize=28.45,plan=monplan} +\psProjection[object=texte, + linecolor=green, + text=ici](-2,-2) +\psProjection[object=texte, + linecolor=red, + text=ou]% +\psProjection[object=texte, + linecolor=blue, + text=l\`{a}](2,2) +\psPoint(0,0,0){O} +\psPoint(-2,-2,0){O1} +\psPoint(2,2,0){O2} +\psdots[dotsize=0.2](O)(O1)(O2) +\axesIIID(0,0,0)(4,4,1) +\end{pspicture} +\end{LTXexample} + +\subsection{Examples for \Index{projecting} onto a face of a solid} + +\subsubsection{Method} + +The solid must be memorised with the general option +\texttt{$\backslash$psset$\{$solidmemory$\}$}. The first thing to %$ +do is to find the numbers of the faces of the solid with the +option \texttt{\Lkeyword{numfaces}=\Lkeyval{all}}. +\begin{LTXexample}[width=8cm] +\psset{viewpoint=50 20 30 rtp2xyz,Decran=100} +\begin{pspicture}(-4,-4)(4,4) +\psSolid[object=cube,a=2,action=draw, + linecolor=red,numfaces=all]% +\axesIIID(1,1,1)(2,2,2) +\end{pspicture} +\end{LTXexample} + +Then we define the projection plane as the chosen face, where in +this case we put \texttt{A} on the face with the index number 0: + + +Then we define the projection plane by a chosen face, there we put \texttt{A} on the face with the index number 0: +\begin{verbatim} +\psSolid[object=plan,definition=solidface,args=A 0,name=P0] +\psProjection[object=texte,linecolor=red,text=A,plan=P0]% +\end{verbatim} + + +\begin{LTXexample}[width=8cm] +\psset{viewpoint=50 20 30 rtp2xyz,Decran=50} +\begin{pspicture}(-4,-4)(4,5) +\psset{unit=0.5} +\psset{solidmemory} +\psSolid[object=cube,a=8,action=draw,name=A,linecolor=red]% +\psset{fontsize=100} +\psSolid[object=plan,action=none, + definition=solidface,args=A 0,name=P0] +\psProjection[object=texte,linecolor=red,text=A,plan=P0]% +\psSolid[object=plan,action=none, + definition=solidface,args=A 1,name=P1] +\psProjection[object=texte,linecolor=red,text=B,plan=P1]% +\psSolid[object=plan,action=none, + definition=solidface,args=A 4,name=P4] +\psProjection[object=texte,linecolor=red,text=E,plan=P4]% +\axesIIID(4,4,4)(6,6,6) +\end{pspicture} +\end{LTXexample} + +\subsubsection{Text rotation with the option \texttt{phi}} + +\begin{LTXexample}[width=8cm] +\psset{viewpoint=50 20 30 rtp2xyz,Decran=50} +\psset{unit=0.4} +\begin{pspicture}(-8,-7)(4,9) +\psset{solidmemory} +\psSolid[object=cube,a=8,action=draw,linecolor=red,name=A]% +\psset{fontsize=200} +\psSolid[object=plan,action=none, + definition=solidface,args=A 0,name=P0] +\psProjection[object=texte,linecolor=gray,text=A,plan=P0]% +\psset{phi=90} +\psProjection[object=texte,linecolor=red,text=A,plan=P0]% +\axesIIID(4,4,4)(6,6,6) +\end{pspicture} +\end{LTXexample} + + +\subsection{Examples of \Index{projecting} onto different faces of a solid} + +\definecolor{rose}{rgb}{1,0.75,0.74} + +\def\JuangJie{% +\begin{pspicture}(-3.5,-2)(3.5,4) +\psframe[fillcolor=cyan!50,fillstyle=solid](-3.5,-2)(3.5,4)% +\psSolid[object=cylindre,r=8,h=0.2,ngrid=1 36,action=draw**,hue=0.5 0.6]% +\psSolid[object=cube,a=8,h=0.2,ngrid=1 36,action=draw**,color1=magenta!50, + color2=red!20,color3=yellow!50,color4=green!50, + fcol=0 (color1) 1 (color2) 2 (color3) 3 (color4) 4(White)](0,0,4.2)% +\psset{solidmemory}% +\psSolid[object=cube,a=8, + name=A, + action=none](0,0,4.2)% +%% la face 0 +\psSolid[object=plan,action=none,definition=solidface, + base=-4 4 -4 4,args=A 0,name=P0]% +%\psSolid[object=plan,definition=plan,action=none,args=P0,planmarks,action=none,]% +\psset{fontsize=30,plan=P0}% +\psProjection[object=texte,text=po\`{e}me](0,3)% +\psProjection[object=texte,text=de](0,2)% +\psset{fontsize=55} +\psProjection[object=texte,linecolor=red,text=Juang Jie] +%% la face 4 +\psSolid[object=plan,action=none,definition=solidface,base=-4 4 -4 4,args=A 4,phi=-90,name=P4]% +%\psSolid[object=plan,definition=plan,action=none,args=P4,fontsize=10,planmarks,action=none]% +\psset{fontsize=28.45,pos=bc,plan=P4} +\psProjection[object=texte,text={Dans ma jeunesse,}](0,3)% +\psset{fontsize=20} +\psProjection[object=texte,text=j'\'{e}coutais le son de la pluie](0,2)% +\psProjection[object=texte,text=dans les maisons de plaisir](0,1)% +\psProjection[object=texte,text=les tentures frissonnaient]% +\psProjection[object=texte,text=sous la lumi\`{e}re rouge](0,-1)% +\psProjection[object=texte,text=des cand\'{e}labres](0,-2)% +%% la face 1 +\psSolid[object=plan,action=none,definition=solidface,base=-4 4 -4 4,args=A 1,phi=180,name=P1]% +%\psSolid[object=plan,definition=plan,action=none,args=P1,fontsize=10,planmarks,action=none]% +\psset{plan=P1} +\psProjection[object=texte,fontsize=25,text=Dans mon \^{a}ge m\^{u}r](0,3)% +\psProjection[object=texte,text=j'ai \'{e}cout\'{e} le son de la pluie](0,2)% +\psProjection[object=texte,fontsize=18,text={en voyage, \`{a} bord d'un bateau}](0,1)% +\psProjection[object=texte,text=les nuages pesaient bas]% +\psProjection[object=texte,text=sur l'immensit\'{e} du fleuve](0,-1)% +\psProjection[object=texte,text=une oie sauvage ](0,-2)% +\psProjection[object=texte,text=s\'{e}par\'{e}e de ses soeurs](0,-3)% +%% la face 2 +\psSolid[object=plan,action=none,definition=solidface,base=-4 4 -4 4,args=A 2,phi=180,name=P2]% +%\psSolid[object=plan,definition=plan,action=none,args=P2,fontsize=10,planmarks,action=none]% +\psset{plan=P2} +\psProjection[object=texte,text=appelait dans le vent d'ouest](0,3)% +\psProjection[object=texte,text={Aujourd'hui,}](0,2)% +\psProjection[object=texte,text=j'\'{e}coute le son de la pluie](0,1)% +\psProjection[object=texte,text=sous le charme]% +\psProjection[object=texte,text=d'un ermitage monastique](0,-1)% +\psProjection[object=texte,text=Ma t\^{e}te est chenue](0,-2)% +\psProjection[object=texte,text=chagrins et bonheurs](0,-3)% +%% la face 3 +\psSolid[object=plan,action=none,definition=solidface,args=A 3,phi=180,name=P3]% +%\psSolid[object=plan,definition=plan,action=none,args=P3,fontsize=10,planmarks,action=none]% +\psset{plan=P3} +\psProjection[object=texte,text=s\'{e}parations et retrouvailles](0,3)% +\psProjection[object=texte,text=tout est vanit\'{e}](0,2)% +\psProjection[object=texte,text={Dehors, sur les marches}](0,1)% +\psProjection[object=texte,text=les gouttes tambourinent]% +\psProjection[object=texte,text= jusqu'\`{a} l'aube](0,-1)% +\psProjection[object=texte,text=Juang Jie ](0,-3)% +\composeSolid +\end{pspicture}} + +\def\MollyBloom{% +%\psset{lightsrc=-15 -9 5} +%\psset{viewpoint=20 -150 30 rtp2xyz,Decran=11} +\psset{solidmemory,visibility} +%% le plan de base +\psSolid[object=plan, + definition=equation, + ngrid=1. 1., + args={[0 0 1 0]},linecolor=red, + base=-8 10 -8 8, + linecolor=red, + name=G]% +\psset{fontsize=25,,pos=bc,plan=G} +\psProjection[object=texte, + phi=-90, + text=le monologue de Molly, + pos=bc, + ](-5,0) +\psProjection[object=texte,text=dans Ulysse de James Joyce](1,-5,0) +\psset{h=1,fillcolor=yellow!50,incolor=rose,hollow} +\psset{fontsize=20,pos=cc} +% +\psSolid[object=ruban,name=ruban1,base=9 8 9 -8] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0, + text=O cet effrayant torrent tout au fond O et la mer \'{e}carlate] +% +\psSolid[object=ruban,name=ruban1,base=9 -8 -8 -8] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0, + text=quelquefois comme du feu et les glorieux couchers de soleil et] +% +\psSolid[object=ruban,name=ruban1,base=-8 7 7 7] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0,fontsize=18, + text=les ruelles bizarres les maisons roses et bleues et jaunes,] +% +\psSolid[object=ruban,name=ruban1,base=7 7 7 -6] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0, + text=et les roseraies et les jasmins et les g\'{e}raniums,] +% +\psSolid[object=ruban,name=ruban1,base=7 -6 -6 -6] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0, + text=et les cactus de Gibraltar quand j'\'{e}tais jeune fille,] +% +\psSolid[object=ruban,name=ruban1,base=-6 5 5 5] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0,fontsize=18, + text=quand j'ai mis la rose dans mes cheveux,] +% +\psSolid[object=ruban,name=ruban1,base=5 5 5 -4] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0, + text=comme les filles Andalouses,] +% +\psSolid[object=ruban,name=ruban1,base=5 -4 -3 -4] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0, + text=ou en mettrai-je une rouge oui,] +% +\psSolid[object=ruban,name=ruban1,base=-3 4 3 4] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0,fontsize=18, + text=sous le mur mauresque,] +% +\psSolid[object=ruban,name=ruban1,base=3 4 3 -2] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0, + text=je me suis dit apr\`{e}s,] +% +\psSolid[object=ruban,name=ruban1,base=3 -2 -1.5 -2] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0, + text=tout aussi bien,] +% +\psSolid[object=ruban,name=ruban1,base=-1.5 3 2 3] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0, + text=et alors je,] +\psSolid[object=ruban,name=ruban1,base=-8 -8 -8 7] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0, + text=les figuiers dans les jardins de l'Alameda et toutes,] +% +\psSolid[object=ruban,name=ruban1,base=-6 -6 -6 5] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0, + text=et une Fleur de la montagne oui,] +% +\psSolid[object=ruban,name=ruban1,base=-3 -4 -3 4] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0, + text=et comme il m'a embrass\'{e}e,] +% +\psSolid[object=ruban,name=ruban1,base=-1.5 -2 -1.5 3] +\psSolid[object=plan,action=none,definition=solidface,args=ruban1 0,name=R0,phi=-90] +\psProjection[object=texte,plan=R0, + text=lui qu'un autre,] +% +\composeSolid +} + +We project a poem, verse by verse, onto 4 faces of a cube. It is +necessary to use the option \texttt{solidmemory} at the beginning +\begin{verbatim} +\psset{solidmemory} +\psSolid[object=cube,a=8,name=A1](0,0,4.2)% +\end{verbatim} +of the code. We then define the cube, which is memorised with the +help of the command \texttt{name=A}: + +\begin{verbatim} +\psset{solidmemory} +\psProjection[object=texte,text=po\`{e}me,fontsize=30,plan=P0](0,3)% +\psSolid[object=cube,a=8,name=A](0,0,4.2)% +\end{verbatim} + +The number of each face needs to be known---from a previous run +of the code with the option \texttt{\Lkeyword{numfaces}=\Lkeyval{all}}. The following +commands: + + +\begin{verbatim} +\psSolid[object=plan,action=none,definition=solidface,args=A 0,name=P0]% +\psProjection[object=texte,text=po\`{e}me,fontsize=30,plan=P0](0,3)% +\end{verbatim} +define the plane $P0$ as the oriented plane of the face with index +number 0 of the solid $A$, before the word \texttt{po\`{e}me} is +projected onto $P0$, with a font size of 30~pts, to the point with +coordinates $(0,3)$ (within the coordinate system of that plane). +We could have changed the orientation of the text to +\texttt{phi=-90} for example, in the one or other of the commands. + +By default, if the face is not visible, its text stays hidden. By +putting \Lkeyword{visibility} in the options, the text is shown when +it would otherwise not be, as in the following example. + +You must not forget to write \texttt{$\backslash$composeSolid} at +the end of the text-writing commands for all these lines to be +taken into account. Any other PStricks command will have +the usual effect and \verb+\composeSolid+ will be unnecessary. + + + + +\begin{center} +\psset{viewpoint=40 20 30 rtp2xyz,Decran=16} +\JuangJie \hfil +\psset{viewpoint=40 110 30 rtp2xyz,Decran=16} +\JuangJie +\end{center} +\begin{center} +\psset{viewpoint=40 200 30 rtp2xyz,Decran=16} +\JuangJie\hfil +\psset{viewpoint=40 290 30 rtp2xyz,Decran=16} +\JuangJie +\end{center} + + +\begin{center} +\begin{pspicture}(-8,-6)(8,3) +\psset{lightsrc=-15 -9 5} +\psframe(-8,-6)(8,3) +\psset{viewpoint=20 -150 30 rtp2xyz,Decran=11}\MollyBloom +\end{pspicture} +\end{center} +\begin{center} +\begin{pspicture}(-8,-6)(8,7) +\psset{lightsrc=0 0 3} +\psframe(-8,-6)(8,7) +\psset{viewpoint=6 -150 89.9 rtp2xyz,Decran=2.8}\MollyBloom +\end{pspicture} +\end{center} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionvecteur-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionvecteur-en.tex new file mode 100644 index 00000000000..ec850c1abba --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionvecteur-en.tex @@ -0,0 +1,85 @@ +\section{Vectors} + +\subsection{Direct definition} + +The object \Lkeyword{vecteur} allows us to define and draw a \Index{vector}. +To do so in a simple way, we use the option \Lkeyword{args} to define +its components $(x,y)$ and we specify the point from where the +vector starts with the macro \Lcs{psProjection} (or we may use a +named point). + +As with points, we can save the components of a vector using the +option \Lkeyword{name}. + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3,-3)(4,3.5)% +\psframe*[linecolor=blue!50](-3,-3)(4,3.5) +\psset{viewpoint=50 30 15,Decran=60} +\psset{solidmemory} +%% definition du plan de projection +\psSolid[object=plan, + definition=equation, + args={[1 0 0 0] 90}, + planmarks, + name=monplan] +\psset{plan=monplan} +%% definition du point A +\psProjection[object=point, + args=-2 0.75, + name=A,text=A, + pos=dl] +\psProjection[object=vecteur, + linecolor=red, + args=1 1, + name=U](1,0) +\psProjection[object=vecteur, + args=U, + linecolor=blue](A) +\composeSolid +\axesIIID(4,2,2)(5,4,3) +\end{pspicture} +\end{LTXexample} + + +\subsection{Some more definitions} + +There are other methods to define a vector in 2D. The options +\Lkeyword{definition} and \Lkeyword{args} allow us a variety of supported +methods: + +\begin{itemize} + +\item \texttt{\Lkeyword{definition}=\Lkeyval{vecteur}}; +\texttt{\Lkeyword{args}=$A$ $B$}. + +The vector $\overrightarrow {AB}$ + +\item \texttt{\Lkeyword{definition}=\Lkeyval{orthovecteur}}; +\texttt{\Lkeyword{args}=$u$}. + +A vector perpendicular to $\vec u$ with the same length. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{normalize}}; +\texttt{\Lkeyword{args}=$u$}. + +The vector $\Vert \vec u \Vert ^{-1} \vec u$ +if $\vec u \neq \vec 0$, and $\vec 0$ otherwise. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{addv}}; +\texttt{\Lkeyword{args}=$u$ $v$}. + +The vector $\vec u + \vec v$ + +\item \texttt{\Lkeyword{definition}=\Lkeyval{subv}}; +\texttt{\Lkeyword{args}=$u$ $v$}. + +The vector $\vec u - \vec v$ + +\item \texttt{\Lkeyword{definition}=\Lkeyval{mulv}}; +\texttt{\Lkeyword{args}=$u$ $\alpha $}. + +The vector $\alpha \vec u$ + +\end{itemize} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionvisibility-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionvisibility-en.tex new file mode 100644 index 00000000000..5b65e65c9d2 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projectionvisibility-en.tex @@ -0,0 +1,11 @@ +\section{The parameter \texttt{\Index{visibility}}} + +For all projections, the Boolean \Lkeyword{visibility} +(\verb+true+ by default) specifies whether or not to have the +projection made visible. + +Set to \verb+false+, the \Index{projection} is always carried out. Set to +\verb+true+, the projection is only carried out when the plane of +projection is visible from the viewpoint of the observer. + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projpresentation-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projpresentation-en.tex new file mode 100644 index 00000000000..55fe418aa49 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-projpresentation-en.tex @@ -0,0 +1,15 @@ +\section{Presentation} + + +The package allows the representation and manipulation of some +simple objects in two dimensions (2D). The macro \Lcs{psProjection} +can project these 2D objects onto a chosen plane. + +The syntax is analogous to that of \Lcs{psSolid}, with an +obligatory option \Lkeyword{object}, that allows us to specify +the type of object to be projected. + +The general syntax is \texttt{\textbackslash +psSolid[object=objectname,plan=plantype,<options>](x,y)} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-ruban-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-ruban-en.tex new file mode 100644 index 00000000000..70714407f10 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-ruban-en.tex @@ -0,0 +1,120 @@ +\section{\Index{Solid strip}} + +The strip is a folding screen positioned horizontally on the floor. The base of the folding screen is defined in the plane $Oxy$ by the coordinates of its vertices by the parameter \Lkeyword{base}: +\begin{verbatim} +\psSolid[object=ruban,h=3,base=x1 y1 x2 y2 x3 y3 ...xn yn,ngrid=n](0,0,0)% +\end{verbatim} + +\subsection{A simple \Index{folding screen}} +\begin{LTXexample}[width=9.5cm] +\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50,unit=0.75} +\begin{pspicture}(-5.5,-4.5)(7,5) +\psSolid[object=grille,base=-4 6 -4 4,action=draw,linecolor=gray](0,0,0) +\psSolid[object=ruban,h=3,fillcolor=red!50, + base=0 0 2 2 4 0 6 2, + num=0 1 2 3, + show=0 1 2 3, + ngrid=3 + ](0,0,0) +\axesIIID(0,2,0)(6,6,4.5) +\end{pspicture} +\end{LTXexample} + + +\subsection{A sinusoidal folding screen} +\psset{lightsrc=10 30 10,viewpoint=50 50 20 rtp2xyz,Decran=50} +\begin{LTXexample} +\psset{unit=0.35} +\begin{pspicture}(-10,-6)(12,8) +\defFunction{F}(t){2 t 4 mul cos mul}{t 20 div}{} +\psSolid[object=grille,base=-6 6 -10 10,action=draw,linecolor=gray](0,0,0) +\psSolid[object=ruban,h=2,fillcolor=red!50, + resolution=72, + base=-200 200 {F} CourbeR2+, %% -200 5 200 {/Angle ED 2 Angle 4 mul cos mul Angle 20 div } for, + ngrid=4](0,0,0) +\axesIIID(5,10,0)(7,11,6) +\end{pspicture} +\end{LTXexample} + + +\subsection{A \Index{corrugated surface}} +This is the same object as before with an additional rotation of $90^{\mathrm{o}}$ around $Oy$. + +\psset{lightsrc=10 30 10,viewpoint=50 50 20 rtp2xyz,Decran=30} +\begin{LTXexample} +\psset{unit=0.4} +\begin{pspicture}(-14,-7)(8,5) +\defFunction{F}(t){t 4 mul cos}{t 20 div}{} +\psSolid[object=grille,base=0 16 -10 10,action=draw,linecolor=gray](0,0,0) +\psSolid[object=ruban,h=16,fillcolor=red!50,RotY=90,incolor=green!20, + resolution=72, + base=-200 200 {F} CourbeR2+, + ngrid=16](0,0,1) +\axesIIID(16,10,0)(20,12,6) +\end{pspicture} +\end{LTXexample} + +We can then imagine it to be like a corrugated iron roof of a shed. + + +\subsection{An asteroidal folding screen: version 1} + +The contour of the folding screen is defined within a loop: +\begin{verbatim} + base=0 72 360 {/Angle ED 5 Angle cos mul 5 Angle sin mul + 3 Angle 36 add cos mul 3 Angle 36 add sin mul} for +\end{verbatim} +the blueish surface on the bottom is defined with the help of a polygon, where the vertices are calculated by the command\\ +\verb+\psPoint(x,y,z){P}+ +\begin{verbatim} +\multido{\iA=0+72,\iB=36+72,\i=0+1}{6}{% + \psPoint(\iA\space cos 5 mul,\iA\space sin 5 mul,0){P\i} + \psPoint(\iB\space cos 3 mul,\iB\space sin 3 mul,0){p\i} + }% +\pspolygon[fillstyle=solid,fillcolor=blue!50](P0)(p0)(P1)(p1)(P2)(p2) + (P3)(p3)(P4)(p4)(P5)(p5) +\end{verbatim} + +\psset{lightsrc=10 0 10,viewpoint=50 20 30 rtp2xyz,Decran=50} +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.45} +\begin{pspicture}(-9,-5)(9,7) +\multido{\iA=0+72,\iB=36+72,\i=0+1}{6}{% + \psPoint(\iA\space cos 5 mul,\iA\space sin 5 mul,0){P\i} + \psPoint(\iB\space cos 3 mul,\iB\space sin 3 mul,0){p\i} + }% +\pspolygon[fillstyle=solid,fillcolor=blue!50](P0)(p0)(P1)(p1)(P2)(p2)(P3)(p3)(P4)(p4)(P5)(p5) +\defFunction{F}(t){t cos 5 mul}{t sin 5 mul}{} +\defFunction{G}(t){t 36 add cos 3 mul}{t 36 add sin 3 mul}{} +\psSolid[object=grille,base=-6 6 -6 6,action=draw,linecolor=gray](0,0,0) +\psSolid[object=ruban,h=1,fillcolor=red!50, + base=0 72 360 {/Angle exch def Angle F Angle G} for, + num=0 1 2 3,show=0 1 2 3,ngrid=2](0,0,0) +\axesIIID(5,5,0)(6,6,6) +\end{pspicture} +\end{LTXexample} + + +\subsection{An asteroidal folding screen: version 2} + +The bottom of the pot is defined by the object \Lkeyword{face} with the option +\Lkeyword{biface}: + +\psset{lightsrc=10 0 10,viewpoint=50 -20 20 rtp2xyz,Decran=50} +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.4} +\begin{pspicture}(-9,-4)(9,7) +\defFunction{F}(t){t cos 5 mul}{t sin 5 mul}{} +\defFunction{G}(t){t 36 add cos 3 mul}{t 36 add sin 3 mul}{} +\psSolid[object=face,fillcolor=blue!50,biface, + base=0 72 360 {/Angle exch def Angle F Angle G} for,](0,0,0) +\psSolid[object=grille,base=-6 6 -6 6,action=draw,linecolor=gray](0,0,0) +\psSolid[object=ruban,h=1,fillcolor=red!50, + base=0 72 360 {/Angle exch def Angle F Angle G} for, + ngrid=2](0,0,0) +\axesIIID(5,5,0)(6,6,6) +\end{pspicture} +\end{LTXexample} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-section-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-section-en.tex new file mode 100644 index 00000000000..82e1765bbc8 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-section-en.tex @@ -0,0 +1,955 @@ +\section{Sectioning a solid with a plane} + +\subsection{Drawing the \Index{intersection} between a plane and a solid} + +\subsubsection{The parameters} + +The option \texttt{intersectionplan=\{[a b c d]\}} allows the user +to draw the intersection between a plane and a solid. The numbers +between the braces are the coefficients of the affine plane with +equation: $ax+by+cz+d=0$. It is possible to draw the intersection +between a solid and more than one plane by placing the appropriate +parameters in order, as in the following example. + +The drawing is activated with \texttt{\texttt{\Lkeyword{intersectiontype}=0}} or any +value $\geq0$. + +The colour of the intersection line is chosen with the option +\texttt{\Lkeyword{intersectioncolor}=(bleu) (rouge) etc.}. In the same order, +the thickness of the appropriate line +\texttt{\Lkeyword{intersectionlinewidth}=1 2 etc.} (dimensions in picas) is +set up. + + +The hidden parts, drawn with dashed lines, will be shown with +\Lkeyword{action}=\Lkeyval{draw}. + +\begin{LTXexample}[width=7cm] +\begin{pspicture}(-3,-2)(3,7.5) +\psset{viewpoint=50 20 20 rtp2xyz,Decran=50} +\psset{lightsrc=viewpoint} \psSolid[object=cylindre, + ngrid=1 24, + r=2, + fillcolor=yellow!25, + intersectiontype=0, + intersectionplan={ + [0 0 1 -1] + [0 0 1 -2] + [0 0 1 -3] + [0.894 0 0.447 -1.8]}, + intersectioncolor=(bleu) (rouge) (vert) (rose), + intersectionlinewidth=1 1.5 1.8 2.2] +\axesIIID(2,2,6)(3,3,7) +\end{pspicture} +\end{LTXexample} + +\subsection{Slicing a solid} + +\subsubsection{Slicing a filled solid} + +The object under consideration is a cylinder. The plane that +slices the object is defined by: + + \begin{verbatim} + plansepare={[a b c d]} + \end{verbatim} + +The two parts are not drawn, but memorised with the name +\texttt{\Lkeyword{name}=partiescylindre}: + + \begin{verbatim} +\psset{solidmemory} +\psSolid[object=cylindre, + r=2,h=6 + ngrid=6 24, + plansepare={[0.707 0 0.707 0]}, + name=partiescylindre, + action=none](0,0,-3) + \end{verbatim} + + +Then they are displayed separately using their respective index +numbers. The numbering of the two parts is determined by the +direction of the normal to the \Index{slicing} plane: 0 if above the +normal, 1 if below. For both parts, the sliced face carries the +number 0. If there are several sliced faces, as may happen in the +case of a torus, they are numbered 0, 1 etc. + + + \begin{verbatim} +\psSolid[object=load, + load=partiescylindre1, + fillcolor={[rgb]{0.7 1 0.7 }}, + fcol=0 (1 1 0.7 setrgbcolor)] +\psSolid[object=load, + load=partiescylindre0,RotZ=60, + fillcolor={[rgb]{0.7 1 0.7 }}, + fcol=0 (1 1 0.7 setrgbcolor)](0,4,0) + \end{verbatim} + +\begin{center} +\begin{pspicture}(-4,-5)(7,4) +\psframe(-4,-5)(7,4) +\psset{viewpoint=50 -40 10 rtp2xyz,Decran=50,linecolor=darkgray} +%\lightsource +\psset{lightsrc=viewpoint} +\psSolid[object=grille,action=draw, + base=-3 5 -3 5, + linecolor=red](0,0,-3) +\psset{solidmemory} +\psSolid[object=cylindre, + r=2,h=6, + ngrid=6 24, + plansepare={[0.707 0 0.707 0]}, + name=partiescylindre, + action=none](0,0,-3) +\psSolid[object=load, + load=partiescylindre1, + fillcolor={[rgb]{0.7 1 0.7 }}, + fcol=0 (1 1 0.7 setrgbcolor)] +\psSolid[object=load, + load=partiescylindre0,RotZ=90, + fillcolor={[rgb]{0.7 1 0.7 }}, + fcol=0 (1 1 0.7 setrgbcolor)](0,4,0) +\psSolid[object=plan,action=draw, + definition=equation, + args={[0.707 0 0.707 0] 90}, + base=-2 2 -3 3,planmarks,showBase] +\axesIIID(0,0,0)(2.5,2.5,3.5) +\end{pspicture} +\end{center} + +\subsubsection{Slicing a \Index{hollow solid}} + +The options \verb+rm=0,hollow+ allow us to not only remove a +face \verb+rm=0+ but also to see inside it \Lkeyword{hollow}. + +\begin{center} +\begin{pspicture}(-4,-5)(7,4) +\psframe(-4,-5)(7,4) +\psset{viewpoint=50 -40 10 rtp2xyz,Decran=50,linecolor=darkgray} +%\lightsource +\psset{lightsrc=viewpoint} +\psSolid[object=grille,action=draw, + base=-3 5 -3 5, + linecolor=red](0,0,-3) +\psset{solidmemory} +\psSolid[object=cylindre, + r=2,h=6, + ngrid=6 24, + plansepare={[0.707 0 0.707 0.5]}, + name=partiescylindre, + action=none](0,0,-3) +\psSolid[object=load, + load=partiescylindre1, + fillcolor={[rgb]{0.7 1 0.7 }}, + rm=0,hollow, + incolor={[rgb]{1 1 0.7}}] +\psSolid[object=load, + load=partiescylindre0,RotZ=90, + fillcolor={[rgb]{0.7 1 0.7 }}, + rm=0,hollow, + incolor={[rgb]{1 1 0.7}}](0,4,0) +\psSolid[object=plan,action=draw, + definition=equation, + args={[0.707 0 0.707 0.5] 90}, + base=-2 2 -3 3,planmarks,showBase] +\composeSolid +\end{pspicture} +\end{center} + + +\subsection{\Index{Slice} of a \Index{pyramid}} + +\subsubsection{Highlighting the \Index{contour lines} and first slice} + +This pyramid is generated as \texttt{\Lkeyword{object}=\Lkeyval{new}} by giving a list +of the coordinates of the vertices, and the vertices of each face. + +\begin{verbatim} + sommets= + 0 -2 0 %% 0 + -2 0 0 %% 1 + 0 4 0 %% 2 + 4 0 0 %% 3 + 0 0 5, %% 4 + faces={ + [3 2 1 0] + [4 0 3] + [4 3 2] + [4 2 1] + [4 1 0] +} +\end{verbatim} + +In the first diagram, the slicing lines are highlighted. + + \begin{verbatim} + intersectiontype=0, + intersectionplan={[0 0 1 -1] [0 0 1 -2]}, + intersectionlinewidth=1 2, + intersectioncolor=(bleu) (rouge) + \end{verbatim} + +Then we cut off the upper part, and draw the slicing plane as +well. + + \begin{verbatim} +\psSolid[object=new, + sommets= + 0 -2 0 %% 0 + -2 0 0 %% 1 + 0 4 0 %% 2 + 4 0 0 %% 3 + 0 0 5, %% 4 + faces={ + [3 2 1 0] + [4 0 3] + [4 3 2] + [4 2 1] + [4 1 0]}, + plansepare={[0 0 1 -2]}, + name=firstSlice, + action=none] +\psSolid[object=load,action=draw*, + load=firstSlice1] +\psSolid[object=plan, + definition=equation, + args={[0 0 1 -2]}, + base=-3 5 -3 5,action=draw] + \end{verbatim} + +To avoid having to repeatedly type the vertices and faces of the +pyramid, we save these data to the files: +\begin{itemize} + \item \texttt{Pyramid-couleurs.dat} + \item \texttt{Pyramid-faces.dat} + \item \texttt{Pyramid-sommets.dat} + \item \texttt{Pyramid-io.dat} +\end{itemize} +thanks to the command \Lkeyword{action}=\Lkeyval{writesolid}: + + \begin{verbatim} +\psSolid[object=new, + sommets= + 0 -2 0 %% 0 + -2 0 0 %% 1 + 0 4 0 %% 2 + 4 0 0 %% 3 + 0 0 5, %% 4 + faces={ + [3 2 1 0] + [4 0 3] + [4 3 2] + [4 2 1] + [4 1 0] +},file=data/Pyramid,fillcolor=yellow!50, + action=writesolid] + \end{verbatim} + +All these lines of code could then be removed and, thereafter, we +would recall the data with the command: + + \begin{verbatim} +\psSolid[object=datfile, + file=data/Pyramid] + \end{verbatim} + +\begin{center} +\psset{unit=0.75} +\begin{pspicture}(-5,-2)(5,7) +%\psframe(-5,-2)(5,7) +\psset{viewpoint=50 20 10 rtp2xyz,Decran=50} +%\lightsource +\psset{lightsrc=viewpoint} +\psSolid[object=grille, + base=-3 5 -3 5, + linecolor=gray] +%% create the pyramid with base area in xy-plane +\psSolid[object=new, + sommets= + 0 -2 0 %% 0 + -2 0 0 %% 1 + 0 4 0 %% 2 + 4 0 0 %% 3 + 0 0 5, %% 4 +faces={ + [3 2 1 0] + [4 0 3] + [4 3 2] + [4 2 1] + [4 1 0] +}, action=draw*, + intersectiontype=0, + intersectionplan={[0 0 1 -1] + [0 0 1 -2]}, + intersectionlinewidth=1 2, + intersectioncolor=(bleu) (rouge)] +\axesIIID[linecolor=blue](4,4,5)(5,5,6) +\end{pspicture} +\hfill +\begin{pspicture}(-5,-2)(5,7) +%\psframe(-5,-2)(5,7) +\psset{viewpoint=50 20 10 rtp2xyz,Decran=50} +%\lightsource +\psset{lightsrc=viewpoint} +\psSolid[object=grille, + base=-3 5 -3 5, + linecolor=gray] +\psset{solidmemory} +%% create the pyramid with base area in xy-plane +\psSolid[object=new, + sommets= + 0 -2 0 %% 0 + -2 0 0 %% 1 + 0 4 0 %% 2 + 4 0 0 %% 3 + 0 0 5, %% 4 +faces={ + [3 2 1 0] + [4 0 3] + [4 3 2] + [4 2 1] + [4 1 0] +}, + plansepare={[0 0 1 -2]}, + name=firstSlice, + action=none] +\psSolid[object=load,action=draw*, + load=firstSlice1] +\psSolid[object=plan, + definition=equation, + args={[0 0 1 -2]}, + base=-3 5 -3 5,action=draw] +\axesIIID[linecolor=blue](4,4,2)(5,5,6) +\end{pspicture} +\end{center} + +\subsubsection{The second \Index{slice} and its insertion within the \Index{pyramid}} + +Having removed the upper part \texttt{firstSlice0} (which no +longer appears), we slice the frustum of the pyramid +\texttt{firstSlice1}, and keep the upper part of this as +\texttt{secondSlice0}, then we record it and insert it into a wire +frame model of the pyramid: + + + \begin{verbatim} +\psset{solidmemory} +\psSolid[object=datfile, + file=data/Pyramid, + plansepare={[0 0 1 -2]}, + name=firstSlice, + action=none] +\psSolid[object=load, + load=firstSlice1, + action=none, + plansepare={[0 0 1 -1]}, + name=secondSlice] +\psSolid[object=load,action=draw*, + load=secondSlice0] +\psSolid[object=load, + load=secondSlice0, + file=data/slicePyramid, + action=writesolid] +\psSolid[object=datfile,fillcolor=yellow!50, + file=data/slicePyramid] + \end{verbatim} + + +\begin{center} +\psset{unit=0.75} +\begin{pspicture}(-5,-2)(4,7) +%\psframe(-4,-2)(4,7) +\psset{viewpoint=50 20 10 rtp2xyz,Decran=50} +%\lightsource +\psset{lightsrc=viewpoint} +\psSolid[object=grille, + base=-3 5 -3 5, + linecolor=gray] +\psset{solidmemory} +%% create the pyramid with base area in xy-plane +%\psSolid[object=new, +% sommets= +% 0 -2 0 %% 0 +% -2 0 0 %% 1 +% 0 4 0 %% 2 +% 4 0 0 %% 3 +% 0 0 5, %% 4 +% faces={ +% [3 2 1 0] +% [4 0 3] +% [4 3 2] +% [4 2 1] +% [4 1 0] +%},file=data/Pyramid,fillcolor=yellow!50, +% action=writesolid] +\psSolid[object=datfile, + file=data/Pyramid, + plansepare={[0 0 1 -2]}, + name=firstSlice, + action=none] +\psSolid[object=plan, + definition=equation, + args={[0 0 1 -1]},action=draw, + base=-3 5 -3 5] +\psSolid[object=load, + load=firstSlice1, + action=none, + plansepare={[0 0 1 -1]}, + name=secondSlice] +%\psSolid[object=load,action=draw*, +% load=secondSlice0] +%\psSolid[object=load, +% load=secondSlice0, +% file=data/slicePyramid, +% action=writesolid] +\psSolid[object=datfile,fillcolor=yellow!50, + file=data/slicePyramid] +\psSolid[object=plan, + definition=equation, + args={[0 0 1 -2]}, + base=-3 5 -3 5,action=draw] +\axesIIID[linecolor=blue](0,0,2)(5,5,6) +\end{pspicture} +\hfill +\begin{pspicture}(-4,-2)(6,7) +\psset{viewpoint=50 20 10 rtp2xyz,Decran=50} +%\lightsource +\psset{lightsrc=viewpoint} +\psSolid[object=grille, + base=-3 5 -3 5, + linecolor=gray] +\psSolid[object=datfile,fillcolor=yellow!50, + file=data/slicePyramid] +\psSolid[object=datfile, + file=data/Pyramid,action=draw] +\axesIIID[linecolor=blue](4,4,2)(5,5,6) +\end{pspicture} +\end{center} + +\subsection{Slicing an \Index{octahedron} with a plane parallel to one of its faces} + +\subsubsection{The view inside} + +Recall that there are options \verb+rm=0,hollow+ that allow us, +on the one hand, to remove a face \verb+rm=0+ and, on the other, +to look inside \Lkeyword{hollow}. + +In the following example, we shall start by generating the +required objects without drawing them (\texttt{\Lkeyword{action}=\Lkeyval{none}}). + +We construct the octahedron, giving the center of the face with +index $1$ the name $G$, then define the point $H$ which satisfies +$\overrightarrow{OH} = 0.8\,\overrightarrow{OG}$. After that we +define $P$ to be the plane through $H$ parallel to the face of the +octahedron with index $1$. Finally, we slice the octahedron using +the plane $P$. + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3.5,-3)(4.5,5) +\psset{viewpoint=100 5 10 rtp2xyz,Decran=80, + lightsrc=viewpoint,solidmemory,action=none} +\psSolid[object=octahedron, + a=4,name=my_octahedron,] +\psSolid[object=point, + definition=solidcentreface, + args=my_octahedron 1, + name=G,] +\psSolid[object=point, + definition=mulv3d, + args=G .8, + name=H,] +\psSolid[object=plan, + definition=solidface, + args=my_octahedron 1, + base=-4 4 -4 4, + name=P,](H,,) +\psSolid[object=load, + load=my_octahedron, + plansepare=P, + name=part] +\psSolid[object=load,load=part1, + rm=0,hollow,action=draw**, + fillcolor={[rgb]{0.7 1 0.7}}, + incolor={[rgb]{1 1 0.7}},] +\psSolid[object=plan,args=P, + action=draw,showBase] +\psSolid[object=line, + args=0 0 0 H, + linestyle=dashed,] +\psProjection[object=point,plan=P,args=0 0, + fontsize=20,pos=cl,text=H,phi=90,] +\axesIIID[linecolor=blue,linewidth=0.4pt](0,0,0)(4,4,4) +\end{pspicture} +\end{LTXexample} + +\subsubsection{Regarding the solid as filled} + +The option \verb+fcol=0 (YellowOrange)+ allows us to colour the +face with index 0. + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3.5,-3)(4.5,5) +\psset{viewpoint=100 5 10 rtp2xyz,Decran=80, + lightsrc=viewpoint,solidmemory,action=none} +\psSolid[object=octahedron, + a=4,name=my_octahedron,] +\psSolid[object=point, + definition=solidcentreface, + args=my_octahedron 1, + name=G,] +\psSolid[object=point, + definition=mulv3d, + args=G .8, + name=H,] +\psSolid[object=plan, + definition=solidface, + args=my_octahedron 1, + base=-4 4 -4 4, + name=P,](H,,) +\psSolid[object=load, + load=my_octahedron, + plansepare=P, + name=part] +\psSolid[object=load, + load=part1, + fcol=0 (YellowOrange), + action=draw**, + fillcolor={[rgb]{0.7 1 0.7}},] +\psSolid[object=plan,args=P, + action=draw,showBase] +\psSolid[object=line, + args=0 0 0 H, + linestyle=dashed,] +\psProjection[object=point,plan=P,args=0 0, + fontsize=20,pos=cl,text=H,phi=90,] +\axesIIID[linecolor=blue,linewidth=0.4pt](0,0,0)(4,4,4) +\end{pspicture} +\end{LTXexample} + +\subsubsection{The two parts of a sliced solid} + +You will recall that the direction of the normal of the slicing +plane determines the numbering of the two parts: 0 if above the +normal, 1 if below. For both parts, the sliced face carries the +number 0. If there are several sliced faces, as in the case of the +torus, they are numbered 0, 1 etc. + +Using two steps, we memorise both parts of the sliced solid: + + \begin{verbatim} +\psSolid[object=load, + load=my_octahedron, + plansepare=P, + name=part] + \end{verbatim} + +Then we position and render each part: + + \begin{verbatim} +\psSolid[object=load, + fcol=0 (YellowOrange), + fillcolor={[rgb]{0.7 1 0.7}}, + load=part1] +\psSolid[object=load, + fillcolor={[rgb]{0.7 1 0.7}}, + load=part0](H 2 mulv3d,,) +\composeSolid + \end{verbatim} + + +\begin{LTXexample}[width=7.5cm] +\begin{pspicture}(-3.5,-3)(4.5,5) +\psset{viewpoint=100 5 20 rtp2xyz,Decran=150, + lightsrc=viewpoint,solidmemory,action=none} +\psSolid[object=octahedron, + a=2,name=my_octahedron,] +\psSolid[object=point, + definition=solidcentreface, + args=my_octahedron 1, + name=G,] +\psSolid[object=point, + definition=mulv3d, + args=G .7, + name=H,] +\psSolid[object=plan, + definition=solidface, + args=my_octahedron 1, + base=-4 4 -4 4, + name=P,](H,,) +\psSolid[object=load, + load=my_octahedron, + plansepare=P, + name=part] +\psset{action=draw**} +\psSolid[object=load, + load=part1, + fcol=0 (YellowOrange), + fillcolor={[rgb]{0.7 1 0.7}},] +\psSolid[object=load, + fillcolor={[rgb]{0.7 1 0.7}}, + load=part0](H 2 mulv3d,,) +\composeSolid +\end{pspicture} +\end{LTXexample} + +\subsection{Slices of a cube} + +\subsubsection{Highlighting the edges of the cut} + +\begin{LTXexample}[width=8cm] +\psset{viewpoint=100 30 20 rtp2xyz,Decran=150} +\begin{pspicture}(-4,-3)(4,5) +\psset{solidmemory} +\psSolid[object=plan,definition=normalpoint, + args={1 1 1 [1 1 1]},action=none,name=P] +\psSolid[object=cube,a=2,action=draw, + intersectiontype=0, + intersectionplan=P, + intersectionlinewidth=2, + intersectioncolor=(rouge), +](1,1,1) +\psProjection[object=point, + args=0 0,fontsize=10,pos=dc, + text=H,phi=-30,plan=P, +] +\psSolid[object=line, + linestyle=dashed, + args=0 0 0 1 1 1] +\psSolid[object=vecteur, + linecolor=red, + args=1 1 1 .7 mulv3d](1,1,1) +\axesIIID[linecolor=blue](2,2,2)(2.5,2.5,2.5) +\end{pspicture} +\end{LTXexample} + +\subsubsection{Showing the sliced cube with its hexagonal cut face} + +\begin{LTXexample}[width=8cm] +\psset{viewpoint=100 30 20 rtp2xyz,Decran=150} +\begin{pspicture}(-4,-3)(4,5) +\psset{solidmemory} +\psSolid[object=plan,action=none,definition=normalpoint, + args={1 1 1 [1 1 1]},name=P] +\psSolid[object=cube,a=2, + plansepare=P, + action=none, + name=parts_cube, +](1,1,1) +\psSolid[object=load, + load=parts_cube1, + fcol=0 (Dandelion), + fillcolor={[rgb]{0.7 1 0.7}}, +] +\psProjection[object=point, + args=0 0,fontsize=10,pos=dc, + text=H,phi=-30,plan=P, +] +\psSolid[object=vecteur, + linecolor=red, + args=1 1 1 .7 mulv3d](1,1,1) +\axesIIID[linecolor=blue](2,2,2)(2.5,2.5,2.5) +\end{pspicture} +\end{LTXexample} + +\subsubsection{The sliced cube in various positions} + +Where we use the option that allows us to memorise a solid, in +order to put the truncated cube, after undergoing various +transformations, down on its cut face. + + \begin{verbatim} +\psset{solidmemory} +\psSolid[object=datfile, + fcol=0 (Dandelion), + fillcolor={[rgb]{0.7 1 0.7}}, + name=C1, + action=none, + file=data/cubeHexagone] + \end{verbatim} + + +\begin{center} +\begin{pspicture}(-3,-3)(3,3) +\psframe(-3,-2)(3,3) +\psset{viewpoint=100 30 20 rtp2xyz,Decran=100} +%\lightsource +\psset{lightsrc=viewpoint} +\psSolid[object=grille, + base=-2 3 -2 3, + linecolor=gray] +\psSolid[object=datfile, + fcol=0 (Dandelion), + fillcolor={[rgb]{0.7 1 0.7}}, + file=data/cubeHexagone] +\axesIIID[linecolor=blue](2,2,2)(2.5,2.5,2.5) +\end{pspicture} + +\hfil + +\begin{pspicture}(-2,-3)(4,3) +\psframe(-2,-2)(4,3) +\psset{viewpoint=100 -30 20 rtp2xyz,Decran=100} +%\lightsource +\psset{lightsrc=viewpoint} +\psSolid[object=grille, + base=-2 3 -2 3, + linecolor=gray] +\psSolid[object=datfile, + fcol=0 (Dandelion), + fillcolor={[rgb]{0.7 1 0.7}}, + file=data/cubeHexagone] +\axesIIID[linecolor=blue](2,2,2)(2.5,2.5,2.5) +\end{pspicture} + +\begin{pspicture}(-3,-2)(3,3) +\psframe(-3,-2)(3,3) +\psset{viewpoint=100 225 20 rtp2xyz,Decran=100} +%\lightsource +\psset{lightsrc=viewpoint} +\psSolid[object=grille, + base=-2 3 -2 3, + linecolor=gray] +\psSolid[object=datfile, + fcol=0 (Dandelion), + fillcolor={[rgb]{0.7 1 0.7}}, + file=data/cubeHexagone] +\axesIIID[linecolor=blue](0,0,0)(2.5,2.5,2.5) +\end{pspicture} +\hfil +\begin{pspicture}(-3,-2)(3,3) +\psframe(-3,-2)(3,3) +\psset{viewpoint=100 30 20 rtp2xyz,Decran=100} +%\lightsource +\psset{lightsrc=viewpoint} +\psSolid[object=grille, + base=-2 3 -2 3, + linecolor=gray] +\psset{solidmemory} +\psSolid[object=datfile, + fcol=0 (Dandelion), + fillcolor={[rgb]{0.7 1 0.7}}, + name=C1, + action=none, + file=data/cubeHexagone] +\codejps{C1 {-1.5 -1.5 0 translatepoint3d} solidtransform +drawsolid** +} +\axesIIID[linecolor=blue](0,0,0)(2.5,2.5,2.5) +\end{pspicture} + +\begin{pspicture}(-3,-2)(3,4) +\psframe(-3,-2)(3,3) +\psset{viewpoint=100 30 20 rtp2xyz,Decran=100} +%\lightsource +\psset{lightsrc=viewpoint} +\psSolid[object=grille, + base=-2 3 -2 3, + linecolor=gray] +\psset{solidmemory} +\psSolid[object=datfile, + fcol=0 (Dandelion), + fillcolor={[rgb]{0.7 1 0.7}}, + name=C1, + action=none, + file=data/cubeHexagone] +\codejps{C1 {-1.5 -1.5 0 translatepoint3d} solidtransform + {0 0 45 rotateOpoint3d} solidtransform +drawsolid** +} +%\composeSolid +\axesIIID[linecolor=blue](0,0,0)(2.5,2.5,2.5) +\end{pspicture} +\hfil +\begin{pspicture}(-3,-2)(3,4) +\psframe(-3,-2)(3,3) +\psset{viewpoint=100 30 20 rtp2xyz,Decran=100} +%\lightsource +\psset{lightsrc=viewpoint} +\psSolid[object=grille, + base=-2 3 -2 3, + linecolor=gray] +\psset{solidmemory} +\psSolid[object=datfile, + fcol=0 (Dandelion), + fillcolor={[rgb]{0.7 1 0.7}}, + name=C1, + action=none, + file=data/cubeHexagone] +\codejps{C1 {-1.5 -1.5 0 translatepoint3d} solidtransform + {0 0 45 rotateOpoint3d} solidtransform + {-35.2644 -90 add 0 0 rotateOpoint3d} solidtransform +drawsolid* +} +\axesIIID[linecolor=blue](1,2.5,0.5)(2.5,3,2.5) +\end{pspicture} +\end{center} + + +\subsection{Multiple sections} + +\subsubsection{Slicing a sphere with PStricks} + +\begin{LTXexample}[width=8cm] +\begin{pspicture}(-4,-4)(4,4) +\psset{viewpoint=100 20 20 rtp2xyz,Decran=75} +\psset{solidmemory,lightsrc=viewpoint} +\codejps{ + /coeff 0.75 def /rO 4 def /OH coeff rO mul neg def}% +\psSolid[object=sphere, + r=rO,ngrid=9 18, + plansepare={[1 0 0 OH]}, + name=part, + action=none] +\psSolid[object=load, + load=part1,plansepare={[-1 0 0 OH]},action=none,name=part] +\psSolid[object=load, + load=part1,plansepare={[0 1 0 OH]},action=none,name=part] +\psSolid[object=load, + load=part1,plansepare={[0 -1 0 OH]},action=none,name=part] +\psSolid[object=load, + load=part1,plansepare={[0 0 1 OH]},action=none,name=part] +\psSolid[object=load, + load=part1,plansepare={[0 0 -1 OH]},action=none,name=part] +\psSolid[object=load,hue=.1 .8 0.5 1, + load=part1](0,0,0) +\composeSolid +\end{pspicture} +\end{LTXexample} + +\subsubsection{Multiple sections of a \Index{parallelepiped}} + +Multiple sections are better carried out inside a PostScript loop, +within \verb+\codejps+; it's easier and quicker! + +In this example, the original solid is a parallelepiped. +Truncations of the vertices and chamfering of the edges are +effected by means of slicing planes, starting off with the +vertices and finishing with the edges. + +\begin{LTXexample}[width=7cm] +\begin{pspicture}(-3.5,-4)(3.5,4) +\psset{viewpoint=100 -20 10 rtp2xyz,Decran=100} +%\lightsource +\psset{lightsrc=viewpoint} +\codejps{ +4 4 6 newparallelepiped +45 90 360 { +/iAngle exch def + /n_x iAngle cos 35.2644 cos mul def + /n_y iAngle sin 35.2644 cos mul def + /n_z 35.2644 sin def + /distance 2 3 add 3 sqrt div neg def +[ n_x n_y n_z distance] +solidplansepare +} for +45 90 360 { +/iAngle exch def + /n_x iAngle cos 35.2644 cos mul def + /n_y iAngle sin 35.2644 cos mul def + /n_z 35.2644 sin neg def + /distance 2 3 add 3 sqrt div neg def +[ n_x n_y n_z distance] +solidplansepare +} for +45 90 360 { +/iAngle exch def +% plan : ax+by+cz-d=0 +[ iAngle cos % a + iAngle sin % b + 0 % c + -2.5 % -d +] solidplansepare +} for +dup [.5 .2] solidputhuecolors +solidlightOn +drawsolid*} +\end{pspicture} +\end{LTXexample} +\subsection{Sections of a torus} +%\begin{pspicture}(-6,-4)(6,4) +%\psSolid[r1=3,r0=1.5, +% object=tore, +%% ngrid=18 60, +% file=data/tore1860,action=writesolid] +%\end{pspicture} + +\begin{center} +\begin{pspicture}(-6,-4)(6,4) +\pstVerb{/Ampl 3 2 sqrt mul def}% +\psset{viewpoint=50 -10 30 rtp2xyz,Decran=50} +%\lightsource +\psset{lightsrc=viewpoint} +\psframe[fillstyle=solid,fillcolor=gray!50](-6,-4)(6,4) +%\psset{solidmemory} +%\psSolid[object=datfile,file=data/tore1860, +% plansepare={[1 0 0 -1.5]}, +% name=lemniscate, +% action=none](0,0,0) +%\psSolid[object=load, +% load=lemniscate1, +% file=data/tore1860lemniscate,action=writesolid](0,0,0) +\defFunction[algebraic]{lemniscate}(t){1.5}{Ampl*sin(t)/(1+cos(t)*cos(t))}{Ampl*sin(t)*cos(t)/(1+cos(t)*cos(t))} +\psSolid[object=datfile,file=data/tore1860lemniscate, + fcol=0 (0.5 0.72 0.5 setrgbcolor) + 1 (0.5 0.72 0.5 setrgbcolor), + fillcolor=green!30, + intersectiontype=0, + intersectionplan={ + [1 0 0 -1.5]}, + intersectioncolor=(rouge), + intersectionlinewidth=2.2] +\psSolid[object=courbe,r=0,linewidth=2pt, + range=0 6.28, + linecolor=red, + function=lemniscate]% +\psSolid[object=plan,action=draw, + definition=equation, + args={[1 0 0 -1.5] 90}, + base=-5 5 -2 2,planmarks,showBase] +%\composeSolid +\end{pspicture} +\end{center} +\begin{center} +\begin{pspicture}(-6,-4)(6,4) +\pstVerb{/Ampl 3 2 sqrt mul def}% +\psset{viewpoint=50 -10 30 rtp2xyz,Decran=50} +%\lightsource +\psset{lightsrc=viewpoint} +\psframe[fillstyle=solid,fillcolor=gray!50](-6,-4)(6,4) +\defFunction[algebraic]{lemniscate}(t){1.5}{Ampl*sin(t)/(1+cos(t)*cos(t))}{Ampl*sin(t)*cos(t)/(1+cos(t)*cos(t))} +\psSolid[object=datfile,file=data/tore1860lemniscate, + hollow, + rm=0 1, + fillcolor=green!30,incolor=yellow!50] +\psSolid[object=courbe,r=0,linewidth=2pt, + range=0 6.28, + linecolor=red, + function=lemniscate]% +\psSolid[object=plan,action=draw, + definition=equation, + args={[1 0 0 -1.5] 90}, + base=-5 5 -2 2,planmarks,showBase] +\end{pspicture} +\end{center} +\subsection{Some more examples} +\begin{enumerate} +\item +You will find a \textit{jps} coded version of this document +within the \verb+\codejps+ command in the following document: + +\centerline{\url{http://melusine.eu.org/syracuse/mluque/solides3d2007/sections}} +\item A lesson about conic sections on: + +\centerline{\url{http://melusine.eu.org/syracuse/mluque/solides3d2007/sections/sections-cone}} +\item A lesson about cylindrical sections on: + +\centerline{\url{http://melusine.eu.org/syracuse/mluque/solides3d2007/sections/section-cylindre}} +\item A lesson about sections of a torus on: + +\centerline{\url{http://melusine.eu.org/syracuse/mluque/solides3d2007/sections/section-tore}} +\end{enumerate} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-solidescreux-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-solidescreux-en.tex new file mode 100644 index 00000000000..5d83ee53b64 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-solidescreux-en.tex @@ -0,0 +1,102 @@ +\section{Emptying a solid} +Several of the predefined solids have a ``\textit{hollow}'' relative which is naturally associated with it (the cone, the truncated cone, the cylinder, the prism and the spherical zone). For all those, the option \texttt{\Lkeyword{hollow}=true} is provided. +Set to \texttt{false}, we get the ``filled'' solid; set to \texttt{true} we get the ``hollow'' version. + + +\subsubsection{Example 1: a \Index{cylinder} and a \Index{hollow cylinder}} + + + +\begin{LTXexample}[width=5cm] +\psset{unit=0.5} +\psset{lightsrc=viewpoint,viewpoint=50 60 25 rtp2xyz,Decran=50} +\begin{pspicture}(-2,-3)(6,6) +\psSolid[object=cylindre,h=6,r=2, + fillcolor=yellow, + ](0,4,0) +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=5cm] +\psset{unit=0.5} +\psset{lightsrc=viewpoint,viewpoint=50 60 25 rtp2xyz,Decran=50} +\begin{pspicture}(-2,-3)(6,6) +\psSolid[object=cylindre,h=6,r=2, + fillcolor=yellow,incolor=red, + hollow](0,4,0) +\end{pspicture} +\end{LTXexample} + + +\newpage + +\subsubsection{Example 2: a \Index{prism} and a \Index{hollow prism}} + +\begin{LTXexample}[width=8.7cm] +\psset{unit=0.5} +\psset{lightsrc=viewpoint,viewpoint=50 60 25 rtp2xyz,Decran=50} +\begin{pspicture}(-9,-4)(4,8) +\defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{} +\defFunction{G}(t){t cos}{t sin}{} +\psSolid[object=grille,base=-6 6 -4 4,action=draw]% +\psSolid[object=prisme, + h=8,fillcolor=yellow, + RotX=90,ngrid=8 18, + base=0 180 {F} CourbeR2+ + 180 0 {G} CourbeR2+](0,4,0) +\axesIIID(3,4,3)(8,6,7) +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=8.7cm] +\psset{unit=0.5} +\psset{lightsrc=viewpoint,viewpoint=50 60 25 rtp2xyz,Decran=50} +\begin{pspicture}(-9,-4)(3,8) +\defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{} +\defFunction{G}(t){t cos}{t sin}{} +\psSolid[object=grille,base=-6 6 -4 4,action=draw]% +\psSolid[object=prisme, + h=8,fillcolor=yellow,incolor=red, + RotX=90,hollow,ngrid=8 18, + base=0 180 {F} CourbeR2+ + 180 0 {G} CourbeR2+](0,4,0) +\axesIIID(3,4,3)(8,6,7) +\end{pspicture} +\end{LTXexample} + +\newpage +\subsubsection{Example 3: a \Index{spherical zone} and a \Index{hollow spherical zone}} + +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.5} +\psset{lightsrc=10 20 30,viewpoint=50 60 25 rtp2xyz,Decran=50} +\begin{pspicture}(-7,-4)(5,7) +\psSolid[object=grille, + base=-5 5 -5 5, + action=draw]% +\psSolid[object=calottesphere, + r=3,ngrid=16 18, + fillcolor=cyan!50, + incolor=yellow, + theta=45,phi=-30](0,0,1.5)% +\axesIIID(3,3,3.6)(6,6,5) +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.5} +\psset{lightsrc=10 20 30,viewpoint=50 60 25 rtp2xyz,Decran=50} +\begin{pspicture}(-7,-5)(7,5) +\psSolid[object=calottesphere, + r=3,ngrid=16 18, + fillcolor=cyan!50, + incolor=yellow, + theta=45,phi=-30, + hollow, + RotY=-80]% +\axesIIID(0,3,3)(6,5,4) +\end{pspicture} +\end{LTXexample} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-solidespredefinis-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-solidespredefinis-en.tex new file mode 100644 index 00000000000..1d71e41486a --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-solidespredefinis-en.tex @@ -0,0 +1,1040 @@ +\section {The predefined solids and their parameters} + +The basic command is:~ +\texttt{\Lcs{psSolid}[object=\textsl{name}]$(x, y ,z)$} which allows us to translate the chosen object to the point with the coordinates $(x, y, +z)$. + +The available predefined names for the objects are: +\begin{sloppypar} +{\ttfamily%\flushleft \hyphenchar\font`\-% +point, line, vector, plan, grille, cube, cylindre, cylindrecreux, cone, conecreux, tronccone, +troncconecreux, sphere, calottesphere, calottespherecreuse, tore, +tetrahedron, octahedron, dodecahedron, +isocahedron, anneau, prisme, prismecreux, parallelepiped, face, polygonregulier, ruban, surface, surface*, surfaceparamettree, pie, fusion, geode, load, offfile, objfile, datfile, new.} +\end{sloppypar} + + +The following table gives an example of every one of the above named solids with their specified parameters: + +\begin{center} +\begin{tabular}{>{\bfseries\sffamily\color{blue}}lcm{4cm}m{5cm}} + \hline +\toptableau +\\\hline + \Index{Point}& + \begin{tabular}{c} + \texttt{[args=1 1 0]}\\ + coordinates + \end{tabular} + & + \begin{pspicture}(-2,-2)(2,2) +\psset{lightsrc=10 5 20,viewpoint=50 20 30 rtp2xyz} +\psSolid[object=point,args=1 1 0]% +\axesIIID(1.5,1.5,1) +\end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSolid[object=point, +args=1 1 0]% +\end{verbatim} +\end{minipage} +\\\hline + \Index{Line}& + \begin{tabular}{c} + \texttt{[args=0 -1 0 1 2 2]}\\ + coordinates of the\\ + end points + \end{tabular} + & + \begin{pspicture}(-2,-2)(2,2) +\psset{lightsrc=10 5 20,viewpoint=50 20 30 rtp2xyz} +\psSolid[object=line,args=0 -1 0 1 2 2] +\axesIIID(1.5,1.5,1) +\end{pspicture} + & +\begin{minipage}{5cm} +\begin{verbatim} +\psSolid[object=line, +args=0 -1 0 1 2 2] +\end{verbatim} +\end{minipage} +\\\hline + \Index{Vector}& + \begin{tabular}{c} + \texttt{[args=1 2 2]}\\ + components of\\ + the vector + \end{tabular} + & +\begin{pspicture}(-2,-2)(2,2) +\psset{lightsrc=10 5 20,viewpoint=50 20 30 rtp2xyz} +\psSolid[object=vecteur,args=1 2 2] +\axesIIID(1.5,1.5,1) +\end{pspicture} + & +\begin{minipage}{5cm} +\begin{verbatim} +\psSolid[object=vecteur, +args=1 2 2] +\end{verbatim} +\end{minipage} +\\\hline + \Index{Plane}& + \begin{tabular}{c} + \texttt{[base=-x x -y y]}\\ + range of plane\\ + \texttt{args={[0 0 1 0]}}\\ + equation of plane + \end{tabular} + & + \begin{pspicture}(-2,-2)(2,2) +\psset{lightsrc=10 5 20,viewpoint=50 20 30 rtp2xyz} +\psSolid[object=plan, + definition=equation, + args={[0 0 1 0]}, + base=-1 1 -1.5 1.5] +\axesIIID(1.5,1.5,1) +\end{pspicture} + & +\begin{minipage}{5cm} +\begin{verbatim} +\psSolid[object=plan, +definition=equation, +args={[0 0 1 0]}, +base=-1 1 -1.5 1.5] +\end{verbatim} +\end{minipage} +\\\hline + +\end{tabular} +\end{center} + +\begin{center} +\begin{tabular}{>{\bfseries\sffamily\color{blue}}lcm{4cm}m{5cm}} + \hline +\toptableau +\\\hline + \Index{Cube}& \begin{tabular}{c} + \texttt{[a=4]}\\ + edge's length + \end{tabular} + & + \begin{pspicture}(-2,-2)(2,2) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=60} + \psSolid[ + object=cube,a=2,action=draw*,fillcolor=magenta!20]% + \axesIIID(1,1,1)(1.5,1.5,1.5) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSolid[ + object=cube, + a=2, + action=draw*, + fillcolor=magenta!20] + \end{verbatim} + \end{minipage} +\\\hline + \Index{Cylinder}& + \begin{tabular}{c} + \texttt{[h=6,r=2]}\\ + height and radius\\ + grid:\\ + \texttt{[ngrid=n1 n2]} + \end{tabular} + & + \begin{pspicture}(-2,-2.5)(2,3) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30} +\psSolid[object=cylindre,h=5,r=2,fillcolor=white,ngrid=4 32](0,0,-3) + \axesIIID(2,2,2.5)(3,3,3.5) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSolid[ + object=cylindre, + h=5,r=2, + fillcolor=white, + ngrid=4 32] + (0,0,-3) + \end{verbatim} + \end{minipage} +\\\hline + \Index{Hollow Cylinder}& + \begin{tabular}{c} + \texttt{[h=6,r=2]}\\ + height and radius\\ + grid:\\ + \texttt{[ngrid=n1 n2]} + \end{tabular} + & + \begin{pspicture}(-2,-2.5)(2,3) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30} +\psSolid[object=cylindrecreux,h=5,r=2,fillcolor=white,mode=4,incolor=green!50](0,0,-2.5) + \axesIIID(2,2,2.5)(3,3,4.5) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSolid[ + object=cylindrecreux, + h=5,r=2, + fillcolor=white, + mode=4, + incolor=green!50] + (0,0,-3) + \end{verbatim} + \end{minipage} + \\\hline +\end{tabular} +\end{center} + +\begin{center} +\begin{tabular}{>{\bfseries\sffamily\color{blue}}lcm{4cm}m{5cm}} + \hline +\toptableau +\\\hline + \Index{Cone}& + \begin{tabular}{c} + \texttt{[h=6,r=2]}\\ + height and radius\\ + grid:\\ + \texttt{[ngrid=n1 n2]} + \end{tabular} + & + \begin{pspicture}(-2,-1)(2,4) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30} + \psSolid[object=cone,h=5,r=2,fillcolor=cyan,mode=4]% + \axesIIID(2,2,5)(2.5,2.5,6) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} + \psSolid[ + object=cone, + h=5,r=2, + fillcolor=cyan, + mode=4]% + \end{verbatim} + \end{minipage} +\\\hline + \Index{Hollow Cone}& + \begin{tabular}{c} + \texttt{[h=6,r=2]}\\ + height and radius\\ + grid:\\ + \texttt{[ngrid=n1 n2]} + \end{tabular} + & + \begin{pspicture}(-2,-1)(2,4) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30} + \psSolid[object=conecreux,h=5,r=2,fillcolor=white,mode=4,RotY=-60,incolor=green!50]% + \axesIIID(2,2,5)(2.5,2.5,6) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} + \psSolid[ + object=conecreux, + h=5,r=2, + RotY=-60, + fillcolor=white, + incolor=green!50, + mode=4]% + \end{verbatim} + \end{minipage} + \\\hline + \Index{Truncated Cone}& + \begin{tabular}{c} + \texttt{[h=6,r0=4,r1=1.5]}\\ + height and radii\\ + grid:\\ + \texttt{[ngrid=n1 n2]} + \end{tabular} + & + \begin{pspicture}(-2,-1)(2,4) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30} + \psSolid[object=tronccone,r0=2,r1=1.5,h=5,fillcolor=cyan,mode=4]% + \axesIIID(2,2,5)(2.5,2.5,6) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} + \psSolid[ + object=tronccone, + r0=2,r1=1.5,h=5, + fillcolor=cyan, + mode=4]% + \end{verbatim} + \end{minipage} +\\\hline + \begin{tabular}{c} + Truncated \\ + Hollow Cone + \end{tabular} + & + \begin{tabular}{c} + \texttt{[h=6,r0=4,r1=1.5]}\\ + height and radii\\ + grid:\\ + \texttt{[ngrid=n1 n2]} + \end{tabular} + & + \begin{pspicture}(-2,-1)(2,4) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30} + \psSolid[object=troncconecreux,r0=2,r1=1,h=5,fillcolor=white,mode=4]% + \axesIIID(2,2,5)(2.5,2.5,6) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSolid[ + object=troncconecreux, + r0=2,r1=1,h=5, + fillcolor=white, + mode=4]% + \end{verbatim} + \end{minipage} +\\\hline +\end{tabular} +\end{center} + +%\newpage + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{center} +%\begin{tabular}{>{\bfseries\sffamily\color{blue}}lcm{4cm}m{5cm}} +\begin{tabular}{ + >{\bfseries\sffamily\color{blue}} l + >{\centering} m{4cm} m{4cm} m{5cm}} + \hline +\toptableau +\\\hline + \Index{Sphere} & + \begin{tabular}{c} + \texttt{[r=2]}\\ + radius\\ + grid:\\ + \texttt{[ngrid=n1 n2]} + \end{tabular} + & + \begin{pspicture}(-2,-2)(2,3) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30} + \psSolid[object=sphere,r=3,fillcolor=red!25,ngrid=18 18,linewidth=0.2\pslinewidth]% + \axesIIID(3,3,3)(4,4,4) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} + \psSolid[ + object=sphere, + r=2,fillcolor=red!25, + ngrid=18 18]% + \end{verbatim} + \end{minipage} +\\\hline + \begin{tabular}{c} + Spherical \\ + zone + \end{tabular} & + \begin{tabular}{c} + \texttt{[r=2]} \\ + radius\\ + \texttt{[phi=0,theta=90]} \\ + latitude for slicing\\ + the zone respectively \\ + from the bottom and top \\ + \end{tabular} + & +\begin{pspicture}(-2,-3)(5,3) +\psset{unit=0.5cm} +\psset{lightsrc=42 24 13,viewpoint=50 30 15 rtp2xyz,Decran=50} +\psSolid[object=calottesphere,r=3,ngrid=16 18, + fillcolor=cyan!50,incolor=yellow,theta=45,phi=-30,hollow,RotY=-80]% +\axesIIID(0,3,3)(6,5,4) +\end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSolid[ + object=calottesphere, + r=3,ngrid=16 18, + theta=45,phi=-30, + hollow,RotY=-80]% + \end{verbatim} + \end{minipage} +\\\hline + \Index{Torus} & + \begin{tabular}{c} + \texttt{[r0=4,r1=1.5]} \\ + inner radius\\ + mean radius\\ + grid:\\ + \texttt{[ngrid=n1 n2]} + \end{tabular} + & + \begin{pspicture}(-2,-2)(2,2.35) +\psset{lightsrc=42 24 13,viewpoint=50 30 15 rtp2xyz} + \psset{Decran=30,unit=0.9cm} + \psSolid[r1=2.5,r0=1.5,object=tore,ngrid=18 36,fillcolor=green!30,action=draw**]% + \axesIIID(4,4,0)(5,5,4) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} + \psSolid[ + r1=2.5,r0=1.5, + object=tore, + ngrid=18 36, + fillcolor=green!30, + action=draw*]% + \end{verbatim} + \end{minipage} +\\\hline + \begin{tabular}{c} + Cylindric \\ + Ring + \end{tabular} + & + \begin{tabular}{c} + \texttt{[R=4,r=3}\\ + inner and outer radius\\ + \texttt{h=6,section=...]}\\ + height\\ + cross \\ + section + \end{tabular} + & + \begin{pspicture}(-2,-2)(2,2.35) +%\psset{unit=0.44cm} +\psset{lightsrc=42 24 13,viewpoint=50 30 15 rtp2xyz} + \psset{Decran=30} +\psSolid[object=anneau,fillcolor=yellow,h=1.5,R=4,r=3]% + \axesIIID(4,4,0)(5,5,4) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} + \psSolid[ + object=anneau, + fillcolor=yellow, + h=1.5,R=4,r=3]% + \end{verbatim} + \end{minipage} +\\\hline +\end{tabular} +\end{center} + + +\begin{center} +%\begin{tabular}{>{\bfseries\sffamily\color{blue}}lcm{4cm}m{6cm}} +\begin{tabular}{ + >{\bfseries\sffamily\color{blue}} l + >{\centering} m{4cm} m{4cm} m{5cm}} + \hline +\toptableau +\\\hline + \Index{Tetrahedron}& + \begin{tabular}{c} + \texttt{[r=2]}\\ + radius of the\\ + circumscribed sphere + \end{tabular} + & + \begin{pspicture}(-2,-2)(2,2) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30} + \psSolid[object=tetrahedron,r=3,linecolor=blue,action=draw]% + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSolid[ + object=tetrahedron, + r=3, + linecolor=blue, + action=draw]% + \end{verbatim} + \end{minipage} +\\\hline +\Index{Octahedron} & + \begin{tabular}{c} + \texttt{[a=2]}\\ + radius of the\\ + circumscribed sphere + \end{tabular} + & + \begin{pspicture}(-2,-1.85)(2,2.85) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30} + \psSolid[object=octahedron,a=3,linecolor=blue,fillcolor=Turquoise]% + \axesIIID(3,3,3)(4,4,4) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} + \psSolid[ + object=octahedron, + a=3, + linecolor=blue, + fillcolor=Turquoise]% + \end{verbatim} + \end{minipage} +\\\hline + \Index{Dodecahedron} & + \begin{tabular}{c} + \texttt{[a=2]}\\ + radius of the\\ + circumscribed sphere + \end{tabular} + & + \begin{pspicture}(-2,-1.85)(2,1.85) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30} + \psSolid[object=dodecahedron,a=2.5,RotZ=90,action=draw*,fillcolor=OliveGreen]% + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} + \psSolid[ + object=dodecahedron, + a=2.5,RotZ=90, + action=draw*, + fillcolor=OliveGreen]% + \end{verbatim} + \end{minipage} +\\ \hline +\Index{Icosahedron} & + \begin{tabular}{c} + \texttt{[a=2]}\\ + radius of the\\ + circumscribed sphere + \end{tabular} + & + \begin{pspicture}(-2,-1.85)(2,2.85) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30} + \psSolid[object=icosahedron,a=3,action=draw*,fillcolor=green!50]% + \axesIIID(3,3,3)(4,4,4) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSolid[ + object=icosahedron, + a=3, + action=draw*, + fillcolor=green!50]% + \end{verbatim} + \end{minipage} +\\\hline + \Index{Prism} + & + \begin{tabular}{c} + \texttt{[axe=0 0 1]}\\ + direction of the axis\\ + \texttt{[base=}\\ + \texttt{-1 -1 1 -1 0 1]}\\ + coordinates of\\ + the vertices\\ + of the base\\ + \texttt{[h=6]}\\ + height + \end{tabular} + & + \begin{pspicture}(-2,-2)(2,3) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30,unit=0.9cm} +\psSolid[object=prisme,action=draw*,linecolor=red,h=4,fillcolor=gray!50]% +\psSolid[object=grille,base=-3 3 -3 3,action=draw]% + \axesIIID(3,3,4)(5,5,5) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSolid[ + object=prisme, + action=draw*, + linecolor=red, + h=4]% + \end{verbatim} + \end{minipage} + \\\hline +\end{tabular} +\end{center} + +%\newpage +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{center} +%\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} +%\begin{tabular}{>{\bfseries\sffamily\color{blue}}lcm{4cm}m{6cm}} +\begin{tabular}{ + >{\bfseries\sffamily\color{blue}} l + >{\centering} m{4cm} m{4cm} m{5cm}} + \hline +\toptableau +\\\hline + \Index{Grid} + & + \begin{tabular}{c} + \texttt{[base=-X +X -Y +Y]} + \end{tabular} + & + \begin{pspicture}(-1.5,-2)(2,3) +\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30,unit=0.9cm} +\psSolid[object=grille,base=-5 5 -3 3]% + \axesIIID(5,3,0)(6,4,4) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSolid[ + object=grille, + base=-5 5 -3 3]% + \end{verbatim} + \end{minipage} +\\\hline +% + \Index{Cuboid} + & + \begin{tabular}{c} + \texttt{[a=4,b=3,c=2]}\\ + edge lenghts\\ + with center in $O$ + \end{tabular} + & + \begin{pspicture}(-1.5,-2)(2,3) + \psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} + \psset{Decran=30} +\psSolid[object=parallelepiped,a=5,b=6,c=2,fillcolor=bleuciel,axe=1 1 1](0,0,c 2 div) +\psSolid[object=grille,base=-2.5 2.5 -3 3,action=draw](0,0,2) +\psSolid[object=grille,base=-1 1 -3 3,RotY=90,action=draw](2.5,0,1) +\psSolid[object=grille,base=-2.5 2.5 -1 1,RotX=-90,action=draw](0,3,1) + \axesIIID(2.5,3,2)(3.5,4,4) + \end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSolid[ + object=parallelepiped,% + a=5,b=6,c=2, + fillcolor=yellow]% + (0,0,c 2 div) + \end{verbatim} + \end{minipage} +\\\hline +% + \Index{Face} + & + \begin{tabular}{l} + \texttt{[base=x0 y0 x1 y1}\\ + \texttt{~ x2 y2 etc.]}\\ + the coordinates \\ + of the vertices + \end{tabular} + & +\begin{pspicture}(-2,-2)(3,2) +\psset{unit=0.4cm} +\psset{viewpoint=50 -20 30 rtp2xyz,Decran=50} +\psSolid[object=grille,base=-4 6 -4 4,action=draw,linecolor=gray](0,0,0) +\psSolid[object=face,fillcolor=yellow, + incolor=blue, + base=0 0 3 0 1.5 3 + ](0,1,0) +\psSolid[object=face,fillcolor=yellow, + incolor=blue, + base=0 0 3 0 1.5 3, + RotX=180](0,-1,0) +\axesIIID(0,0,0)(6,6,3) +\end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSolid[ + object=face, + fillcolor=yellow, + incolor=blue, + base=0 0 3 0 1.5 3 + ](0,1,0) +\psSolid[ + object=face, + fillcolor=yellow, + incolor=blue, + base=0 0 3 0 1.5 3, + RotX=180](0,-1,0) + \end{verbatim} + \end{minipage} +\\\hline +% + \Index{Strip} + & + \begin{tabular}{l} + \texttt{[base=x0 y0 x1 y1}\\ + \texttt{~ x2 y2 etc.]}\\ + \texttt{[h=height]}\\ + \texttt{[ngrid=value]}\\ + number of gridlines\\ + \texttt{[axe=0 0 1]}\\ + direction of inclination\\ + of the strip + \end{tabular} + & +\begin{pspicture}(-2,-2)(5,3) +\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50,unit=0.5cm} +\psSolid[object=grille,base=-4 6 -2 4,action=draw,linecolor=gray](0,0,0) +\psSolid[object=ruban,h=3,fillcolor=red!50, + base=0 0 2 2 4 0 6 2, + num=0 1 2 3, + show=0 1 2 3, + ngrid=3]% +\axesIIID(0,2,0)(6,6,6) +\end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSolid[ + object=ruban,h=3, + fillcolor=red!50, + base=0 0 2 2 4 0 6 2, + num=0 1 2 3, + show=0 1 2 3, + ngrid=3]) + \end{verbatim} + \end{minipage} +\\\hline +\end{tabular} +\end{center} + +%\newpage + +%\begin{center} +%\psset{lightsrc=10 20 30,SphericalCoor,viewpoint=50 20 30} +%%\begin{tabular}{>{\bfseries\sffamily\color{blue}}lcm{4cm}m{6cm}} +%\begin{tabular}{ +% >{\bfseries\sffamily\color{blue}} l +% >{\centering} m{4cm} m{4cm} m{5cm}} +% \hline +%\toptableau +%% chemin +%% & +%% \begin{tabular}{l} +%% dessine un chemin\\ +%% d\'{e}fini en postscript\\ +%% sur un plan +%% \end{tabular} +%% & +%% \psset{unit=0.4cm} +%% \begin{pspicture}(-2,-5)(6,8)% +%% \psframe*[linecolor=blue!50](-6,-5)(6,7) +%% \psset{lightsrc=50 20 20,viewpoint=50 30 15,Decran=60} +%% \psProjection[object=chemin,fillstyle=solid,fillcolor=white, +%% linewidth=.05,linecolor=red, +%% normal=1 1 2 180, +%% path=newpath +%% -4 -4 smoveto +%% -4 4 slineto +%% 4 4 slineto +%% 4 -4 slineto +%% closepath +%% ](1,1,2) +%% \psProjection[object=chemin, +%% linewidth=.02, +%% normal=1 1 2 180, +%% path=newpath +%% -4 1 4 +%% {-4 exch smoveto +%% 8 0 srlineto} for +%% -4 1 4 +%% {-4 smoveto +%% 0 8 srlineto} for +%% ](1,1,2) +%% \psProjection[object=chemin,fillstyle=hlines,hatchcolor=yellow, +%% linecolor=red, +%% normal=1 1 2 180, +%% path=newpath +%% 2 0 moveto +%% 0 2 360 { +%% /x exch def +%% x cos 2 mul +%% x sin 2 mul +%% slineto +%% } for +%% ](1,1,2) +%% \psPoint(0,0,0){O} +%% \psPoint(1,1,2){O1}\psPoint(1.4,1.4,2.8){K} +%% \psline[linewidth=.1,linecolor=red](O1)(K) +%% \psline[linestyle=dashed](O)(O1) +%% \psProjection[object=chemin, +%% linewidth=.1, +%% linecolor=green, +%% normal=1 1 2 180, +%% path= +%% newpath +%% 0 0 smoveto +%% 1 0 slineto](1,1,2) +%% \psProjection[object=chemin, +%% linewidth=.1, +%% linecolor=blue, +%% normal=1 1 2 180, +%% path= +%% newpath +%% 0 0 smoveto +%% 0 1 slineto](1,1,2) +%% \axesIIID(4,4,2)(5,5,6) +%% \end{pspicture} +%% & +%% \begin{minipage}{6cm} +%% \begin{verbatim} +%% \psProjection[object=chemin, +%% fillstyle=hlines, +%% hatchcolor=yellow, +%% linecolor=red, +%% normal=1 1 2 180, +%% path=newpath +%% 2 0 smoveto +%% 0 2 360 { +%% /x exch def +%% x cos 2 mul +%% x sin 2 mul +%% slineto +%% } for +%% ](1,1,2) +%% \end{verbatim} +%% \end{minipage} +%\end{tabular} +%\end{center} + +%\newpage +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{center} +%\begin{tabular}{>{\bfseries\sffamily\color{blue}}lcm{4cm}m{6cm}} +\begin{tabular}{ + >{\bfseries\sffamily\color{blue}} l + >{\centering} m{4cm} m{4cm} m{5cm}} + \hline +\toptableau +\\\hline + \Index{Surface} + & + \begin{tabular}{l} + see the related \\ + paragraph in the \\ + documentation + \end{tabular} + & +\begin{pspicture}(-2,-3)(3,3) +\psset{unit=0.4cm,lightsrc=30 30 25,viewpoint=50 40 30 rtp2xyz,Decran=50} +\psSurface[ngrid=.25 .25,incolor=white,axesboxed](-4,-4)(4,4){% + x dup mul y dup mul 3 mul sub x mul 32 div} +\end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} +\psSurface[ngrid=.25 .25, + incolor=white,axesboxed] + (-4,-4)(4,4){% + x dup mul y dup mul 3 mul + sub x mul 32 div} + \end{verbatim} + \end{minipage} +\\\hline +% + \Index{New} + & + \begin{tabular}{l} + solid defined\\ + by the coordinates \\ + of the vertices\\ + and the vertices\\ + of each face + \end{tabular} + & + +\begin{pspicture}(-2,-2)(2,4) +\psset{unit=0.4cm} +\psset{viewpoint=50 -20 30 rtp2xyz,Decran=50} +\psSolid[object=new, + action=draw, + sommets= + 2 4 3 + -2 4 3 + -2 -4 3 + 2 -4 3 + 2 4 0 + -2 4 0 + -2 -4 0 + 2 -4 0 + 0 4 5 + 0 -4 5, + faces={ + [0 1 2 3] + [7 6 5 4] + [0 3 7 4] + [3 9 2] + [1 8 0] + [8 9 3 0] + [9 8 1 2] + [6 7 3 2] + [2 1 5 6]}, + num=all, + show=all]% +\axesIIID(0,0,0)(5,5,7) +\end{pspicture} + & + \begin{minipage}{5cm} + \begin{verbatim} + \psSolid[object=new, + action=draw, + sommets= + 2 4 3 + -2 4 3 + -2 -4 3 + 2 -4 3 + 2 4 0 + -2 4 0 + -2 -4 0 + 2 -4 0 + 0 4 5 + 0 -4 5, + faces={ + [0 1 2 3] + [7 6 5 4] + [0 3 7 4] + [3 9 2] + [1 8 0] + [8 9 3 0] + [9 8 1 2] + [6 7 3 2] + [2 1 5 6]}]% + \end{verbatim} + \end{minipage} +\\\hline +% + \Index{Curve} + & + \begin{tabular}{l} + curve of a function\\ + $\mathbb{R} \rightarrow \mathbb{R}^3$\\ + defined by its\\ + paramterised equations\\ + \end{tabular} + & + +\begin{pspicture}(-2,-1)(1.75,2.7) +\psset{unit=0.35cm} +\psset{lightsrc=10 -20 50,viewpoint=50 -20 20 rtp2xyz,Decran=50} +%\psframe*[linecolor=blue!50](-6,-3)(6,8) +\psSolid[object=grille,base=-4 4 -4 4,linecolor=red,linewidth=0.5\pslinewidth]% +\axesIIID(0,0,0)(4,4,7) +\defFunction[algebraic]{helice}(t){3*cos(4*t)}{3*sin(4*t)}{t} +\psSolid[object=courbe,r=0, + range=0 6, + linecolor=blue,linewidth=0.1, + resolution=360, + function=helice]% +\end{pspicture} + & + \begin{minipage}{5cm} +% \footnotesize + \begin{verbatim} +\defFunction[algebraic]% + {helice}(t) + {3*cos(4*t)}{3*sin(4*t)}{t} +\psSolid[object=courbe,r=0, + range=0 6, + linecolor=blue, + linewidth=0.1, + resolution=360, + function=helice]% + \end{verbatim} + \end{minipage} +\\\hline +%% courbeR2 +%% & +%% \begin{tabular}{l} +%% trac\'{e} d'une fonction\\ +%% R --> R\textsuperscript{2}\\ +%% d\'{e}finie par ses\\ +%% \'{e}quations param\'{e}triques\\ +%% \end{tabular} +%% & +%% \psset{unit=0.4cm} +%% \begin{pspicture}(-6,-7)(6,6) +%% \psframe*[linecolor=yellow!50](-6,-6)(6,6) +%% \psset{SphericalCoor,viewpoint=50 -20 30,Decran=50} +%% {\psset{linewidth=0.5\pslinewidth,linecolor=gray} +%% \psSolid[object=grille,base=-4 4 -4 0,RotX=90,RotZ=90]% +%% \psSolid[object=grille,base=-4 4 -4 4]% +%% \psSolid[object=grille,base=-4 4 0 4,RotX=90,RotZ=90]} +%% \defFunction{parabole}(t){t}{t dup mul}{} +%% \defFunction{droite}(t){t}{t 2 add }{} +%% \axesIIID(0,0,0)(4,4,4) +%% \psProjection[object=chemin, +%% linewidth=.1, +%% linecolor=blue, +%% normal=0 1 0 1 0 0, +%% path= +%% newpath +%% 0 0 moveto +%% 1 0 lineto] +%% \psProjection[object=chemin, +%% linewidth=.1, +%% linecolor=red, +%% normal=0 1 0 1 0 0, +%% path= +%% newpath +%% 0 0 moveto +%% 0 1 lineto] +%% \psProjection[object=courbeR2, +%% range=-1 2,fillstyle=vlines,hatchwidth=0.5\pslinewidth, +%% normal=0 1 0 1 0 0, +%% function=parabole] +%% \psProjection[object=courbeR2, +%% range=-2 2, +%% linecolor=green, +%% normal=0 1 0 1 0 0, +%% function=parabole] +%% \psProjection[object=courbeR2, +%% range=-2 2 , +%% linecolor=red, +%% normal=0 1 0 1 0 0, +%% function=droite] +%% \psPoint(0,0,4.15){Z1} +%% \uput*[60](Z1){$z=y^2$} +%% \rput(0,-6.5){\psframebox[linecolor=yellow!50]{\texttt{$\backslash${}defFunction\{parabole\}(t)\{t\}\{t dup mul\}\{\}}}} +%% \end{pspicture} +%% & +%% \begin{minipage}{6cm} +%% \footnotesize +%% \begin{verbatim} +%% \psProjection[object=courbeR2, +%% range=-2 2, +%% linecolor=green, +%% normal=0 1 0 1 0 0, +%% function=parabole] +%% \end{verbatim} +%% \end{minipage} +%% \\\hline +\end{tabular} +\end{center} + +Some information about rings and parallelepipeds is available in the documents: +\begin{itemize} + \item \texttt{doc-grille-parallelepiped.tex(.pdf)}; + \item \texttt{doc-anneau.tex(.pdf).} +\end{itemize} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\newpage + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-surfaces-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-surfaces-en.tex new file mode 100644 index 00000000000..bf4e4923f00 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-surfaces-en.tex @@ -0,0 +1,248 @@ +\section{Presentation} + +The command has the following form: +\begin{verbatim} +\psSurface[options](xmin,ymin)(xmax,ymax){equation of the surface z=f(x,y)} +\end{verbatim} + with the same options which apply to solids, and these additional +ones: +\begin{itemize} + \item The surface grid is defined by the parameter + \texttt{\Lkeyword{ngrid}=n1 n2}, which has these specifics: + +\begin{minipage}{1\linewidth} + \begin{itemize} + \item If \texttt{n1} and/or \texttt{n2} are integers, the + number(s) represent(s) the number of grids following $Ox$ and/or + $Oy$. + \item If \texttt{n1} and/or \texttt{n2 } are decimals, the + number(s) represent(s) the incrementing steps following $Ox$ + and/or $Oy$. + \item If \texttt{\Lkeyword{ngrid}=n}, with only one parameter value, + the number of grids, or the incrementing steps, + are identical on both axes. + \end{itemize} +\end{minipage} + + \item \Lkeyword{algebraic}: this option allows you to write the function in +algebraic notation; \texttt{pstricks.pro} meanwhile contains +the code \texttt{AlgToPs} + from Dominique \textsc{Rodriguez}, which allows this notation and which is +included in the \texttt{pstricks-add.pro} file. This version +of \texttt{pstricks} %%%% should this be pstricks-add(.pro) ?? + is provided with \texttt{pst-solides3d}. If necessary, you must load the +\texttt{pstricks-add} package in the document preamble. + \item \Lkeyword{grid}: by default the grid is activated. If the + option \Lkeyword{grid} is used, the grid will be deactivated! %%%% this seems perverse; would [nogrid] be better? + \item \Lkeyword{axesboxed}: this option allows you to draw the 3D + coordinate axes +in a semi-automatic way, but because of the need to specify +the limits of $z$ by hand this option is deactivated by +default: + \begin{itemize} + \item \Lkeyword{Zmin}: minimum value; + \item \Lkeyword{Zmax}: maximum value; + \item \Lkeyword{QZ}: allows a vertical shift of the coordinate axes +with the value \texttt{\Lkeyword{QZ}=value}; + \item \Lkeyword{spotX}: alters the placing of the $x$-axis tick values + at the end of ticks, if the default behaviour is unsatisfactory. + The positioning can be altered with the command +\verb+\uput[angle](x,y){ticklabel}+; + \item \Lkeyword{spotY}: is similar; + \item \Lkeyword{spotZ}: likewise. + \end{itemize} +\end{itemize} +If the option \Lkeyword{axesboxed} doesn't meet your needs, it is +possible to adapt the following command, which is appropriate for +the first example: + + + +\small +\begin{verbatim} +\psSolid[object=parallelepiped,a=8,b=8,c=8,action=draw](0,0,0) +\multido{\ix=-4+1}{9}{% + \psPoint(\ix\space,4,-4){X1} + \psPoint(\ix\space,4.2,-4){X2} + \psline(X1)(X2)\uput[dr](X1){\ix}} +\multido{\iy=-4+1}{9}{% + \psPoint(4,\iy\space,-4){Y1} + \psPoint(4.2,\iy\space,-4){Y2} + \psline(Y1)(Y2)\uput[dl](Y1){\iy}} +\multido{\iz=-4+1}{9}{% + \psPoint(4,-4,\iz\space){Z1} + \psPoint(4,-4.2,\iz\space){Z2} + \psline(Z1)(Z2)\uput[l](Z1){\iz}} +\end{verbatim} + +%L'option \Cadre{[hue=0 1]} permet de remplir les facettes avec des d\'{e}grad\'{e}s +%de couleur. +\section{Example 1: a \Index{saddle}} +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.45} +\psset{viewpoint=50 40 30 rtp2xyz,Decran=50} +\psset{lightsrc=viewpoint} +\begin{pspicture}(-7,-8)(7,8) +\psSurface[ngrid=.25 .25,incolor=yellow, + linewidth=0.5\pslinewidth,axesboxed, + algebraic,hue=0 1](-4,-4)(4,4){% + ((y^2)-(x^2))/4 } +\end{pspicture} +\end{LTXexample} +%\newpage +\section{Example 2: a saddle without a grid} + +The grid lines are suppressed, when using in the option: +\Lkeyword{grid}. +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.5} +\psset{lightsrc=30 30 25} +\psset{viewpoint=50 40 30 rtp2xyz,Decran=50} +\begin{pspicture}(-7,-8)(7,8) +\psSurface[fillcolor=red!50,ngrid=.25 .25, + incolor=yellow,linewidth=0.5\pslinewidth, + grid,axesboxed](-4,-4)(4,4){% + y dup mul x dup mul sub 4 div } +\end{pspicture} +\end{LTXexample} + +%\newpage + +\section{Example 3: a \Index{paraboloid}} + +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.5} +\psset{lightsrc=30 -10 10,linewidth=0.5\pslinewidth} +\psset{viewpoint=50 40 30 rtp2xyz,Decran=50} +\begin{pspicture}(-7,-4)(7,12) +\psSolid[object=grille,base=-4 4 -4 4,action=draw]% +\psSurface[ + fillcolor=cyan!50, + intersectionplan={[0 0 1 -5]}, + intersectioncolor=(bleu), + intersectionlinewidth=3, + intersectiontype=0, + ngrid=.25 .25,incolor=yellow, + axesboxed,Zmin=0,Zmax=8,QZ=4](-4,-4)(4,4){% + y dup mul x dup mul add 4 div } +\end{pspicture} +\end{LTXexample} + +\newpage + +\section{Example 4: a \Index{sinusoidal wave}} +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.35} +\psset{lightsrc=30 -10 10} +\psset{viewpoint=50 20 30 rtp2xyz,Decran=70} +\begin{pspicture}(-11,-8)(7,8) +\psSurface[ngrid=.2 .2,algebraic,Zmin=-1,Zmax=1, + linewidth=0.5\pslinewidth,spotX=r,spotY=d,spotZ=l, + hue=0 1](-5,-5)(5,5){% + sin((x^2+y^2)/3) } +\end{pspicture} +\end{LTXexample} + +%\newpage + +\section{Example 5: another \Index{sinusoidal wave}} + +In this example we show how to colour the faces, each with a +different coloration, directly using PostScript code. + +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.25} +\psset{lightsrc=30 -10 10} +\psset{viewpoint=100 20 20 rtp2xyz,Decran=80} +\begin{pspicture}(-15,-10)(7,12) +\psSurface[ngrid=0.4 0.4,algebraic,Zmin=-2,Zmax=10,QZ=4, + linewidth=0.25\pslinewidth, + fcol=0 1 4225 + {/iF ED iF [iF 4225 div 0.75 1] (sethsbcolor) astr2str} for + ](-13,-13)(13,13){% + 10*sin(sqrt((x^2+y^2)))/(sqrt(x^2+y^2)) } +\end{pspicture} +\end{LTXexample} + +%\newpage + +\section{Example 6: a \Index{hyperbolic paraboloid} with the equation $z = xy$} + +In this example we combine the graph of the surface and the curves +of intersection of the paraboloid with the planes $z=4$ and +$z=-4$. In this case we use \verb+\psSolid[object=courbe]+. +\begin{verbatim} +\defFunction{F}(t){t}{4 t div 4 min}{4} +\psSolid[object=courbe,range=1 4, + linecolor=red,linewidth=2\pslinewidth, + function=F] +\end{verbatim} +You will note the use of the functions \texttt{min} and +\texttt{max}, which return the minimum and the maximum, +respectively, of two values. + + +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.5} +\psset{viewpoint=50 20 30 rtp2xyz,Decran=50} +\psset{lightsrc=viewpoint,linewidth=0.5\pslinewidth} +\begin{pspicture}(-7,-8)(7,8) +\psSolid[object=datfile,file=data/paraboloid,hue=0 1 0.5 1,incolor=yellow] +\gridIIID[Zmin=-4,Zmax=4,spotX=r](-4,4)(-4,4) +\defFunction{F}(t){t}{4 t div 4 min}{4} +\psSolid[object=courbe,range=1 4,r=0, + linecolor=red,linewidth=2\pslinewidth, + function=F] +\defFunction{G}(t){t}{4 t div -4 max}{4} +\psSolid[object=courbe,range=-1 -4,r=0, + linecolor=red,linewidth=2\pslinewidth, + function=G] +\defFunction{H}(t){t neg}{4 t div -4 max}{-4} +\psSolid[object=courbe,range=-1 -4,r=0, + linecolor=red,linewidth=2\pslinewidth, + function=H] +\end{pspicture} +\end{LTXexample} +%\newpage + +\section{Example 7: a surface with the equation $z = xy(x^2+y^2)$} + +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.35} +\psset{lightsrc=10 12 20,linewidth=0.5\pslinewidth} +\psset{viewpoint=30 50 60 rtp2xyz,Decran=50} +\begin{pspicture}(-10,-10)(12,10) +\psSurface[ + fillcolor=cyan!50,algebraic, + ngrid=.25 .25,incolor=yellow,hue=0 1, + Zmin=-3,Zmax=3](-3,-3)(3,3){% + x*y*(x^2-y^2)*0.1} +\end{pspicture} +\end{LTXexample} + +\section{Example 8: a surface with the equation $z = \left(1-\frac{x^2+y^2}{2}\right)^2$}% $ + +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.5cm,viewpoint=50 60 30 rtp2xyz,Decran=50} +\psset{lightsrc=viewpoint} +\begin{pspicture}(-4,-5)(6,8) + \psSurface[ngrid=.25 .25,incolor=yellow,linewidth=0.5\pslinewidth, + base= -2 2 -2 2, axesboxed, Zmin=-5,Zmax=2,hue=0 1](-5,-5)(5,5){% + 1 0.5 x dup mul y dup mul add mul sub dup -5 lt { pop -5 }if } +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=7.5cm] +\psset{unit=0.5cm,viewpoint=50 60 30 rtp2xyz,Decran=50, + lightsrc=viewpoint} +\begin{pspicture}(-4,-5)(6,8) + \psSurface*[ngrid=.25 .25,incolor=yellow, + linewidth=0.5\pslinewidth, + r = 3 sqrt 2 mul, axesboxed, Zmin=-5,Zmax=2,hue=0 1](-5,-5)(5,5){% + 1 0.5 x dup mul y dup mul add mul sub dup -5 lt { pop -5 }if } +\end{pspicture} +\end{LTXexample} + + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-surfacesparametrees-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-surfacesparametrees-en.tex new file mode 100644 index 00000000000..5e3448591bd --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-surfacesparametrees-en.tex @@ -0,0 +1,169 @@ +\section{Parameterised surfaces} + +\subsection{The method} + +The parameterised \Index{surfaces} are setup as $[x(u,v),y(u,v),z(u,v)]$ and administered thanks to the macro \Lcs{psSolid} by the option +\texttt{\Lkeyword{object}=\Lkeyval{surfaceparametree}} and defined either in \textit{Reverse Polish Notation}(\textit{RPN}): + + +\begin{verbatim} +\defFunction{shell}(u,v){1.2 v exp u Sin dup mul v Cos mul mul}% x(u,v) + {1.2 v exp u Sin dup mul v Sin mul mul}% y(u,v) + {1.2 v exp u Sin u Cos mul mul} % z(u,v) +\end{verbatim} + +or in \textit{algebraic notation}: + +\begin{verbatim} +\defFunction[algebraic]{shell}(u,v){1.2^v*(sin(u)^2*cos(v))}% x(u,v) + {1.2^v*(sin(u)^2*sin(v))}% y(u,v) + {1.2^v*(sin(u)*cos(u))} % z(u,v) +\end{verbatim} + +The range for the values of $u$ and $v$ are defined within the option +\texttt{\Lkeyword{range}=$\mathtt{u_{min}}$ $\mathtt{u_{max}}$ $\mathtt{v_{min}}$ %$ +$\mathtt{v_{max}}$}. + +The drawing of the function is activated with +\texttt{\Lkeyword{function}=name}, this name is implied when the parametric equations are written: +\verb+\defFunction{name}...+ + +Any other choice of $u$ and $v$ are accepted. Let's remind that the argument of +\texttt{Sin} and \texttt{Cos} must be in radians those of \texttt{sin} and +\texttt{cos} in degrees if \textit{RPN} is used. Within the algebraic notation, the argument is in radians. + + +\subsection{Example 1: a \Index{sea shell}} +\newcommand\quadrillage{% +\psset{linecolor={[cmyk]{1,0,1,0.5}}}\green +\multido{\ix=-4+1}{9}{% + \psPoint(\ix\space,4,-3){X1} + \psPoint(\ix\space,4 .2 add,-3){X2} + \psline(X1)(X2) + \uput[-120](X1){\small\ix}} +\multido{\iy=-4+1}{9}{% + \psPoint(-4,\iy\space,-3){Y1} + \psPoint(-4 .2 sub,\iy\space,-3){Y2} + \psline(Y1)(Y2) + \uput[0](Y1){\small\iy}} +\multido{\iz=-3+1}{7}{% + \psPoint(4,4,\iz\space){Z1} + \psPoint(4,4 .2 add,\iz\space){Z2} + \psline(Z1)(Z2) + \uput[l](Z1){\small\iz}} +\psPoint(0,4 0.5 add,-3){X0} +\uput[-120](X0){$x$} + \psPoint(-4 .5 sub,0,-3){Y0} +\uput[0](Y0){$y$}} +\begin{LTXexample}[width=7.8cm] +\psset{unit=0.75} +\begin{pspicture}(-5.5,-6)(4.5,4) +\psframe*(-5.5,-6)(4.5,4) +\psset[pst-solides3d]{viewpoint=20 120 30 rtp2xyz, + Decran=15,lightsrc=-10 15 10} +% Parametric Surfaces +\psSolid[object=grille,base=-4 4 -4 4, + action=draw*,linecolor={[cmyk]{1,0,1,0.5}}] + (0,0,-3) +\defFunction{shell}(u,v) + {1.2 v exp u Sin dup mul v Cos mul mul} + {1.2 v exp u Sin dup mul v Sin mul mul} + {1.2 v exp u Sin u Cos mul mul} +\psSolid[object=surfaceparametree, + linecolor={[cmyk]{1,0,1,0.5}}, + base=0 pi pi 4 div neg 5 pi mul 2 div, + fillcolor=yellow!50,incolor=green!50, + function=shell,linewidth=0.5\pslinewidth,ngrid=25]% +\psSolid[object=parallelepiped,a=8,b=8,c=6, + action=draw,linecolor={[cmyk]{1,0,1,0.5}}]% +\quadrillage +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=7.8cm] +\psset{unit=0.75} +\begin{pspicture}(-5,-4)(5,6) +\psframe*(-5,-4)(5,6) +\psset[pst-solides3d]{viewpoint=20 20 -10 rtp2xyz, + Decran=15,lightsrc=5 10 2} +% Parametric Surfaces +\psSolid[object=grille,base=-4 4 -4 4, + action=draw*,linecolor=red](0,0,-3) +\defFunction[algebraic]{shell}(u,v) + {1.21^v*(sin(u)*cos(u))} + {1.21^v*(sin(u)^2*sin(v))} + {1.21^v*(sin(u)^2*cos(v))} +%% \defFunction{shell}(u,v) +%% {1.2 v exp u Sin u Cos mul mul} +%% {1.2 v exp u Sin dup mul v Sin mul mul} +%% {1.2 v exp u Sin dup mul v Cos mul mul} +\psSolid[object=surfaceparametree, + linecolor={[cmyk]{1,0,1,0.5}}, + base=0 pi pi 4 div neg 5 pi mul 2 div, + fillcolor=green!50,incolor=yellow!50, + function=shell,linewidth=0.5\pslinewidth, + ngrid=25]% +\white% +\gridIIID[Zmin=-3,Zmax=4,linecolor=white, + QZ=0.5](-4,4)(-4,4) +\end{pspicture} +\end{LTXexample} + + + +\subsection{Example 2: a \Index{helix}} +\begin{LTXexample}[width=5.5cm] +\psset{unit=0.75} +\begin{pspicture}(-3,-4)(3,6) +\psset[pst-solides3d]{viewpoint=20 10 2,Decran=20, + lightsrc=20 10 10} +% Parametric Surfaces +\defFunction{helix}(u,v) + {1 .4 v Cos mul sub u Cos mul 2 mul} + {1 .4 v Cos mul sub u Sin mul 2 mul} + {.4 v Sin mul u .3 mul add} +\psSolid[object=surfaceparametree,linewidth=0.5\pslinewidth, + base=-10 10 0 6.28,fillcolor=yellow!50,incolor=green!50, + function=helix, + ngrid=60 0.4]% +\gridIIID[Zmin=-3,Zmax=3](-2,2)(-2,2) +\end{pspicture} +\end{LTXexample} + + +\subsection{Example 3: a \Index{cone}} +\begin{LTXexample}[width=10cm] +\psset{unit=0.5} +\begin{pspicture}(-9,-7)(10,12) +\psframe*(-9,-7)(10,12) +\psset[pst-solides3d]{ + viewpoint=20 5 10, + Decran=50,lightsrc=20 10 5} +\psSolid[ + object=grille,base=-2 2 -2 2, + linecolor=white](0,0,-2) +% Parametric Surfaces +\defFunction{cone}(u,v) + {u v Cos mul}{u v Sin mul}{u} +\psSolid[object=surfaceparametree, + base=-2 2 0 2 pi mul, + fillcolor=yellow!50, + incolor=green!50,function=cone, + linewidth=0.5\pslinewidth, + ngrid=25 40]% +\psset{linecolor=white}\white +\gridIIID[Zmin=-2,Zmax=2] + (-2,2)(-2,2) +\end{pspicture} +\end{LTXexample} + + +\subsection{An advised website} +You will find on the website: + +\centerline{\url{http://k3dsurf.sourceforge.net/}} + +an excellent software to represent surfaces with numerous examples of parameterised surfaces and others. + +\endinput + diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-tracerpolygone-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-tracerpolygone-en.tex new file mode 100644 index 00000000000..6e5b7f6a5bb --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-tracerpolygone-en.tex @@ -0,0 +1,13 @@ +\section{Drawing a \Index{polygon}} + +We use: \texttt{\textbackslash psPolygonIIID[options](x0,y0,z0)(x1,y1,z1)\ldots(xn,yn,zn)}, +with the possible options that follow: +\begin{itemize} + \item \texttt{\Lkeyword{linecolor}=color}; + \item \texttt{\Lkeyword{doubleline}=true}; + \item \texttt{\Lkeyword{linearc}=value}; + \item \texttt{\Lkeyword{fillstyle}=\Lkeyval{solid}}; + \item \texttt{\Lkeyword{fillstyle}=\Lkeyval{vlines}} or \texttt{\Lkeyword{fillstyle}=\Lkeyval{hlines}} or \texttt{\Lkeyword{fillstyle}=\Lkeyval{crosshatch}}. +\end{itemize} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-transform-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-transform-en.tex new file mode 100644 index 00000000000..3b536481f7c --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-transform-en.tex @@ -0,0 +1,157 @@ +\section{The option \texttt{transform}} + +The option \Lkeyword{transform}, which is nothing else than a formula $\mathbb{R}^3 \rightarrow \mathbb{R}^3$, +which is applied to every point of the solid. In the first example, the object that accepts the transformation is a cube. +The referenced cube is yellow, the transformed cube is green and the cube before the \Index{transformation} is setup with a reticule. + +\subsection{Identical scaling factor in the three coordinates} + +The scaling factor is set to $0.5$. It is either introduced within the PostScript variable `\texttt{/Facteur}': +\begin{verbatim} +\pstVerb{/Facteur {.5 mulv3d} def}% +\end{verbatim} +and then passed to the option \verb+transform+: +\begin{verbatim} +\psSolid[object=cube,a=2,ngrid=3, + transform=Facteur](2,0,1)% +\end{verbatim} +or directly passed to the option: +\begin{verbatim} +\psSolid[object=cube,a=2,ngrid=3, + transform={.5 mulv3d}](2,0,1)% +\end{verbatim} +Here the \textit{jps} abbreviation \texttt{transform=\{.5 mulv3d\}} for a function $\mathbb{R}^3 \rightarrow \mathbb{R}^3$ was used. + +Another method would be to use the code +\begin{verbatim} +\defFunction[algebraic]{matransformation}(x,y,z) + {.5*x} + {.5*y} + {.5*z} +\end{verbatim} +and then pass it to the option +\texttt{transform=matransformation}. +\begin{LTXexample}[pos=t] +\psset{viewpoint=20 60 20 rtp2xyz,lightsrc=viewpoint,Decran=20} +\begin{pspicture}(-5,-3)(6,5) +\psSolid[object=grille,base=-4 4 -4 4,fillcolor=red!50]% +\axesIIID(0,0,0)(4,4,4)% +\psSolid[object=cube,fillcolor=yellow!50, + a=2,ngrid=3](-2,0,1) +\psSolid[object=cube,fillcolor=green!50, + a=2,transform={.5 mulv3d}, + ngrid=3](2,0,1) +\psSolid[object=cube, + action=draw, + a=2,ngrid=3](2,0,1) +\end{pspicture} +\end{LTXexample} + +\encadre{The scaling factor also affects the position coordinates of the cube's center.} + +\subsection{Different scaling factors for the three coordinates} + +Let's for example use a factor 0.75 for $x$, 4 +for $y$ and 0.5 for $z$ using the function \texttt{scaleOpoint3d} from the + \textit{jps} library---so a cube will be transformed to a cuboid. +\begin{LTXexample}[pos=t] +\psset{viewpoint=20 60 20 rtp2xyz,lightsrc=viewpoint,Decran=20} +\begin{pspicture}(-5,-3)(6,5) +\psSolid[object=grille,base=-4 4 -4 4,fillcolor=red!50]% +\axesIIID(0,0,0)(4,4,4)% +\psSolid[object=cube,fillcolor=yellow!50, + a=2,ngrid=3](-2,0,1) +\psSolid[object=cube,fillcolor=green!50, + a=2,transform={.75 4 .5 scaleOpoint3d}, + ngrid=3](2,0,1) +\psSolid[object=cube, + action=draw, + a=2,ngrid=3](2,0,1) +\end{pspicture} +\end{LTXexample} + +\subsection{Transformation associated with the distance to the origin} + +Here an example applied to a cube: + +\begin{equation*} +\left\lbrace\begin{aligned} +x'&=\big(0.5\sqrt{x^2+y^2+z^2}+1-0.5\sqrt{3}\big)x \\ +y'&=\big(0.5\sqrt{x^2+y^2+z^2}+1-0.5\sqrt{3}\big)y \\ +z'&=\big(0.5\sqrt{x^2+y^2+z^2}+1-0.5\sqrt{3}\big)z +\end{aligned}\right. +\end{equation*} + +\begin{LTXexample}[width=7cm] +\begin{pspicture}(-3,-4)(4,3) +\psset{viewpoint=20 60 20 rtp2xyz,lightsrc=10 15 7,Decran=20} +\pstVerb{ +/gro { +4 dict begin + /M defpoint3d + /a .5 def + /b 1 a 3 sqrt mul sub def + /k M norme3d a mul b add def + M k mulv3d +end +} def}% +\psset{linewidth=.02,linecolor=gray} +\psSolid[object=cube,a=3,ngrid=9, + transform=gro]% +\end{pspicture} +\end{LTXexample} +%\newpage + +\subsection{Bending and \Index{torsion} of beams} + +The solid to the left is a prism of the height 10 cm with 20 floors +(\texttt{\Lkeyword{ngrid}=20 2}). In every floor, an additional angle of rotation---for example 10$^{\mathrm{o}}$ around the $Oz$ axis is---given. + Now that the adjacent floors have a distance of $0.5$~cm, one multiplies $z\times20$. + +La flexion est envisag\'{e}e dans le plan $xOz$ sous l'action d'une force perpendiculaire \`{a} la poutre appliqu\'{e}e en son extr\'{e}mit\'{e}. + +\begin{LTXexample}[pos=t] +\psset{viewpoint=100 50 20 rtp2xyz,lightsrc=viewpoint,Decran=100,unit=0.65} +\begin{pspicture}(-3,-1)(3.5,11) +\psSolid[object=grille,base=-2 2 -2 2,ngrid=8]% +\psSolid[object=prisme,h=10,ngrid=20 2, + 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]% +\end{pspicture} +\begin{pspicture}(-3,-1)(3.5,11) +\psSolid[object=grille,base=-2 2 -2 2,ngrid=8]% +\pstVerb{ +/torsion {% on tourne de 10 degr\'{e}s suivant l'axe Oz \`{a} chaque niveau +2 dict begin + /M defpoint3d % on r\'{e}cup\`{e}re les coordonn\'{e}es + M /z exch def pop pop + M 0 0 z 20 mul rotateOpoint3d +end} def}% +\psSolid[object=prisme,h=10,ngrid=20 2, + 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, + transform=torsion]% +\psTransformPoint[RotZ=20](2 0 10)(0,0,0){A} +\psTransformPoint[RotZ=20](2 1 10)(0,0,0){A'} +\psTransformPoint[RotZ=20](-2 0 10)(0,0,0){B} +\psTransformPoint[RotZ=20](-2 -1 10)(0,0,0){B'} +\psline[linecolor=red]{v-v}(A')(A)(B)(B') +\end{pspicture} +\begin{pspicture}(-3.5,-1)(3,11) +\psSolid[object=grille,base=-2 2 -2 2,ngrid=8]% +\pstVerb{% id\'{e}e de Christophe Poulain +/flexion {% on tourne de 2 degr\'{e}s suivant l'axe Oy \`{a} chaque niveau +2 dict begin + /M defpoint3d % on r\'{e}cup\`{e}re les coordonn\'{e}es + M /z exch def pop pop + M 0 z 2 mul 0 rotateOpoint3d +end} def}% +\axesIIID(0,0,0)(3,3,10) +\psSolid[object=prisme,h=10,ngrid=20 2, + 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, + transform=flexion]% +\psTransformPoint[RotY=20](0.5 0 10)(0,0,0){A} +\psPoint(3 20 cos mul 20 sin 10 mul add 0.5 add,0, 20 cos 10 mul 20 sin 3 mul sub){A'} +\psdot(A)\psline[linecolor=red]{-v}(A)(A') +\end{pspicture} +\end{LTXexample} + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-transformpointconnu-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-transformpointconnu-en.tex new file mode 100644 index 00000000000..90175709d0c --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-transformpointconnu-en.tex @@ -0,0 +1,66 @@ +\section{\Index{Transformations} to a point} + +Given is an initial point $A(x,y,z)$. Now we make some +rotations around the axes $Ox$, $Oy$ and $Oz$ with the appropriate angles (in degrees): +\verb+[RotX=valueX,RotY=valueY,RotZ=valueZ]+, in this order, +then translate it with the vector $(v_x,v_y,v_z)$. The problem is to get back +the coordinates of the image (final point) $A'(x',y',z')$. + +The code +\texttt{\textbackslash psTransformPoint[RotX=valueX,RotY=valueY, + RotZ=valueZ](x y z)(vx,vy,vz)\{A'\}}\\ +now allows us to save the node $A'$, the coordinates of the transformed point. + +In the following example, $A(2,2,2)$ is one of the vertices of the initial +cube, where the centre is placed at the origin. + +\begin{verbatim} +\psSolid[object=cube,a=4,action=draw*,linecolor=red]% +\end{verbatim} + +Some transformations are applied to the cube: + +\begin{verbatim} +\psSolid[object=cube,a=4,action=draw*,RotX=-30,RotY=60,RotZ=-60](7.5,11.25,10)% +\end{verbatim} + +To obtain the image of $A$, we use the following command: + + +\begin{verbatim} +\psTransformPoint[RotX=-30,RotY=60,RotZ=-60](2 2 2)(7.5,11.25,10){A'} +\end{verbatim} + +This allows us, for example, to name these points and then draw the vector $\overrightarrow{AA'}$. +\begin{center} +\begin{pspicture}(-2,-4)(6,6) +\psframe(-3,-4)(9,6) +\psset{viewpoint=50 20 30 rtp2xyz,Decran=50,unit=0.5} +\psSolid[object=cube,a=4,action=draw*,linecolor=red]% +\psPoint(2,2,2){A}\psdot(A) +\psSolid[object=cube,a=4,action=draw*,RotX=-30,RotY=60,RotZ=-60](7.5,11.25,10)% +\psTransformPoint[RotX=-30,RotY=60,RotZ=-60](2 2 2)(7.5,11.25,10){A'} +\psdot(A')\psline[linecolor=blue,arrowsize=0.3]{{o-v}}(A)(A') +\uput[u](A'){$A'$}\uput[u](A){$A$} +\psset{solidmemory,action=none} +\psSolid[object=cube,a=4,name=A1,](0,0,0) +\psSolid[object=plan,definition=solidface,args=A1 0,name=P0] +\psSolid[object=plan,definition=solidface,args=A1 1,name=P1] +\psSolid[object=plan,definition=solidface,args=A1 4,name=P4] +\psset{fontsize=100} +\psProjection[object=texte,linecolor=red,text=A,plan=P0] +\psProjection[object=texte,linecolor=red,text=B,plan=P1] +\psProjection[object=texte,linecolor=red,text=E,plan=P4] +\psSolid[object=cube,a=4,RotX=-30,RotY=60,RotZ=-60,name=A2,](7.5,11.25,10) +\psSolid[object=plan,definition=solidface,args=A2 0,name=P'0] +\psSolid[object=plan,definition=solidface,args=A2 1,name=P'1] +\psSolid[object=plan,definition=solidface,args=A2 2,name=P'2] +\psProjection[object=texte,text=A,plan=P'0] +\psProjection[object=texte,text=B,plan=P'1] +\psProjection[object=texte,text=C,plan=P'2] +\axesIIID(2,2,2)(10,10,8) +\end{pspicture} +\end{center} + + +\endinput diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-tronque-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-tronque-en.tex new file mode 100644 index 00000000000..53a51656b5c --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-tronque-en.tex @@ -0,0 +1,36 @@ +\section{Truncate a solid's vertices} + +The option \Lkeyword{trunc} allows us to \Index{truncate} a solid's vertices either +globally or individually. This option uses the key +\Lkeyword{trunccoeff} (value $0.25$ by default) which indicates the ratio +$k$ used for the \Index{truncation} ($0<k\leq 0.5$). +% +\begin{itemize} + \item \texttt{\Lkeyword{trunc}=\Lkeyval{all}} truncates all the vertices; + \item \texttt{\Lkeyword{trunc}=0 1 2 3} truncates the vertices 0, 1, 2 and 3. +\end{itemize} +% +\begin{LTXexample}[width=6cm] +\psset{viewpoint=50 50 30 rtp2xyz,Decran=25,lightsrc=viewpoint} +\begin{pspicture}(-3,-2)(2,2) +\psSolid[ + action=draw, + object=cube, + RotZ=30, + trunccoeff=.2, + trunc=all]% +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=6cm] +\psset{viewpoint=50 50 30 rtp2xyz,Decran=25,lightsrc=viewpoint} +\begin{pspicture}(-3,-2)(2,2) +\psSolid[action=draw, + object=cube, + RotZ=30, + trunccoeff=.2, + trunc=0 1 2 3]% +\end{pspicture} +\end{LTXexample} + +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-tube-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-tube-en.tex new file mode 100644 index 00000000000..e75b9c82423 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-tube-en.tex @@ -0,0 +1,257 @@ +\section{Tubes} + +This section is about to substitute a curve in two or three dimensions (2D or 3D), +that are setup parameterised, by a \Index{tube}, where the initial curve is the axes and +we can choose the radius and grid. We find some mathematical elements concerning +these objects on the following websites: + +\centerline{\url{http://fr.wikipedia.org/wiki/Tube_(math\%C3\%A9matiques)}} + +\centerline{\url{http://www.mathcurve.com/surfaces/tube/tube.shtml}} + +As usual, the \texttt{pst-solides3d} package offers two possibilities to draw the tubes: +\begin{itemize} + \item via PSTricks and the argument \Lkeyword{object} of \Lcs{psSolid} + \item directly with \verb+\codejps+ +\end{itemize} + +\encadre{It is often advisable to calculate in advance, by hand or with a preferred software, the first derivatives of the parametric functions which define the coordinates.} + +However, if this derivative isn't defined explicitly by the user, the package makes some approximate calculations, but the result then is not always sufficient. + + +\subsection{Usage with PSTricks} + +\subsubsection{Give your curves a relief} +``\textit{Donnez du relief \`{a} vos courbes}'', this is the title of the article +from Robert \textsc{Ferr\'{e}ol}, available on: + +\url{http://mapage.noos.fr/r.ferreol/atelecharger/textes/relief/courbes\%20en\%20relief.html} + +from who the following functions were borrowed and which are analogous to a +Lissajous figure enrolled around a cylinder. + + +\begin{LTXexample}[pos=t] +\begin{pspicture}(-3.5,-4)(4,4) +\psset{lightsrc=80 30 30,viewpoint=100 45 30 rtp2xyz,Decran=110,linewidth=0.2pt} +\defFunction[algebraic]{Func}(t){2.5*cos(t)}{2.5*sin(t)}{2*cos(5*t)} +\defFunction[algebraic]{Func'}(t){-2.5*sin(t)}{2.5*cos(t)}{-10*sin(5*t)} +\psSolid[object=courbe,range=0 6.28,hue=0 1 0.7 1, + ngrid=360 8,function=Func,r=0.15] +\end{pspicture} +\end{LTXexample} + + +The argument \texttt{\Lkeyword{object}=\Lkeyval{courbe}} with the parameters +\Lkeyword{r}, \Lkeyword{function} and \Lkeyword{range} is used to specify +the radius of the tube, the name of the function to be used and the range. + +We can also refine the grid with the optional argument +\texttt{\Lkeyword{ngrid}=$n_1$ $n_2$} where $n_1$ represents the number of +vertices of a section of a tube (if $n_1 = 6$, this gives a tube with a +hexagonal section) and $n_2$ represents the number of divisions along it. + + +\subsubsection{A \Index{hairline curve} is produced with the radius \texttt{r=0}} + +And thus, no fear to specify the derived function. + +\begin{LTXexample}[pos=t] +\begin{pspicture}(-3.5,-4)(4,4) +\psset{lightsrc=80 30 30,viewpoint=100 45 30 rtp2xyz,Decran=110} +\defFunction[algebraic]{FI}(t){2.5*cos(t)}{2.5*sin(t)}{2*cos(5*t)} +\psSolid[object=courbe,range=0 6.28,linewidth=2pt,linecolor=blue,function=FI,r=0] +\end{pspicture} +\end{LTXexample} + + +\subsection{Usage with \texttt{\textbackslash{}codejps}} + +The syntax is \texttt{\textbackslash{}codejps\{t\_min t\_max (name\_function) +radius\_tube [n1 n2] newtube\}}. + + +\begin{LTXexample}[pos=t] +\begin{pspicture}(-3.5,-3.5)(4,3.5) +\psset{lightsrc=80 30 30,viewpoint=100 45 90 rtp2xyz,Decran=100,linewidth=0.2pt} +\codejps{ +/rpn {tx@AlgToPs begin AlgToPs end cvx exec} def +/xc {((2+1*cos(2.75*t))*cos(t)) rpn } def +/yc {((2+1*cos(2.75*t))*sin(t)) rpn } def +/zc {(1*sin(2.75*t)) rpn } def +/xc' {(-2.75*sin(2.75*t)*cos(t)-(2+cos(2.75*t))*sin(t)) rpn } def +/yc' {(-2.75*sin(2.75*t)*sin(t)+(2+cos(2.75*t))*cos(t)) rpn } def +/zc' {(2.75*cos(2.75*t)) rpn } def +/g { 3 dict begin /t exch def xc yc zc end } def +/g' { % first derivative +3 dict begin /t exch def xc' yc' zc' end } def +/solenoide{ +% t_min t_max (name_function) radius_tube [resolution] + 0 25.2 (g) 0.1 [360 8] newtube dup [0 1] solidputhuecolors} def +solenoide +drawsolid** +}% +\end{pspicture} +\end{LTXexample} + +\subsection{Improving the speed of readout} + +The curve with the name ``\textit{horopter}'' is the subject of this website: + +\centerline{\url{http://www.mathcurve.com/courbes3d/horoptere/horoptere.shtml}} + +\subsubsection{Obtaining the curve directly} + +The following lines allow us to calculate the points and draw the curve. +The \Index{resolution} \texttt{\Lkeyword{ngrid}=72 12} of the curve was increased, so some +more calculation time to produce the result, which some will judge as very long. +\begin{verbatim} +\begin{pspicture}(-7,-2)(7,4) +\psset{lightsrc=80 30 30} +\psset{viewpoint=1000 60 20 rtp2xyz,Decran=1000} +\psframe(-7,-2)(7,4) +\psset{solidmemory} +\codejps{/a 2 def /b 2 def}% +\defFunction[algebraic]{F3}(t) + {a*(1+cos(t))} + {b*tan(t/2)} + {a*sin(t)} +\defFunction[algebraic]{F3'}(t) + {-a*sin(t)} + {b*(1+tan(1/2*t)^2)} + {a*cos(t)} +\psSolid[object=courbe, + range=-2.7468 2.7468, + ngrid=72 12, + function=F3,hue=0 1 0.7 1, + action=none,name=H1, + r=1]% +\psSolid[object=cylindrecreux, + h=20,r=1,RotX=90, + incolor=green!30,action=none, + name=C1, + ngrid=36 36](2,10,0) +\psSolid[object=fusion, + base=H1 C1] +\composeSolid +\end{pspicture} +\end{verbatim} + +\subsubsection{Saving the parameters of the curve} + +If this curve is used several times, it is advisable to backup all the +characteristics of that curve, like: +coordinates of the vertices, list of colours of the faces with placing +the last command \texttt{\Lkeyword{action}=\Lkeyval{writesolid}}: +\begin{verbatim} +\psSolid[object=fusion, + base=H1 C1, + file=horoptere, + action=writesolid] +\end{verbatim} +The following sequence \Cadre{LaTeX fichier.tex->dvips->GSview + (Windows) or gv (Linux)} will generate 4 files: +\begin{itemize} + \item \texttt{horoptere-couleurs.dat} $\rightarrow$ the colours of the faces; + \item \texttt{horoptere-faces.dat} $\rightarrow$ the list of faces; + \item \texttt{horoptere-sommets.dat} $\rightarrow$ the list of vertices; + \item \texttt{horoptere-io.dat} $\rightarrow$ the number of faces and vertices. +\end{itemize} + +then read and execute the files with the command: +\texttt{\textbackslash{}psSolid[object=datfile,file=horoptere]}, the time saved can be quite significant + + + +\encadre{By default, under Windows and Linux, the security of files on the hard drive is activated and doesn't allow to write on the drive. +To deactivate that security option, more or less temporarily, here the two corresponding procedures: + +\begin{description} + + \item[Linux:] The advice from Jean-Michel \textsc{Sarlat}: the simplest will be to use GhostScript directly, within the console. As there is no image to wait for: + +\$$>$ gs -dNOSAFER monfichier.ps quit.ps + \item[Windows:] Within the menue \texttt{Options}, the option + \textsf{Security of files} must be turned to unchecked. +\end{description}} + +\subsubsection{The plot of the curve} + +\begin{LTXexample}[width=9cm] +\begin{pspicture}(-5,-3.5)(4,3) +\psset{lightsrc=80 30 30} +\psset{viewpoint=100 60 20 rtp2xyz, + Decran=75} +\psframe*[linecolor=cyan!30](-4.5,-3)(3.5,3) +\psSolid[object=datfile,file=data/horoptere] +\end{pspicture} +\end{LTXexample} + + +\clearpage +\subsection{Some other examples} + + +\subsubsection{A straight line} + +\begin{LTXexample}[width=7cm] +\begin{pspicture}(-3.5,-2)(3.5,2) +\psset{viewpoint=100 -20 20 rtp2xyz, + Decran=75,unit=0.8} +\psSolid[object=grille,base=-4 4 -4 4]% +\defFunction[algebraic]{FIV}(t){t}{t}{0.5} +\defFunction[algebraic]{FIV'}(t){1}{1}{0} +\psSolid[object=courbe, + range=-4 4, ngrid=16 16, + function=FIV, r=0.5] +\end{pspicture} +\end{LTXexample} + + + +\subsubsection{A \Index{hypocycloid}} + +\begin{LTXexample}[width=7cm] +\begin{pspicture}(-3.5,-3)(3.5,3) +\psset{viewpoint=100 20 45 rtp2xyz, + Decran=75,unit=0.7} +\psSolid[object=grille,base=-5 5 -5 5]% +\defFunction[algebraic]{FII}(t) + {4*cos(t)+cos(4*t)/2} + {4*sin(t)-sin(4*t)/2} + {1} +\defFunction[algebraic]{FII'}(t) + {-4*sin(t)-2*sin(4*t)} + {4*cos(t)-2*cos(4*t)} + {0} +\psSolid[object=courbe, + range=0 6.28,ngrid=90 16, + function=FII,r=1] +\end{pspicture} +\end{LTXexample} + +\clearpage + +\subsubsection{The spring of Gaston} + +\begin{LTXexample}[width=7cm] +\begin{pspicture}(-3.5,-4)(3.5,4.5) +\psset{lightsrc=80 30 30, + viewpoint=100 20 20 rtp2xyz,Decran=50} +\defFunction[algebraic]{FIII}(t) + {(t^2+3)*sin(15*t)} + {(t^2+3)*cos(15*t)}{2*t} +\defFunction[algebraic]{FIII'}(t) + {2*t*sin(15*t)+15*(t^2+3)*cos(15*t)} + {2*t*cos(15*t)-15*(t^2+3)*sin(15*t)}{2} +\psSolid[object=courbe, + range=-2 2,ngrid=360 6, + function=FIII,hue=0.2 0.3, + linewidth=0.1pt,r=0.2] +\end{pspicture} +\end{LTXexample} + + +\endinput + diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-vecteur-en.tex b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-vecteur-en.tex new file mode 100644 index 00000000000..ca9ccc36ddf --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-vecteur-en.tex @@ -0,0 +1,85 @@ +\section{The object \texttt{vecteur}} + +\subsection{Definition with components} + +The object \Lkeyword{vecteur} allows us to define a \Index{vector}. The simplest way to do +that is to use the argument \texttt{\Lkeyword{args}=$x$ $y$ $z$} to specify its \Index{components}. + +\psset{lightsrc=10 -20 50,viewpoint=50 -20 30 rtp2xyz,Decran=100} +\begin{LTXexample}[width=6cm] +\begin{pspicture*}(-1,-1)(1,2) +\psSolid[object=vecteur, + action=draw*, + args=0 0 1, + linecolor=yellow]% +\psSolid[object=vecteur, + args=1 0 0, + linecolor=red] +\psSolid[object=vecteur, + args=0 0 1, + linecolor=blue](1,0,0) +\end{pspicture*} +\end{LTXexample} + +\subsection{Definition with 2 points} + +We can also define a vector with 2 given points $A$ and $B$ of $\mathbb{R}^3$. + +We then use the arguments \texttt{\Lkeyword{definition}=\Lkeyval{vecteur3d}} and \texttt{\Lkeyword{args}=$x_A$ $y_A$ $z_A$ $x_B$ +$y_B$ $z_B$} where $(x_A, y_A, z_A)$ and $(x_B, y_B, z_B)$ are the appropriate coordinates of the points $A$ and $B$ + +If the points $A$ and $B$ were already defined, we can easily use the named variables: +\texttt{\Lkeyword{args}=$A$ $B$}. + +\psset{lightsrc=10 -20 50,viewpoint=20 20 20,Decran=20} +\begin{LTXexample}[width=6cm] +\begin{pspicture*}(-3,-3)(4.5,2) +\psSolid[object=plan, + linecolor=gray, + definition=equation, + args={[0 1 1 0]}, + base=-1 3 -2 2, + planmarks, + plangrid] +\psSolid[object=vecteur, + definition=vecteur3d, + args=0 0 1 1 1 1]% +\end{pspicture*} +\end{LTXexample} + + +\subsection{Some other definitions of a vector} + +There are some other possibilities to define a \Index{vector}. Here a list of some +possible definitions with the appropriate arguments: + +\begin{itemize} + +\item \texttt{\Lkeyword{definition}=\Lkeyval{addv3d}}; +\texttt{\Lkeyword{args}= $\vec u$ $\vec v$}. + +Addition of 2 vectors. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{subv3d}}; +\texttt{\Lkeyword{args}= $\vec u$ $\vec v$}. + +Difference of 2 vectors. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{mulv3d}}; +\texttt{\Lkeyword{args}= $\vec u$ $\lambda $}. + +\Index{Multiplication} of a vector with a real. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{vectprod3d}}; +\texttt{\Lkeyword{args}= $\vec u$ $\vec v$}. + +\Index{Vector product} of 2 vectors. + +\item \texttt{\Lkeyword{definition}=\Lkeyval{normalize3d}}; +\texttt{\Lkeyword{args}= $\vec u$}. + +\Index{Normalized vector} $\Vert \vec u\Vert ^{-1} \vec u$. + +\end{itemize} + +\endinput |