summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-solides3d/doc-en/par-nommersolide_en_corr.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-solides3d/doc-en/par-nommersolide_en_corr.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pst-solides3d/doc-en/par-nommersolide_en_corr.tex62
1 files changed, 62 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-solides3d/doc-en/par-nommersolide_en_corr.tex b/Master/texmf-dist/doc/generic/pst-solides3d/doc-en/par-nommersolide_en_corr.tex
new file mode 100644
index 00000000000..f744dc9c7f8
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-solides3d/doc-en/par-nommersolide_en_corr.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 \verb+solidmemory+, which allows the
+transmission of a variable throughout the code.
+
+Consequently, activation of this Boolean deactivates drawing
+by the macros \bs{psSolid}, \bs{psSurface} and \bs{psProjection}
+immediate. To obtain the drawing, we use the macro
+\verb+\composeSolid+ at the end of the code.
+
+When \verb+\psset{solidmemory}+ is set up, we can use the option
+\verb+[name=...]+ of the macro \bs{psSolid}.
+
+In the example below, a coloured solid is constructed, which is
+named $A$. It is drawn using the object \verb+[object=cube]+ with
+the parameter \texttt{[load=$A$]}.
+
+Note that \verb+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
+\verb+[deactivatecolor]+ which allows the cube to keep its
+original red colour (otherwise the default colours would be used
+within the object \verb+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 \verb+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