summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-solides3d/doc-en/par-fusion_en_corr.tex
blob: 94c097dbfafbfdff3b0fb6dd221c9d4134561f1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
\section{Fusing solids}

It is possible to arrange several solids within the same
structure: this is done with the operation \verb+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
\bs{psSolid}, with each of them given a separate name.

You use the object \verb+fusion+ of \bs{psSolid}, by indicating in
the parameter \verb+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