summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/D-6-6.ltx
blob: 77b14b72baa15054071e83436a921f9f3f85eec0 (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
%% 
%%  The LaTeX Graphics Companion, 2ed (first printing May 2007)
%% 
%%  Example D-6-6 on page .
%% 
%%  Copyright (C) 2007 Michel Goossens, Frank Mittelbach, Denis Roegel, Sebastian Rahtz, Herbert Vo\ss 
%% 
%%  It may be distributed and/or modified under the conditions
%%  of the LaTeX Project Public License, either version 1.3
%%  of this license or (at your option) any later version.
%% 
%%  See http://www.latex-project.org/lppl.txt for details.
%% 

\documentclass{ttctexaplate}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{413.44133pt}
\StartShownPreambleCommands
\usepackage{pst-vue3d}
\setlength\parindent{0pt}
\StopShownPreambleCommands
\begin{document}
\psset{%
  CubeColorFaceOne=1 1 1,  CubeColorFaceTwo=1 0 0,
  CubeColorFaceThree=0 1 0,CubeColorFaceFour=0 0 1,
  CubeColorFaceFive=1 1 0, CubeColorFaceSix=0 1 1}
\definecolor{GrisClair}{cmyk}{0.25,0.01,1,0}
\definecolor{GrisTresClair}{cmyk}{0.01,0.25,1,0}
\newcommand*\PlansOXYZ[1]{{%
  \psset{fillstyle=solid,grille=10,linewidth=0.2mm,%
       normaleLongitude=0,normaleLatitude=90}
  \FrameThreeD[fillcolor=GrisClair](0,0,0)(-50,0)(0,50)
  \QuadrillageThreeD(0,0,0)(-50,0)(0,50)%
  \psset{normaleLongitude=90,normaleLatitude=0}
  \FrameThreeD[fillcolor=GrisTresClair](0,0,0)(0,0)(50,-#1)
  \QuadrillageThreeD(0,0,0)(0,-#1)(50,0)%
  \psset{normaleLongitude=0,normaleLatitude=0}
  \FrameThreeD[fillcolor=GrisTresClair](0,0,0)(-50,0)(0,-#1)
  \QuadrillageThreeD(0,0,0)(-50,-#1)(0,0)%
}}
\begin{pspicture}(-2.8,-3)(3.75,3.5)
  \psset{THETA=30,PHI=30,Dobs=200,Decran=12}
  \PlansOXYZ{50}
  \pNodeThreeD(40,40,35){G}
  \pNodeThreeD(40,40,0){G_XY}
  \pNodeThreeD(40,0,0){G_X}
  \pNodeThreeD(0,40,0){G_Y}
  \pNodeThreeD(0,0,35){G_Z}
  \pNodeThreeD(0,40,35){G_YZ}
  \pNodeThreeD(40,0,35){G_XZ}
  \psdots[linecolor=red,dotscale=3](G)
  \psdots(G_XY)(G_XZ)(G_YZ)(G_X)(G_Y)(G_Z)
  \AxesThreeD{->}(55)
  { \psset{linecolor=red,linewidth=2pt}
    \psline(G_Z)(G_XZ)\psline(G_Z)(G_YZ)
    \psline(G_X)(G_XY)\psline(G_Y)(G_XY)
    \psline(G_X)(G_XZ)\psline(G_Y)(G_YZ)
    \psline(G_X)(0,0)\psline(G_Y)(0,0)\psline(G_Z)(0,0)
  }%
  \psset{A=5,B=5,C=5}%
  \DieThreeD[RotZ=90](5,5,5)%
  \DieThreeD(5,5,30)%
  \DieThreeD[RotY=90](5,35,5)%
  \DieThreeD[RotY=90,RotZ=90](35,35,5)%
  \DieThreeD[RotZ=-90](35,5,5)
  \DieThreeD[RotX=90,RotZ=-90](35,5,30)%
  \psset{linecolor=red,linewidth=2pt}
  \psline(G)(G_XZ)\psline(G)(G_YZ)\psline(G)(G_XY)
\end{pspicture}
\psset{%
  CubeColorFaceOne=1 1 1,  CubeColorFaceTwo=1 0 0,
  CubeColorFaceThree=0 1 0,CubeColorFaceFour=0 0 1,
  CubeColorFaceFive=1 1 0, CubeColorFaceSix=0 1 1}
\begin{pspicture}(-2,-2)(6,5)
  \psset{Dobs=200,Decran=11}
  \PlansOXYZ{50}
  \pNodeThreeD(40,40,35){G}
  \pNodeThreeD(40,40,0){G_XY}
  \pNodeThreeD(40,0,0){G_X}
  \pNodeThreeD(0,40,0){G_Y}
  \pNodeThreeD(0,0,35){G_Z}
  \pNodeThreeD(0,40,35){G_YZ}
  \pNodeThreeD(40,0,35){G_XZ}
  \psdots[linecolor=red,dotscale=3](G)
  \psdots(G_XY)(G_XZ)(G_YZ)(G_X)(G_Y)(G_Z)
  \AxesThreeD{->}(55)
  { \psset{linecolor=red,linewidth=2pt}
    \psline(G_Z)(G_XZ)\psline(G_Z)(G_YZ)
    \psline(G_X)(G_XY)\psline(G_Y)(G_XY)
    \psline(G_X)(G_XZ)\psline(G_Y)(G_YZ)
    \psline(G_X)(0,0)\psline(G_Y)(0,0)\psline(G_Z)(0,0)
  }
  \psset{A=5,B=5,C=5}
  \DieThreeD[RotZ=90](5,5,5)
  \DieThreeD(5,5,30)
  \DieThreeD[RotY=90](5,35,5)
  \DieThreeD[RotY=90,RotZ=90](35,35,5)
  \DieThreeD[RotZ=-90](35,5,5)
  \DieThreeD[RotX=90,RotZ=-90](35,5,30)
  \psset{linecolor=red,linewidth=2pt}
  \psline(G)(G_XZ)\psline(G)(G_YZ)\psline(G)(G_XY)
\end{pspicture}
\end{document}