summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-solides3d/doc-en/par-annoterschema_en_corr.tex
blob: 447f2914a34ac2062a8a4297c8e35eb086bac484 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
\section{Adding dimensions to the scenery}

It is very interesting to add  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